Skip to content

fix(code-review): scroll to next file after viewing#3573

Draft
richardsolomou wants to merge 3 commits into
mainfrom
posthog-code/fix-viewed-file-navigation
Draft

fix(code-review): scroll to next file after viewing#3573
richardsolomou wants to merge 3 commits into
mainfrom
posthog-code/fix-viewed-file-navigation

Conversation

@richardsolomou

Copy link
Copy Markdown
Member

Problem

Marking a file as viewed collapses it without aligning the next file, which can leave the review partway through the next diff. Why: review progress should stay anchored like GitHub's file review flow.

Changes

I reused the existing virtual-list navigation path to move the next file to the top after marking the current file as viewed. Section rows are skipped, while unmarking and the final file keep the current position.

How did you test this?

  • pnpm --dir packages/core exec vitest run src/code-review/reviewShellGeometry.test.ts
  • pnpm --dir packages/ui exec vitest run src/features/code-review/reviewShellParts.test.tsx
  • pnpm exec biome lint packages/core packages/ui/src/features/code-review/reviewShellParts.tsx packages/ui/src/features/code-review/components/ReviewShell.tsx
  • pnpm exec turbo typecheck --filter=@posthog/core --filter=@posthog/ui

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Keep review progress aligned by moving the next file to the top after marking the current file as viewed.

Generated-By: PostHog Code
Task-Id: f9593454-58e4-44a7-9abe-2033ae332f9c
@trunk-io

trunk-io Bot commented Jul 20, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 10da13a.

@posthog

posthog Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @richardsolomou — baseline updated in 10da13a.

View this run in PostHog

1 changed.

richardsolomou and others added 2 commits July 20, 2026 09:38
Import the navigation helper from core directly so React Doctor no longer treats the component module as adding another non-component export.

Generated-By: PostHog Code
Task-Id: f9593454-58e4-44a7-9abe-2033ae332f9c
1 updated
Run: 607b1d03-c58c-464b-a7b0-1cf9f09f774c

Co-authored-by: richardsolomou <2622273+richardsolomou@users.noreply.github.com>
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