Add diff navigation and state persistence #69

Merged
qwc merged 1 commit from feature/diff-navigation-and-persistence into main 2026-02-16 17:32:02 +01:00
Owner

Summary

  • Adds Prev/Next navigation buttons and n/p keyboard shortcuts to jump between changes in diff mode, with amber outline highlighting the current change and an "X / N" counter
  • Persists diff state via ?compare=<version> URL parameter — diffs survive page reloads and link navigation within the docs
  • Intercepts in-doc link clicks during diff mode to carry the compare parameter forward automatically

Closes #58, closes #59

Test plan

  • Enter diff mode, verify "N changes found" count appears in the banner
  • Click Prev/Next buttons — scrolls to each change with amber outline highlight
  • Press n/p keys — same navigation behavior (verify no conflict when focused on search input)
  • Enter diff mode, check URL has ?compare=X, reload page — diff re-engages automatically
  • Click a doc link while in diff mode — new page loads with diff still active
  • Exit diff mode — ?compare= removed from URL
  • Switch version (not compare) — diff mode not carried over
  • Page with no changes — "no changes on this page" shown, nav buttons hidden
  • Invalid ?compare= value in URL — silently ignored, no diff triggered

🤖 Generated with Claude Code

## Summary - Adds **Prev/Next navigation buttons** and `n`/`p` keyboard shortcuts to jump between changes in diff mode, with amber outline highlighting the current change and an "X / N" counter - **Persists diff state** via `?compare=<version>` URL parameter — diffs survive page reloads and link navigation within the docs - **Intercepts in-doc link clicks** during diff mode to carry the compare parameter forward automatically Closes #58, closes #59 ## Test plan - [ ] Enter diff mode, verify "N changes found" count appears in the banner - [ ] Click Prev/Next buttons — scrolls to each change with amber outline highlight - [ ] Press `n`/`p` keys — same navigation behavior (verify no conflict when focused on search input) - [ ] Enter diff mode, check URL has `?compare=X`, reload page — diff re-engages automatically - [ ] Click a doc link while in diff mode — new page loads with diff still active - [ ] Exit diff mode — `?compare=` removed from URL - [ ] Switch version (not compare) — diff mode not carried over - [ ] Page with no changes — "no changes on this page" shown, nav buttons hidden - [ ] Invalid `?compare=` value in URL — silently ignored, no diff triggered 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add diff navigation and state persistence to document overlay
All checks were successful
CI / test (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 45s
CI / docker (pull_request) Has been skipped
9997163cc7
Adds prev/next navigation buttons and keyboard shortcuts (n/p) to jump
between changes in diff mode, with an amber outline highlighting the
current change. Persists diff state via ?compare= URL parameter so
diffs survive page navigation and reloads. Intercepts in-doc link
clicks during diff mode to carry the compare parameter forward.

Closes #58, closes #59

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
qwc merged commit a1c946e332 into main 2026-02-16 17:32:02 +01:00
qwc deleted branch feature/diff-navigation-and-persistence 2026-02-16 17:32:03 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
qwc-open/asiakirjat!69
No description provided.