Skip to content

Extract the shared Diffr pane for agent consumers - #1023

Draft
sidkmenon wants to merge 5 commits into
sm/cc-modfrom
codex/diffr-consumer-core
Draft

sidkmenon wants to merge 5 commits into
sm/cc-modfrom
codex/diffr-consumer-core

Conversation

@sidkmenon

@sidkmenon sidkmenon commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Extract Claude's frame renderer, selection behavior, and input protocol into @diffr/consumer, with thin Claude reexports. All consumers share folding, files view, viewed marks, and selection handling.

Send selected code as standard Git patches with explicit base/head snapshot identities, preserving full revision SHAs and available file blob IDs. Claude retains clickable L/R draft anchors backed by that same model context; plain-text clients receive the patch directly. No L/R legend or Markdown fence is added.

Add a subprocess owner, pointer/key normalization, and a bounded model-open acknowledgement that reports producer errors and cancellation instead of premature success. The NDJSON wire format is unchanged.

Validation: 153 consumer tests and all seven Claude plugin runtime tests pass. Git applies generated patches, including quoted paths and missing final newlines. Pi's production bundle was exercised in Ghostty with a real Git comparison and mouse selection into the unsent draft. Claude's committed bundle is rebuilt.

Base: Claude implementation #1019. Next: Pi #1024.


Stack: #1023 → #1024 → #1025 → #1026 → #1027 (above #1019).

Agent-Session: fb96350b-c19e-48f0-b364-31e9ad2b72f4
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11ab9-c68e-7c52-916b-e1b0123e302f
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11ab9-c68e-7c52-916b-e1b0123e302f
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11ab9-c68e-7c52-916b-e1b0123e302f
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e

This branch has not been deployed

No deployments
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