fix(code-review): scroll to next file after viewing#3573
Draft
richardsolomou wants to merge 3 commits into
Draft
fix(code-review): scroll to next file after viewing#3573richardsolomou wants to merge 3 commits into
richardsolomou wants to merge 3 commits into
Conversation
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
|
Merging to
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 |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
✅ Visual changes approved by @richardsolomou — baseline updated in 1 changed. |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tspnpm --dir packages/ui exec vitest run src/features/code-review/reviewShellParts.test.tsxpnpm exec biome lint packages/core packages/ui/src/features/code-review/reviewShellParts.tsx packages/ui/src/features/code-review/components/ReviewShell.tsxpnpm exec turbo typecheck --filter=@posthog/core --filter=@posthog/uiAutomatic notifications
Created with PostHog Code