Repository navigation
fix(client): render only the target file when jumping to it - #484
Open
ashishnitinpatil wants to merge 1 commit into
Open
ashishnitinpatil wants to merge 1 commit into
ashishnitinpatil wants to merge 1 commit into
Conversation
Clicking a file in the sidebar, or moving the keyboard cursor into an unrendered file, rendered every file from the top of the list down to the target. On a large diff (169 files, 46 MB, mostly big JSON fixtures) clicking a file near the bottom rendered 168 files, built about 2.2M DOM nodes and froze the tab for over 45 seconds. yoshiko-pg#225 rendered everything above so the placeholders would not shift the target as they filled in. Browsers with scroll anchoring already keep the target in place, so there only the target is rendered and the files above it render lazily as usual. The same click now renders 31 files and settles in about 7s. Browsers without scroll anchoring keep the old behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Clicking a file in the sidebar renders every file above it before scrolling. On a large diff (169 files, 46 MB, mostly big JSON files), clicking a file near the bottom rendered 168 files, about 2.2M DOM nodes, and froze the tab for over 45s.
#225 rendered everything above so the target wouldn't drift as the placeholders above it filled in. Browsers with scroll anchoring (Chrome, Firefox, Edge) already keep the target in place, so there a jump (sidebar click or keyboard cursor) now renders only the target, and the files above it render lazily as usual. Same click: about 7s, 31 files rendered. Browsers without it, which may include Safari, keep the old behaviour.
Tested:
[steps back through files correctly. WithCSS.supportsstubbed to false, a jump renders every file above as before.🤖 Generated with Claude Code