Commit e3e00f0
authored
feat(code): replace diff editor with unified review panel (#1410)
## 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 |
| --- | --- | --- |
| <br><br> | <br> | <br><br><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. -->1 parent 41d47e2 commit e3e00f0
32 files changed
Lines changed: 1667 additions & 1952 deletions
File tree
- apps/code
- src
- renderer/features
- code-editor
- components
- hooks
- stores
- code-review
- components
- stores
- git-interaction/hooks
- panels
- components
- constants
- hooks
- store
- task-detail
- components
- hooks
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 0 additions & 181 deletions
This file was deleted.
0 commit comments