Skip to content

feat(code): replace in-chat diffs with pierre/diffs#1414

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

feat(code): replace in-chat diffs with pierre/diffs#1414
jonathanlab merged 1 commit intomainfrom
03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented 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

Changes

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

Screenshot 2026-03-31 at 8.39.16 PM.png

How did you test this?

manually

@adboio adboio requested a review from a team April 1, 2026 03:40
@adboio adboio marked this pull request as ready for review April 1, 2026 03:40
@adboio adboio force-pushed the 03-31-feat_code_new_diff_review_panel branch from 82153f2 to 1ce1ac4 Compare April 1, 2026 07:11
@adboio adboio force-pushed the 03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs branch from 2b4b7a1 to 873c4d1 Compare April 1, 2026 07:12
@jonathanlab jonathanlab force-pushed the 03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs branch from 873c4d1 to 5c36ec0 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 03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs branch from 5c36ec0 to c1a60a4 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:29 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 1, 11:34 AM UTC: @jonathanlab merged this pull request with Graphite.

@jonathanlab jonathanlab changed the base branch from 03-31-feat_code_new_diff_review_panel to graphite-base/1414 April 1, 2026 11:21
jonathanlab pushed a commit that referenced this pull request 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

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

<!-- Closes #ISSUE_ID -->

## Changes

| review panel | split view | deferred rendering |
| --- | --- | --- |
| ![Screenshot 2026-03-31 at 6.04.35 PM.png](https://app.graphite.com/user-attachments/assets/49ba2693-6872-45c6-a1b9-841fd103d928.png)<br><br> | ![Screenshot 2026-03-31 at 8.16.04 PM.png](https://app.graphite.com/user-attachments/assets/7cbcbe6f-c855-4fc5-bb11-2b7616506d76.png)<br> | ![Screenshot 2026-03-31 at 8.16.13 PM.png](https://app.graphite.com/user-attachments/assets/c0d09315-45d5-4b9b-9040-b54564c5e0ac.png)<br><br>![Screenshot 2026-03-31 at 8.16.20 PM.png](https://app.graphite.com/user-attachments/assets/51ee75a8-892f-4c91-9033-666b466bf700.png)<br> |
|  |  |  |

- adds a new "review" panel that renders all diffs in one scrollable view
    - swaps codemirror for `@pierre/diffs` ([diffs.com](https://diffs.com/)) - shadow dom rendering w/ [web workers](https://diffs.com/docs#worker-pool) 🤓
    - 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](https://diffs.com/docs#virtualization), but could not get it to work yet, so i'll follow up on that
- [#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

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

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

## How did you test this?

manually, a bunch

<!-- 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/1414 to main April 1, 2026 11:27
@jonathanlab jonathanlab force-pushed the 03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs branch from c1a60a4 to 75d4dcd Compare April 1, 2026 11:28
@jonathanlab jonathanlab merged commit 9aea909 into main Apr 1, 2026
16 checks passed
@jonathanlab jonathanlab deleted the 03-31-feat_code_replace_in-chat_diffs_with_pierre_diffs branch April 1, 2026 11:34
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