Skip to content

FIX: stop pushing a duplicate history entry on first page finding saves - #3667

Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/finding-save-duplicate-history
Open

Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/finding-save-duplicate-history

Conversation

@ManoharPaturi

Copy link
Copy Markdown
Contributor

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.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving or deleting a finding on the first page pushes a duplicate browser history entry

1 participant