Skip to content

fix(agent): make opencode v2 /acp status panel visible in the TUI - #878

Merged
ranxianglei merged 1 commit into
2026-09-17_opencode-v2-acp-no-wakefrom
2026-09-17_opencode-v2-acp-visible-panel
Sep 17, 2026
Merged

ranxianglei merged 1 commit into
2026-09-17_opencode-v2-acp-no-wakefrom
2026-09-17_opencode-v2-acp-visible-panel

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Stacked: base is the no-wake fix branch (#875, itself on #850).

Fixes #877.

The panel was carried only in the synthetic message's text. OpenCode V2's TUI renders a synthetic message as a Notice row only when its display text fits the timeline cap (~1KB; packages/app/src/session/timeline/message-timeline.tsx canRenderImmediately), so real panels were silently dropped - users saw nothing after /acp.

The panel now goes to description (verbatim under 1024 chars; leading lines + [panel truncated] above) while the model-facing body is an inert one-liner (V2_SYNTHETIC_TEXT) so context never repeats panel content.

Verified live in a v2.0.4 TUI: short panel renders fully as the notice row; a >1.5KB panel renders its leading lines plus the marker; no model turn is triggered (pairs with the no-wake fix).

Tests: existing /acp assertions migrated to description + inert-body asserts; new truncation test with a 1500-char fake panel. Typecheck clean; opencode-v2 suite 17/17; full npm test green.

Merge order: #850 -> #875 -> this.

The /acp panel was carried only in the synthetic message's text. OpenCode V2's
TUI renders a synthetic message as a Notice row only when its display text fits
the timeline cap (~1KB; message-timeline.tsx canRenderImmediately), so real
panels were silently dropped: users saw nothing after /acp.

The panel now goes to description (verbatim under 1024 chars, leading lines +
[panel truncated] above) and the model-facing body is an inert one-line note
(V2_SYNTHETIC_TEXT) so the model context never repeats panel content.

Verified live in a v2.0.4 TUI: short panels render fully as the notice row,
a >1.5KB panel renders its leading lines plus the marker; no model turn is
triggered (pairs with the no-wake fix #879).
@ranxianglei
ranxianglei merged commit 40c4970 into 2026-09-17_opencode-v2-acp-no-wake Sep 17, 2026
1 check passed
ranxianglei pushed a commit that referenced this pull request Sep 17, 2026
PR #878 was merged only into 2026-09-17_opencode-v2-acp-no-wake (tip 40c4970), so the #850 head was missing the panel-visibility fix. This fold makes 2026-09-15_opencode-native-plugin carry the complete /acp stack: register (11a82d7) + harden (f857ff1) + no-wake (d6d60f8, #875) + visible panel (304110a, #878).
@ranxianglei
ranxianglei deleted the 2026-09-17_opencode-v2-acp-visible-panel branch October 15, 2026 05:32
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