Skip to content

fix(review): full-range gutter annotations and next/prev hunk jump - #1550

Open
FNDEVVE wants to merge 2 commits into
backnotprop:mainfrom
FNDEVVE:fix/991-diff-selection-1543-hunk-nav
Open

FNDEVVE wants to merge 2 commits into
backnotprop:mainfrom
FNDEVVE:fix/991-diff-selection-1543-hunk-nav

Conversation

@FNDEVVE

@FNDEVVE FNDEVVE commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Two reviewer-ergonomics fixes in the code review diff views:

Full-range gutter annotations (#991). The gutter + forwarded Pierre's single clicked line even when the reviewer had a multi-line browser selection. Both diff views now snapshot the live Selection on capture-phase pointerdown (reusing the diffSelection helpers) and the gutter handler forwards the snapshot range when it spans real lines, falling back to the clicked line otherwise. The all-files view additionally checks the snapshot came from the clicked file.

Next/prev changed-hunk jump (#1543, keyboard only). New N / P bindings (verified free across the composed review registry) jump between changed hunks on both the single-file and all-files views, resolving targets from Pierre's parsed hunks and scrolling via the existing shadow-DOM line query. Pure index resolution lives in utils/hunkNavigation.ts with unit tests; the gutter-minimap idea from the thread is deliberately out of scope.

Also registers the new diffSelection.test.ts in the CI DOM-test allowlist, as required by the allowlist guard.

Testing: DOM_TESTS=1 bun test over the two util suites plus the DiffViewer/AllFilesCodeView selection harnesses (35 pass incl. the allowlist), full bun run typecheck clean. The review-editor tsconfig (not a CI gate) shows zero new diagnostics vs base.

Closes #991, closes #1543.

Gutter + now honors the live multi-line selection (single-line fallback preserved); N/P jump between changed hunks on both diff views.

Closes backnotprop#991, closes backnotprop#1543.
AllFilesCodeView is bundled into the portable guide viewer; the hunk-navigation change alters the bundle hash.
@FNDEVVE
FNDEVVE force-pushed the fix/991-diff-selection-1543-hunk-nav branch from 18bbaeb to afb36a2 Compare September 16, 2026 11:23
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.

[Feature Request] Shortcut to jump to next/prev changed hunk Bug: diff annotations only capture clicked line instead of full selection

1 participant