feat(web): diff panel lists files edge to edge and keeps them across refetches - #208
Merged
Merged
Conversation
…refetches Files in the right-panel diff sat in rounded cards inside the panel. They now run edge to edge with a hairline between them, matching the pull request diff viewer. The jump-to-file flash draws inside the row so the edges do not clip it. Loading shows placeholder rows in the shape of the list instead of a one-line label, held back a beat so a fast load never flashes them. The parser keys every file off the whole patch, so any change re-keyed every file: each diff instance remounted and re-highlighted, and collapse state was wiped on every working-tree refetch. Files are now keyed by path, and files whose change did not move keep their parsed object across refetches.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
The file rewrite in the previous commit dropped one backslash level from the regular expression that strips ANSI color codes, which CodeQL flagged. The line now matches main again.
# Conflicts: # apps/web/src/components/DiffPanel.tsx
…l-request-diff-styling
…l-request-diff-styling
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.
The right-panel diff drew each file in a rounded card inside the panel, showed a one-line "Loading..." label while waiting, and rebuilt every file whenever any file changed.
buildFileDiffRenderKeyinapps/web/src/lib/diffRendering.ts), and files whose change did not move keep their parsed object across refetches.Verified live: with one file collapsed, editing another file on disk added the new row, kept the collapsed row collapsed, and did not rebuild the existing rows.
Note for
feature/pull-requests-page: that branch carries its own copy ofbuildFileDiffRenderKeyindiffs/fileDiffPresentation.tsx. On merge, drop that copy and import the one fromlib/diffRendering.ts.