Repository navigation
feat(git): stage and unstage individual diff hunks - #11867
dcieslak19973 wants to merge 11 commits into
Conversation
Greptile SummaryThis PR adds per-hunk staging and unstaging from the diff gutter. The renderer sends only line ranges; the main process (and relay for SSH hosts) re-runs
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| src/shared/git-hunk-patch.ts | New pure module: parses single-file unified diffs, selects hunks by range, and rebuilds patches verbatim. Logic is clean; edge cases (zero-count insertion/deletion spans, no-newline markers) handled correctly and covered by tests. |
| src/shared/keyed-mutation-queue.ts | New serialization primitive. Promise chaining is correct — failed tasks settle the tail cleanly and don't wedge the key. Map cleanup logic (delete only if still the last tail) prevents stale-key growth. |
| src/main/git/source-control/staging.ts | Adds stageHunk/unstageHunk via applyHunkRangeToIndex; re-runs git diff then applies verbatim patch bytes over stdin. Guard ordering: stale-hunks fires before binary/rename, so binary files receive a misleading "stale" error (though the UI prevents reaching this path). Key function uses no separator between worktreePath and filePath, unlike the relay which uses a space separator. |
| src/relay/git-handler-worktree-change-operations.ts | Relay-side stageHunk/unstageHunk added with the same guard sequence as the main process. Per-file serialization via KeyedMutationQueue is correct. Uses a space separator in the queue key (" "), which is inconsistent with staging.ts (no separator), but both are self-contained instances. |
| src/renderer/src/components/editor/useDiffHunkStaging.ts | Monaco overlay button that follows the hovered changed line. Scroll handler correctly gates on lastDisplay === 'flex' (the fix for re-showing after mouse-leave). click/busy/disable handshake is correct; cleanup disposes all subscriptions and removes the button from the DOM. |
| src/renderer/src/components/editor/useDiffHunkStagingAction.ts | Computes stage/unstage config for the active diff tab. statusRefreshed flag (the previous-thread fix) is correctly implemented. resolveWorktreePath falls back safely when the worktree record is absent. |
| src/renderer/src/components/editor/diff-hunk-line-changes.ts | Translates Monaco ILineChange to DiffHunkRange. Zero-count convention (Monaco end=0 → count=0) matches unified-diff semantics exactly. Deletion anchoring on the modified-pane line is correct. |
| src/main/ipc/filesystem.ts | Two new IPC handlers (git:stageHunk, git:unstageHunk) follow the existing 4-step security guard pattern. Range parameters are not Zod-validated at the IPC layer (consistent with neighboring handlers), but are validated in the RPC path via GitHunkRangeParams. |
| src/main/runtime/rpc/methods/git-params.ts | GitHunkRangeParams extends GitFilePath with a Zod-validated range object; all four fields are constrained to non-negative integers, matching the DiffHunkRange type. |
| src/main/runtime/runtime-rpc/runtime-rpc-mobile-method-allowlist.ts | git.stageHunk and git.unstageHunk correctly added to the mobile allowlist. |
| src/renderer/src/web/preload-api/web-git-api.ts | Web preload correctly adds stageHunk/unstageHunk via the new mutateGitHunk helper, consistent with mutateGitPath for file-level operations. |
Sequence Diagram
sequenceDiagram
participant R as Renderer<br/>(useDiffHunkStagingAction)
participant IPC as IPC / RPC
participant M as Main Process<br/>(staging.ts)
participant Q as KeyedMutationQueue
participant G as git
R->>IPC: "stageHunk(worktreePath, filePath, {oldStart,oldCount,newStart,newCount})"
IPC->>M: validateGitRelativeFilePath + gitOptions
M->>Q: run(worktreePath+filePath, task)
Q->>M: serialize (per file)
M->>G: "diff -U0 --no-color --no-ext-diff -- <file>"
G-->>M: unified diff text
M->>M: "parseSingleFileUnifiedDiff()<br/>selectHunksForRange()<br/>buildPatchForHunks()"
M->>G: apply --cached --unidiff-zero - [stdin: patch]
G-->>M: exit 0
M-->>IPC: void
IPC-->>R: ok
R->>R: refreshGitStatusForWorktree()
R->>R: "shouldReloadDiffOnGitStatusChange()<br/>→ reloadContent() if needed"
Reviews (7): Last reviewed commit: "fix(git): unconditional hunk staging in ..." | Re-trigger Greptile
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds selective staging and unstaging for text diff hunks. The change parses current zero-context diffs, validates ranges, rejects stale, renamed, binary, and multi-file patches, and applies selected patches to the index. It exposes local, SSH, preload, web, RPC, and runtime APIs. The diff editor displays hunk actions, converts Monaco changes to unified-diff ranges, refreshes status, and reloads content after mutations. Tests cover patch parsing, range selection, index updates, insertions, deletions, concurrent mutations, and stale ranges. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/renderer/src/components/editor/useDiffHunkStagingAction.ts (1)
40-43: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winGet
worktreePathfrom the worktree record instead of slicingrelativePath.
activeFile.filePathis absolute, but the character slice produces a truncated root iffilePathandrelativePathdisagree on separators, casing, or normalization. Use theWorktree.pathlookup foractiveFile.worktreeId, or validate the suffix before slicing.Source: Coding guidelines
src/shared/git-hunk-patch.test.ts (1)
126-146: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a multi-hunk reconstruction test for
buildPatchForHunks.The only test here rebuilds a patch from one selected hunk.
buildPatchForHunksoutput is applied directly viagit apply --cachedin bothsrc/main/git/status.tsandsrc/relay/git-handler.ts. Add a test that selects two or more hunks and asserts the rebuilt patch preserves their original order, to guard the ordering contract this reconstruction depends on.✅ Proposed additional test
describe('buildPatchForHunks', () => { it('rebuilds a verbatim patch from the header and the selected hunk', () => { const parsed = parseSingleFileUnifiedDiff(MULTI_HUNK_PATCH) if (!parsed) { throw new Error('expected parsed patch') } const rebuilt = buildPatchForHunks(parsed, [parsed.hunks[1]]) expect(rebuilt).toBe( [ 'diff --git a/src/example.ts b/src/example.ts', 'index 1111111..2222222 100644', '--- a/src/example.ts', '+++ b/src/example.ts', '@@ -7,0 +8,2 @@ function two() {', '+ // inserted', '+ console.log("two")', '' ].join('\n') ) }) + + it('preserves hunk order when rebuilding a patch with multiple selected hunks', () => { + const parsed = parseSingleFileUnifiedDiff(MULTI_HUNK_PATCH) + if (!parsed) { + throw new Error('expected parsed patch') + } + const rebuilt = buildPatchForHunks(parsed, [parsed.hunks[0], parsed.hunks[2]]) + expect(rebuilt).toBe( + [ + 'diff --git a/src/example.ts b/src/example.ts', + 'index 1111111..2222222 100644', + '--- a/src/example.ts', + '+++ b/src/example.ts', + '@@ -2,1 +2,1 @@ function one() {', + '- return 1', + '+ return 100', + '@@ -12,2 +14,0 @@ function three() {', + '- // removed', + '- console.log("three")', + '' + ].join('\n') + ) + }) })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0fef92ed-1489-424d-92ec-cd56df62f199
📒 Files selected for processing (27)
src/main/git/status.tssrc/main/ipc/filesystem.tssrc/main/providers/git-provider-contract.tssrc/main/providers/ssh-git-provider.tssrc/main/runtime/orca-runtime-git.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/rpc/methods/git-params.tssrc/main/runtime/rpc/methods/git.tssrc/main/runtime/runtime-rpc.tssrc/preload/api-types.tssrc/preload/index.tssrc/relay/git-handler.test.tssrc/relay/git-handler.tssrc/renderer/src/assets/main.csssrc/renderer/src/components/editor/DiffViewer.tsxsrc/renderer/src/components/editor/EditorContent.tsxsrc/renderer/src/components/editor/diff-hunk-line-changes.test.tssrc/renderer/src/components/editor/diff-hunk-line-changes.tssrc/renderer/src/components/editor/diff-viewer-props.tssrc/renderer/src/components/editor/useDiffHunkStaging.tssrc/renderer/src/components/editor/useDiffHunkStagingAction.tssrc/renderer/src/components/editor/useDiffViewerFirstDiffAutoScroll.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/runtime/runtime-git-client.tssrc/renderer/src/web/web-preload-api.tssrc/shared/git-hunk-patch.test.tssrc/shared/git-hunk-patch.ts
…erialize hunk applies Review follow-ups on stablyai#11867. When refreshGitStatusForWorktree threw, the store kept its pre-apply entries. shouldReloadDiffOnGitStatusChange then read those stale entries, saw the file still in its area, and suppressed the explicit reload — while no status change had fired to trigger the automatic one. Staging the last hunk of a file left the diff visually unchanged until the next poll. Track whether the refresh landed and force the reload when it did not. Applying a hunk is read-diff-then-apply against the index, with no lock. Two overlapping requests for one file could have the second build its patch from a pre-apply diff. Serialize per worktree+file in both the main process and the relay; different files still apply concurrently. Note: git apply recovers from a stale patch on its own in the cases I could construct — it offset-searches for a modification hunk's `-` line, and it placed a stale zero-context insertion correctly too. So the relay test asserts the end state of concurrent requests rather than claiming to prove the ordering; KeyedMutationQueue's unit tests carry that contract. Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/editor/useDiffHunkStaging.test.tsx (1)
74-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winShorten this test comment.
Keep the rationale, but reduce it to one concise line.
As per coding guidelines: “Comments must be concise, limited to non-obvious information, and preferably one line.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8da8f215-ab5c-4e38-ac6e-3a7070391568
📒 Files selected for processing (2)
src/renderer/src/components/editor/useDiffHunkStaging.test.tsxsrc/renderer/src/components/editor/useDiffHunkStaging.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/components/editor/useDiffHunkStaging.ts
39c26c3 to
6c06b44
Compare
6c06b44 to
375de69
Compare
375de69 to
e984e29
Compare
e984e29 to
6dc8539
Compare
6dc8539 to
04083bc
Compare
04083bc to
6453b9b
Compare
…erialize hunk applies Review follow-ups on stablyai#11867. When refreshGitStatusForWorktree threw, the store kept its pre-apply entries. shouldReloadDiffOnGitStatusChange then read those stale entries, saw the file still in its area, and suppressed the explicit reload — while no status change had fired to trigger the automatic one. Staging the last hunk of a file left the diff visually unchanged until the next poll. Track whether the refresh landed and force the reload when it did not. Applying a hunk is read-diff-then-apply against the index, with no lock. Two overlapping requests for one file could have the second build its patch from a pre-apply diff. Serialize per worktree+file in both the main process and the relay; different files still apply concurrently. Note: git apply recovers from a stale patch on its own in the cases I could construct — it offset-searches for a modification hunk's `-` line, and it placed a stale zero-context insertion correctly too. So the relay test asserts the end state of concurrent requests rather than claiming to prove the ordering; KeyedMutationQueue's unit tests carry that contract. Co-Authored-By: Claude Opus 5 <[email protected]>
6453b9b to
9264125
Compare
|
Upstream https://github.com/dcieslak19973/orca/actions/runs/31218060402 — all 43 jobs green: typecheck, static analysis, packaging (linux + windows), Git compatibility, shell contracts, cross-version wire compatibility, and all 16 test shards. This run also caught a real defect that upstream Posting so the suite result is visible without needing the approval click first. |
466b134 to
cca6c77
Compare
b9c4fc1 to
b618e83
Compare
b618e83 to
9a278d1
Compare
9a278d1 to
25be1a8
Compare
Pure code move, no behavior change. DiffViewer is near the 400-line ceiling and the next feature would push it over; this effect is self-contained and reads better named. Co-Authored-By: Claude Opus 5 <[email protected]>
Hovering a changed line in an unstaged or staged diff now offers a stage/unstage action for just that hunk, next to the existing comment affordance. Previously the only granularity was the whole file. The renderer sends only the hunk's line ranges. Main (and the relay, for SSH hosts) re-runs `git diff -U0`, matches the hunk by range, and feeds git's own patch text back through `git apply --cached [--reverse] --unidiff-zero`. Applying git's bytes verbatim rather than synthesizing a patch keeps EOF-newline and CRLF handling git's problem. Untracked, renamed, and binary paths are excluded (no index entry to patch). A range that no longer matches — the file moved on since the diff was rendered — is refused with a refresh hint instead of a partial apply. Co-Authored-By: Claude Opus 5 <[email protected]>
…erialize hunk applies Review follow-ups on stablyai#11867. When refreshGitStatusForWorktree threw, the store kept its pre-apply entries. shouldReloadDiffOnGitStatusChange then read those stale entries, saw the file still in its area, and suppressed the explicit reload — while no status change had fired to trigger the automatic one. Staging the last hunk of a file left the diff visually unchanged until the next poll. Track whether the refresh landed and force the reload when it did not. Applying a hunk is read-diff-then-apply against the index, with no lock. Two overlapping requests for one file could have the second build its patch from a pre-apply diff. Serialize per worktree+file in both the main process and the relay; different files still apply concurrently. Note: git apply recovers from a stale patch on its own in the cases I could construct — it offset-searches for a modification hunk's `-` line, and it placed a stale zero-context insertion correctly too. So the relay test asserts the end state of concurrent requests rather than claiming to prove the ordering; KeyedMutationQueue's unit tests carry that contract. Co-Authored-By: Claude Opus 5 <[email protected]>
`gitStatusByWorktree` is Record<string, GitStatusEntry[]>, but the post-apply reload check reached for `.entries` on it. That resolves to Array.prototype.entries — a function — so it typechecks and then throws "gitStatusEntries.some is not a function" inside shouldReloadDiffOnGitStatusChange, after the hunk had already been applied. The throw surfaced only as a rejected promise the click handler never caught, so staging a hunk appeared to do nothing. Adds a catch at the call site so a future defect here is logged rather than swallowed, plus hook tests that exercise the real store shape; the post-apply test fails with the original `.entries` access restored. Co-Authored-By: Claude Opus 5 <[email protected]>
…nter leaves onDidScrollChange repositioned whenever hoverLineRef held a line, and positionAtLine ends by showing the button. Mouse-leave only hid it without clearing the ref, so any later scroll — Page Down, a scrollbar drag, or a programmatic reveal — popped the button back up with no cursor near it. Gate the scroll reposition on the button already being visible rather than clearing hoverLineRef: the ref deliberately survives mouse-leave so a click in the gap between the content area and the button still resolves to a line, the same reason useDiffCommentDecorator keeps it. Co-Authored-By: Claude Opus 5 <[email protected]>
Optional chaining on the registered listeners let both scroll tests pass even if the hook never subscribed to onDidScrollChange, so neither could fail for the reason it exists. Assert registration once in setup and hand back required callbacks. The follow-the-line test also never moved the viewport, so it only proved the button stayed visible. Drive getScrollTop through a mutable stub and assert the button moves by exactly the scroll delta. Co-Authored-By: Claude Opus 5 <[email protected]>
Writing a ref during render is impure and double-applies under StrictMode. The ref is only read from deferred DOM handlers, so a commit-time sync is soon enough, and declaring the effect above the main one keeps it first on mount. Caught by check:react-doctor:changed.
… record Slicing filePath by relativePath length produces a truncated root whenever the two disagree on separators, casing, or normalization. Prefer Worktree.path and keep the slice only as a fallback that validates the suffix first. Co-Authored-By: Claude Opus 5 <[email protected]>
The shared/types barrel was removed upstream (stablyai#14447).
…ntract test Post-rebase fixups for the hunk-staging merge (PR stablyai#11867): - git-handler.ts kept a stray 'hunkApplyQueue' field from the pre-refactor file after a silent context-only merge; the real queue lives in GitHandlerWorktreeChangeOperations now. Remove the dead field so GitHandler can construct again. - runtime-git-client-api-contract.test.ts enumerates the stable renderer facade; add the new stageRuntimeGitHunk/unstageRuntimeGitHunk exports.
…ission tier for hunk IPC Review follow-ups on the PR stablyai#11867 rebase: - EditorDiffFileSurface passed hunkStaging only when the diff was directly editable (isEditable, i.e. the unstaged view), so a staged diff never got an unstage-hunk action. Pass hunkStaging unconditionally; DiffViewer already gates its click affordance on hunkStaging.scope, not editable. - git:stageHunk / git:unstageHunk IPC handlers omitted admissionTier: 'interactive', unlike every other click-driven git mutation handler (stage, unstage, discard, bulkStage, ...). Add it so hunk staging shares the same admission-control lane. - Removed leftover doubled/trailing blank lines in git-handler.ts and web-preload-api.ts left over from resolving whole-file rebase conflicts. Added coverage: EditorDiffFileSurface.test.tsx asserts hunkStaging reaches DiffViewer for both staged and unstaged diffSource; filesystem-git-status- staging.test.ts asserts the interactive admission tier on both hunk IPC handlers.
25be1a8 to
e65dd0b
Compare
|
Closing this one for now. Can reopen if we want to pick hunk-level staging back up. |
What: Stage or unstage a single hunk from the diff gutter — the per-chunk staging asked for in #334.
Risk: Index-only: patch bytes come verbatim from
git diff -U0and apply viagit apply --cached; nothing is synthesized, per-file ops serialized. Greptile: 5/5 "Safe to merge".State: Rebased on
maintoday (0 behind, 0 conflicts); all review-bot threads resolved.Addresses #334.
ELI5
Staging changes for a commit has been all-or-nothing per file; committing part of a file meant dropping to the command line. Now hovering a changed chunk in a diff shows a small button to stage — or unstage — just that piece, right in Orca. Git itself builds and applies the patch, so edge cases like missing final newlines and Windows line endings stay correct. Untracked, renamed, and binary files remain whole-file only, and outdated chunks are refused with a refresh hint instead of being misapplied.
Summary
Hovering a changed line in an unstaged or staged diff now offers a stage/unstage action for just that hunk, sitting next to the existing "add comment" affordance in the glyph margin. Previously the only staging granularity was the whole file.
The renderer sends only the hunk's line ranges — no patch text crosses the boundary. Main (and the relay, for SSH hosts) re-runs
git diff -U0for that path, matches the hunk by range, and feeds git's own patch bytes back throughgit apply --cached [--reverse] --unidiff-zero. Applying git's output verbatim rather than synthesizing a patch from the two Monaco buffers is the central design decision: it keeps trailing-newline, no-newline-at-EOF, and CRLF handling entirely inside git, which is where the classic partial-staging bugs live.src/shared/git-hunk-patch.tsis a pure, unit-tested module (parse a single-file unified diff, select hunks intersecting a range, rebuild a patch from the file header plus those hunks verbatim), shared by main and the relay so both hosts apply identical semantics.Scope and guards:
git apply --cachedto patch; whole-file staging already covers them.Commits:
refactor(editor)— extracts the first-diff auto-scroll effect out ofDiffViewerintouseDiffViewerFirstDiffAutoScroll. Pure code move, no behavior change;DiffViewerwas near the 400-line ceiling and the feature would have pushed it over. Split out so it reviews independently.feat(git)— the feature.fix(git)— review follow-ups (see AI Review Report).Screenshots
New UI: a single 18x18 button in the diff glyph margin, appearing on hover of a changed line, immediately right of the existing comment "+" (
left: 26pxvs4px). It reuses that button's exact visual treatment — this PR refactors both into one shared CSS rule with onlyleftdiffering, so the two affordances cannot drift. Icon is an arrow-into-bar (stage) or arrow-out-of-bar (unstage); disabled at 50% opacity while an apply is in flight.Testing
pnpm lintpnpm typecheckpnpm test(546 files; see Notes for three pre-existing Windows-only failures)pnpm build— not run locally; relies on CIFive real-git integration tests in
git-handler.test.ts: partial stage, partial unstage, an insertion hunk plus an EOF hunk in a file with no trailing newline, stale-range rejection, and concurrent same-file requests.git-hunk-patch.test.ts(8) covers parsing, range selection including zero-count insertion/deletion spans, and multi-hunk reconstruction order.diff-hunk-line-changes.test.ts(4) covers the MonacoILineChangeto unified-diff-span mapping.keyed-mutation-queue.test.ts(4) covers the serialization contract.AI Review Report
Reviewed with Claude Code, plus the CodeRabbit and Greptile passes on this PR. Risks checked: index corruption from patch application, staleness between diff render and apply, concurrency on the same file, host parity (local/WSL/SSH/web), and guard ordering for untracked/renamed/binary paths.
Changed as a result:
refreshGitStatusForWorktreeleaves pre-apply entries in the store,shouldReloadDiffOnGitStatusChangereads those stale entries and returnstrue, which suppressed the explicitreloadContent— while no status change had fired to trigger the automatic one. Staging the last hunk left the tab visually unchanged until the next poll. Now tracks whether the refresh landed and forces the reload when it did not.KeyedMutationQueue(shared) and serialized per worktree+file in both the main process and the relay; different files still apply concurrently. Honest caveat: I could not construct a case where the unserialized version actually corrupts.git applyoffset-searches for a modification hunk's removal line, and in a direct experiment it also placed a stale zero-context insertion correctly. So the relay concurrency test asserts the end state of overlapping requests rather than claiming to prove ordering;KeyedMutationQueue's unit tests carry that contract. The serialization is defense-in-depth for a read-modify-write on shared state, not a fix for a demonstrated corruption.git applyrejects out-of-order hunks, so the ordering contract is worth pinning.Verified and not changed:
useDiffCommentDecoratorhas exactly the same limitation (hover-gated, mousedown-only, not focusable), so a keyboard path should be designed once for both rather than bolted onto the newer one. The button is not merely undiscoverable by keyboard — it isdisplay: noneuntil hover, so making it tabbable means changing when it renders. Happy to file a follow-up covering both buttons.innerHTMLassignment (ast-grep, CWE-79). False positive: the assigned values are two hardcoded module constants with no interpolation and no user input, matching how the adjacent comment button builds its icon.worktreePathby slicingrelativePathofffilePath(CodeRabbit). Left as-is for consistency:useEditorPanelContentState.tsderives the worktree path with the identical slice for the diff read that this action pairs with. Changing one and not the other would be worse than either. Worth a follow-up that moves both to aWorktree.pathlookup.Cross-platform: the CRLF/EOF question is the main platform risk and is handled by never synthesizing patch text — git's own bytes round-trip. A regression test covers a file with no trailing newline. Paths use
literalPathspecon both hosts, matching the existing stage/unstage calls. No new shortcuts or labels. WSL routing goes through the existingGitRuntimeOptions/gitOptionsForWorktreeplumbing; SSH through the relay, which was extended in parallel.Security Audit
gitExecFileAsync/execFilewith argument arrays, as the surrounding git code does. Patch text goes over stdin, never as an argument, so it cannot be re-parsed as flags.resolveRegisteredWorktreePath,validateGitRelativeFilePath,getLocalGitOptionsForRegisteredWorktree— identical togit:stage/git:unstage. Pathspecs are literal-quoted.git:stageHunk,git:unstageHunk) and two runtime RPC methods, added to the allowlist. Range params are zod-validated as non-negative integers. The renderer sends only integers and a path; it cannot supply arbitrary patch content for the host to apply — the patch is always regenerated host-side from git.git apply --cachedtouches only the index. It never writes the working tree, and--reverseis the only other mode.Notes
Version-skewed relays return JSON-RPC
-32601for the new methods, matching the documented pattern for relay-side additions.Three test failures reproduce on a pristine checkout of
mainon this Windows machine and are unrelated to this PR:monaco-content-sync.undo-history.test.tsand both cases innode-markdown-document-discovery.test.ts(its fixture needs symlink creation, which requires elevation on Windows).🤖 Generated with Claude Code