Skip to content

feat(review): editable Files Changed panel with CM6 + in-place updates + sidebar fixes - #774

Merged
jeonghun-jj-lee merged 1 commit into
mainfrom
amico/issue-766-editable-files-changed
Sep 5, 2026
Merged

feat(review): editable Files Changed panel with CM6 + in-place updates + sidebar fixes#774
jeonghun-jj-lee merged 1 commit into
mainfrom
amico/issue-766-editable-files-changed

Conversation

@jeonghun-jj-lee

@jeonghun-jj-lee jeonghun-jj-lee commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the read-only @pierre/diffs renderer in Files Changed with an editable CodeMirror 6 diff view, plus sidebar UX fixes and a scroll-stable in-place update architecture.

Editable diff view

  • EditableDiffView CM6 component — split/unified modes, syntax-highlighted, editable modified pane
  • In-place document updates via minimalChanges() dispatch — no destroy/recreate on content changes, scroll stays put
  • In-place readOnly toggle via Compartment.reconfigure() — no scroll jump on agent start/end
  • Auto-save on edit, revert to agent version, concurrent edit detection
  • Markdown preview toggle for .md files
  • File-picker dropdown with horizontal scroll for long paths

Lock editing while agent is busy

  • Yellow lock chip (Harmoniqs accent) centered at top of diff view
  • readOnly wired through isAgentBusy prop chain
  • Programmatic updates go through even when readOnly (custom transactionFilter removed; CM6 built-in facets sufficient)

Sidebar fixes

  • Ghost entries for deleted files with strikethrough + restore context menu
  • Click suppression for ghost entries, post-restore click fix
  • Drag auto-scroll with requestAnimationFrame loop
  • 300ms filesystem watcher debounce to prevent flickering
  • retainContextWhenHidden on webview provider
  • Redundant section-order render guard

Diff pipeline

  • mergeServerAndToolDiffs in accumulate-diffs.ts with projectPrefix
  • applyRenames for file-move tracking
  • Write tool filediff metadata (diffLines computation)
  • diff_version bump on tool completion (in fork)
  • Cross-project file visibility fix

Type fixes

  • SessionReviewDiffStyle widened to include "preview"
  • process.env.HOME type narrowing

Test coverage

  • 61 fork-side tests (editable-diff-view: minimalChanges, updateOriginal, updateModified, setReadOnly, Compartment)
  • 2414 amicode tests pass (0 failures)

Companion PR

opencode fork: harmoniqs/opencode — feat/issue-766-editable-files-changed branch (25 commits on local/amicode)

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: b78d047a-6888-4d43-abbb-33de0fe1ef1d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the amico/issue-766-editable-files-changed branch from 5660433 to 0ada4a5 Compare September 5, 2026 20:28
@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review September 5, 2026 20:32
@jeonghun-jj-lee jeonghun-jj-lee changed the title feat(review): Editable Files Changed panel with CodeMirror 6 + edit-to-context + markdown preview feat(review): editable Files Changed panel with CM6 + in-place updates + sidebar fixes Sep 5, 2026
@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the amico/issue-766-editable-files-changed branch 2 times, most recently from d3d7cf8 to 0a153af Compare September 5, 2026 20:45
…s + sidebar fixes

Editable diff view:
- CodeMirror 6 split/unified diff editor (EditableDiffView component)
- In-place document updates via minimalChanges dispatch (no destroy/recreate)
- In-place readOnly toggle via Compartment.reconfigure (no scroll jump)
- Auto-save on edit, revert to agent version, concurrent edit detection
- Markdown preview toggle for .md files
- File-picker dropdown with horizontal scroll for long paths

Lock editing while agent is busy:
- Yellow lock chip (Harmoniqs accent) centered at top of diff view
- readOnly wired through isAgentBusy prop chain
- Programmatic updates go through even when readOnly (transactionFilter removed)

Sidebar fixes:
- Ghost entries for deleted files with strikethrough + restore context menu
- Click suppression for ghost entries, post-restore click fix
- Drag auto-scroll with requestAnimationFrame loop
- 300ms filesystem watcher debounce to prevent flickering
- retainContextWhenHidden on webview provider
- Redundant section-order render guard

Diff pipeline:
- mergeServerAndToolDiffs in accumulate-diffs.ts with projectPrefix
- applyRenames for file-move tracking
- Write tool filediff metadata (diffLines computation)
- diff_version bump on tool completion (in fork)
- Cross-project file visibility fix

Type fixes:
- SessionReviewDiffStyle widened to include 'preview'
- SnapshotFileDiff type relaxation for diff prop
- DiffStyle aligned with SessionReviewDiffStyle
- process.env.HOME type narrowing

61 fork-side tests, 2252 amicode tests pass.
@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the amico/issue-766-editable-files-changed branch from 0a153af to 91f7f88 Compare September 5, 2026 20:50
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 6afdb9d into main Sep 5, 2026
9 checks passed
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.

1 participant