Skip to content

feat(code): replace diff editor with unified review panel#1410

Merged
jonathanlab merged 1 commit intomainfrom
03-31-feat_code_new_diff_review_panel
Apr 1, 2026
Merged

feat(code): replace diff editor with unified review panel#1410
jonathanlab merged 1 commit intomainfrom
03-31-feat_code_new_diff_review_panel

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented Apr 1, 2026

Problem

  • current diff viewing experience is rough
  • we have a ton of cloud vs. local branching logic that shouldn't really be necessary

Changes

review panel split view deferred rendering
Screenshot 2026-03-31 at 6.04.35 PM.png

Screenshot 2026-03-31 at 8.16.04 PM.png
Screenshot 2026-03-31 at 8.16.13 PM.png

Screenshot 2026-03-31 at 8.16.20 PM.png
  • adds a new "review" panel that renders all diffs in one scrollable view
    • swaps codemirror for @pierre/diffs (diffs.com) - shadow dom rendering w/ web workers 🤓
    • defers large diffs (generated, deleted, just big)
  • removes a ton of codemirror stuff that is no longer needed
  • sorta-kinda-almost unifies the rendering for cloud and local diffs
    • local and cloud have seperate diff views, but both share as much as possible via ReviewShell
    • removed the separate diff and cloud-diff panel types/logic, uses a single review tab now

next

  • this is pretty fast because we're using web workers and only making a single git query to get the initial diff content for all files. HOWEVER it could be FASTER... i want to use diffs' built-in virtualization, but could not get it to work yet, so i'll follow up on that
  • [feat(code): replace in-chat diffs with pierre/diffs #1414] will probably swap the in-chat diff for this new view, then we will only need codemirror for full file viewing (and hopefully editing at some point...)
    • i asked the pierre team and they are planning to make diffs editable to some extent... 👀
  • adding a "comment" button per line in the diff that allows you to "ask for followups" w/ that file ref

How did you test this?

manually, a bunch

@adboio adboio mentioned this pull request Apr 1, 2026
@adboio adboio changed the base branch from chore/extract-git-utils to graphite-base/1410 April 1, 2026 02:22
@adboio adboio force-pushed the 03-31-feat_code_new_diff_review_panel branch from 96e8cf5 to 33c3903 Compare April 1, 2026 02:22
@adboio adboio force-pushed the 03-31-feat_code_new_diff_review_panel branch from 33c3903 to 001a277 Compare April 1, 2026 02:39
@adboio adboio changed the base branch from graphite-base/1410 to feat/add-diff-head-query April 1, 2026 02:39
@adboio adboio force-pushed the 03-31-feat_code_new_diff_review_panel branch 3 times, most recently from 797eceb to 82153f2 Compare April 1, 2026 03:14
@adboio adboio requested a review from a team April 1, 2026 03:18
@adboio adboio marked this pull request as ready for review April 1, 2026 03:18
@adboio adboio changed the title feat(code): new diff review panel feat(code): replace diff editor with unified review panel Apr 1, 2026
@adboio adboio force-pushed the feat/add-diff-head-query branch from a776aab to 5722c17 Compare April 1, 2026 07:10
@adboio adboio force-pushed the 03-31-feat_code_new_diff_review_panel branch from 82153f2 to 1ce1ac4 Compare April 1, 2026 07:11
@jonathanlab jonathanlab force-pushed the feat/add-diff-head-query branch from 5722c17 to e402b52 Compare April 1, 2026 10:28
@jonathanlab jonathanlab force-pushed the 03-31-feat_code_new_diff_review_panel branch from 1ce1ac4 to 39f63f8 Compare April 1, 2026 10:28
@jonathanlab jonathanlab force-pushed the feat/add-diff-head-query branch from e402b52 to d87b983 Compare April 1, 2026 10:36
@jonathanlab jonathanlab force-pushed the 03-31-feat_code_new_diff_review_panel branch from 39f63f8 to 2beccd1 Compare April 1, 2026 10:36
Copy link
Copy Markdown
Contributor

jonathanlab commented Apr 1, 2026

Merge activity

  • Apr 1, 10:51 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 1, 11:22 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 1, 11:27 AM UTC: @jonathanlab merged this pull request with Graphite.

jonathanlab pushed a commit that referenced this pull request Apr 1, 2026
## Problem

just breaking out some smaller pieces of a larger PR (#1410)

<!-- Who is this for and what problem does it solve? -->

<!-- Closes #ISSUE_ID -->

## Changes

shuffling around some code, making some shared utils

<!-- What did you change and why? -->

<!-- If there are frontend changes, include screenshots. -->

## How did you test this?

<!-- Describe what you tested -- manual steps, automated tests, or both. -->

<!-- If you're an agent, only list tests you actually ran. -->
@jonathanlab jonathanlab changed the base branch from feat/add-diff-head-query to graphite-base/1410 April 1, 2026 11:14
jonathanlab pushed a commit that referenced this pull request Apr 1, 2026
## Problem

in #1410 i am adding a new diff viewer

it needs to be very fast

we don't have a sufficiently-fast query yet

<!-- Who is this for and what problem does it solve? -->

<!-- Closes #ISSUE_ID -->

## Changes

adds a new query `getDiffHead` to slurp up the whole diff in one query

<!-- What did you change and why? -->

<!-- If there are frontend changes, include screenshots. -->

## How did you test this?

<!-- Describe what you tested -- manual steps, automated tests, or both. -->

<!-- If you're an agent, only list tests you actually ran. -->
@jonathanlab jonathanlab changed the base branch from graphite-base/1410 to main April 1, 2026 11:20
@jonathanlab jonathanlab force-pushed the 03-31-feat_code_new_diff_review_panel branch from 2beccd1 to 7fef082 Compare April 1, 2026 11:21
@jonathanlab jonathanlab merged commit e3e00f0 into main Apr 1, 2026
16 checks passed
@jonathanlab jonathanlab deleted the 03-31-feat_code_new_diff_review_panel branch April 1, 2026 11:27
jonathanlab pushed a commit that referenced this pull request Apr 1, 2026
## Problem

as part of #1410, i replaced codemirror with `@pierre/diffs` in the changed file diff views

but the in-chat diffs still use codemirror

<!-- Who is this for and what problem does it solve? -->

<!-- Closes #ISSUE_ID -->

## Changes

for consistency mostly, replacing the in-chat diff view with the same thing, and some related cleanup

<!-- What did you change and why? -->

<!-- If there are frontend changes, include screenshots. -->

## ![Screenshot 2026-03-31 at 8.39.16 PM.png](https://app.graphite.com/user-attachments/assets/38cf36eb-0f8f-449e-b332-7b7e145d50fe.png)

## How did you test this?

manually

<!-- Describe what you tested -- manual steps, automated tests, or both. -->

<!-- If you're an agent, only list tests you actually ran. -->
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.

2 participants