Skip to content

fix: account for sticky file header in comment navigation scroll#213

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/comment-nav-scroll-offset
Mar 28, 2026
Merged

fix: account for sticky file header in comment navigation scroll#213
tomasz-tomczyk merged 1 commit intomainfrom
fix/comment-nav-scroll-offset

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • When navigating between comments with [ / ] in multi-file or git mode, the scroll offset only subtracted the main app header height, leaving the top of the comment card hidden behind the sticky file header
  • Now walks up from the target comment to its .file-section, measures the .file-header height, and adds it to the scroll offset
  • No change in single-file views where there is no .file-section

Review

Test plan

  • Open a multi-file review, navigate with ] — comment top should no longer be obscured by the file header
  • Test in single-file view — behaviour unchanged

🤖 Generated with Claude Code

When navigating between comments with [ ] in multi-file or git mode,
the scroll offset only subtracted the main app header height, leaving
the top of the comment card hidden behind the sticky file header.

Now also measures the target comment's .file-header height and adds
it to the scroll offset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 46c9bbc into main Mar 28, 2026
2 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/comment-nav-scroll-offset branch March 28, 2026 08:29
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