Skip to content

fix: show next diff from its top after marking a file reviewed - #123

Merged
flexdinesh merged 1 commit into
mainfrom
fix-reviewed-scroll-next-diff-top
Oct 27, 2026
Merged

flexdinesh merged 1 commit into
mainfrom
fix-reviewed-scroll-next-diff-top

Conversation

@flexdinesh

Copy link
Copy Markdown
Owner

Marking a file reviewed while scrolled partway into it collapsed the file but left the scroll offset unchanged, so the next diff opened mid-file. Pierre's scroll anchoring only corrects this when the next file's header is already visible, so files taller than the viewport hit it.

  • DiffWorkspace.tsx: when a file scrolled past its top is marked reviewed, scroll its collapsed header to the viewport top so the next diff starts from its first line. Skipped when hiding reviewed files (navigation already hands off to the neighbor) and when unmarking.
  • use-reviewed-files.ts: toggleReviewed resolves whether the toggle was applied, so failed or stale writes don't scroll.
  • DESIGN.md: document the behavior.
  • app.spec.ts: browser test for marking a file reviewed mid-scroll; fails before the fix.

Validation

  • mise run check: passed (133 browser tests, Go, contracts, static checks).
  • Manual: 200-line diff fixture; marking first and middle files mid-scroll shows the next diff from line 1; unmark keeps scroll; hide-reviewed mode unchanged.

@flexdinesh
flexdinesh marked this pull request as ready for review October 27, 2026 04:33
@flexdinesh
flexdinesh enabled auto-merge (squash) October 27, 2026 04:34
@flexdinesh
flexdinesh merged commit 65f14d4 into main Oct 27, 2026
2 checks passed
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.

1 participant