Skip to content

Fix stale main view content when entering/exiting filtering view #4719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

stefanhaller
Copy link
Collaborator

  • PR Description

When filtering by path, the main view wouldn't update the diff properly when entering and exiting the filtering mode.

@stefanhaller stefanhaller added the bug Something isn't working label Jul 9, 2025
@stefanhaller stefanhaller enabled auto-merge July 9, 2025 13:55
Now that -committerdate is the default sort order, we could get different
results for the sort order of the branches list depending on whether the commits
on both branches have the same committer time stamp (likely in an integration
test, since git time stamps have second resolution), in which case git will fall
back to alphabetical order, or not (rare, but possible), in which case master
will have the newer commit and will come first. Make this stable by forcing the
sort order to alphabetical.

We might have more tests with this problem, we'll just have to fix them one by
one as we see them fail.
When entering filtering we would only call FocusLine, which takes care of
highlighting the selected line in the commits list, but not of re-rendering the
main view. HandleFocus does that.

When exiting filtering, the HandleFocus call was missing entirely.

The tests needed to be reworked a little bit to make this testable.
@stefanhaller stefanhaller force-pushed the rerender-diff-when-entering-exiting-filtering-mode branch from 7a5b43e to 4981419 Compare July 9, 2025 14:00
@stefanhaller stefanhaller merged commit 656cb32 into master Jul 9, 2025
13 checks passed
@stefanhaller stefanhaller deleted the rerender-diff-when-entering-exiting-filtering-mode branch July 9, 2025 14:03
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 8026fc21 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (8026fc2) Report Missing Report Missing Report Missing
Head commit (4981419) 56757 49325 86.91%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4719) 45 45 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy