Repository navigation
Don't overwrite refreshed history with a stale commit batch - #23025
Closed
Arthur031221 wants to merge 1 commit into
Closed
Arthur031221 wants to merge 1 commit into
Arthur031221 wants to merge 1 commit into
Conversation
When a commit is made while the History tab is loading its next batch, the batch was appended to the list captured before the commit. On short branches this showed the oldest commit repeatedly and hid the new one. Drop the batch if the list changed while it was loading. Signed-off-by: Arthur031221 <[email protected]>
Contributor
|
Thanks for your pull request! While it doesn't meet all of our standard requirements, it appears to be a small, focused contribution and has been routed to the team for review. Note: We still encourage linking to an issue with the |
Author
|
Anything else you need from me on this one? Happy to adjust it. |
Author
|
Fixed by #23238, closing this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22064
Description
On a branch with only a few commits, the History list sits close enough to the bottom that it always asks for the next batch of commits. If you commit while that request is still running, the history gets refreshed to include the new commit. Then the request finishes, appends its batch to the list it captured before the commit, and writes that back. The oldest commit shows up again and the newest one is gone until you restart the app.
_loadNextCommitBatchnow re-reads the compare state after loading and drops the batch ifcommitSHAsisn't the list it started from. Other async loads inAppStorealready do this.Added
app-store-history-test.ts, which refreshes the history while a batch is loading and checks the refreshed list is kept.yarn test app/test/unit/stores/app-store-history-test.tspasses.Release notes
Notes: [Fixed] History no longer repeats the first commit and hides the newest one after committing on a short branch
Assisted by Claude/Codex.