Skip to content

Add OpenCode v2 native review panel and model tool - #1025

Draft
sidkmenon wants to merge 9 commits into
codex/diffr-pifrom
codex/diffr-opencode
Draft

sidkmenon wants to merge 9 commits into
codex/diffr-pifrom
codex/diffr-opencode

Conversation

@sidkmenon

@sidkmenon sidkmenon commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Add a Diffr plugin for OpenCode v2.0.25 using the native session.panel API. Review opens beside the transcript at the host's default half width, with a draggable divider and fullscreen toggle. OpenCode 1.x is unsupported; no sidebar or overlay fallback remains.

The server registers native tool diffr_open. A namespaced plugin RPC event reaches the matching visible terminal, which claims a private local reply socket and acknowledges the loaded comparison or an error. Cancellation, timeout, and session/directory checks prevent unrelated terminals from handling the request.

Selected code appends to the originating unsent draft through the captured public OpenTUI Textarea API. Stable row renderables preserve mouse capture across redraws, so multi-row drags retain both diff sides instead of stopping after the first move. Fullscreen transfer hides the panel and returns focus to chat; reopening preserves review state.

Validation: six behavioral tests pass, including real OpenTUI multi-row selection in unified/split layouts, both drag directions, redraws between events, and preserved-draft/fullscreen behavior. Typecheck passes. Real Ghostty with OpenCode 2.0.25 exercised model open, native split/fullscreen, folds/files/viewed marks, a whole-loop mouse drag, reverse cross-side selection, and Enter into an unsent draft.

Limits: local macOS/Linux transport only; no standalone MCP server; low-level editor capture needs host-version checks. The host forces fullscreen at 80 available columns or fewer. Real Add to chat button and divider dragging remain unverified. The isolated v2 runtime is used because a system Homebrew upgrade requires newer Command Line Tools.

Base: #1024. Next: Herdr #1026.


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

@sidkmenon
sidkmenon added this pull request to stack #1028 October 8, 2026 10:02
@sidkmenon sidkmenon changed the title codex/diffr opencode Add OpenCode sidebar and fullscreen Diffr plugin Oct 8, 2026
@sidkmenon
sidkmenon force-pushed the codex/diffr-opencode branch from b88037d to 80206bf Compare October 8, 2026 17:04
@sidkmenon sidkmenon changed the title Add OpenCode sidebar and fullscreen Diffr plugin Add OpenCode v2 native review panel and model tool Oct 8, 2026
@sidkmenon
sidkmenon force-pushed the codex/diffr-opencode branch 2 times, most recently from 9d0727e to 46a978a Compare October 8, 2026 18:22
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: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11ab9-c68e-7c52-916b-e1b0123e302f
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: a7af3b88-3bb7-48a2-ae20-7626a83628a1
Agent-Session: 01a11ab9-c68e-7c52-916b-e1b0123e302f
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: 01a11c34-48e4-7ec1-bb72-2c496acb90dc
Agent-Session: 01a11c3d-70b4-7df1-be1a-f0e12840fadf
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
Agent-Session: 01a11aca-5007-7b80-ad35-c0a0f746a05d
Agent-Session: ec5d2c35-3045-44f3-9c41-ba4378797c8e
@sidkmenon
sidkmenon force-pushed the codex/diffr-opencode branch from 46a978a to d89f050 Compare October 8, 2026 19:09

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