Repository navigation
feat: rebuild diff review on Pierre CodeView - #1726
Merged
Merged
Conversation
Replace the hand-rolled diff renderers with @pierre/diffs CodeView for whole-comparison virtualization. Files pane is docked with min widths and drag-to-collapse, line comments compose in the bottom composer instead of an inline editor, and the turn change summary renders a collapsible folder tree with resolved stats. Snapshot diff stats plumbing added through contracts and server transport. Legacy UnifiedDiff/SideBySideDiff/ FileEntry and the custom highlighter are removed.
Docking the editor in the composer left no visual link between the comment and the line it annotates. The editor now mounts inside the diff row the user clicked, matching the transcript annotation editor; the module-level draft cache keeps unsent text when pierre's virtualizer unmounts the row.
Resolve bun.lock conflict by taking main's lockfile and reinstalling, which keeps @pierre/diffs pinned at 1.4.1.
The pierre Virtualizer stubs broke unrelated suites: the synchronous IntersectionObserver callback hit a TDZ on MermaidBlock's timeoutId, its empty intersectionRect tripped the visibility gate, and adding Element.prototype.getAnimations pushed Base UI popovers onto an async exit-animation path that jsdom never completes. Fire the callback on a microtask with a non-zero rect, and set BASE_UI_ANIMATIONS_DISABLED so Base UI keeps the synchronous unmount path it uses without the API. Generated with [Devin](https://devin.ai)
The HTML mock was exploration material and was never meant to ship. Generated with [Devin](https://devin.ai)
5 tasks
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.
What
Previously the review surface rendered diffs through hand-rolled unified and side-by-side components, the Files pane floated over content at narrow widths, line comments used a bespoke editor inside diff rows, and the turn summary listed flat full paths.
Now the whole comparison renders through
@pierre/diffsCodeViewwith the library's own virtualization, the Files pane is docked with minimum widths and drag-to-collapse, line comments compose inline at the clicked line using the same editor primitives as the "Add comment" flow, and the turn summary groups files under a collapsible folder tree with resolved per-file stats.Verified: focused Vitest suites pass (turn summary 8/8, diff panel and file list suites), typecheck and lint clean, and the flows below were exercised live in the app (screenshots and video attached).
Known limits: the pull-request diff surface is unchanged in this pass, and
vliststill owns transcript virtualization (Pierre owns diff virtualization).Why
The old diff view had accumulated usability and maintenance problems: duplicated custom renderers, a floating panel that broke at narrow widths, a one-off comment editor, and summary rows that repeated full paths.
UI Changes
Before: hand-rolled diff rows, a flat summary, and a separate comment card.
After: Pierre-rendered diff, folder-tree summary, and the comment editor inline at the line.
Video: gutter
+mounts the editor at the line, typing survives scroll virtualization, and saving produces the comment chip.diff-comment-flow.webm
Key Changes
ReviewDiffViewrenders the whole comparison throughCodeView, replacingUnifiedDiff,SideBySideDiff,FileEntry,DiffContent, anduseDiffHighlighter.@pierre/diffspinned at 1.4.1.+sets a store-backed edit target and the editor renders inside the diff row at that line, sharing theCommentEditorComposerprimitives with "Add comment". A module-level draft cache keeps unsent text when pierre's virtualizer unmounts the row.+N more filesescape.\separators so snapshot file lists on Windows group and resolve stats correctly.snapshot.getDiffStatsand cumulative stats through contracts and transport;DiffStatsgainschangeType.Config Changes
None
Review Notes
agent:upsession.