Repository navigation
FIX: stop pushing a duplicate history entry on first page finding saves - #3667
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
Saving or deleting a finding on the first findings page rewrote an identical URL, and the router pushed a new history entry for it, so Back needed one extra press per save. The offset navigation is skipped when the requested offset is already in the URL. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
This branch has not been deployed
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.
Description
Fixes #3666
Saving or deleting a finding always rewrote the findings page offset in the URL. On the first page there is no offset to change, so the router received the identical URL and still pushed a new history entry for it. Each save or delete on the first page added one dead Back press, and leaving the page afterwards took as many presses as there had been saves.
The offset navigation is now skipped when the URL already carries the requested offset. The refresh after a save or delete keeps working through the existing revision bump, and navigating back from a later page to the first still updates the URL exactly as before.
Tests and Documentation
Added a regression that records every router location during a save on the first page and asserts the history holds a single entry. It fails on main with a second entry for the identical URL and passes with the change. The full operation detail suite passes (30 tests) and tsc is clean.
No documentation change needed, so I did not run JupyText.