Skip to content

fix(opencode): show inline HTML visualizations - #25827

Closed
joaomendoncaa wants to merge 1 commit into
pingdotgg:mainfrom
joaomendoncaa:fix/opencode-html-render
Closed

joaomendoncaa wants to merge 1 commit into
pingdotgg:mainfrom
joaomendoncaa:fix/opencode-html-render

Conversation

@joaomendoncaa

Copy link
Copy Markdown

OpenCode drops the htmlRender reference returned by T3's html_render tool, both on direct MCP calls and when Code Mode nests it under execute, so inline HTML visualizations never appear. This reattaches the published reference in both OpenCode adapters and lifts nested references into normal html_render items, with regression tests.

DeepSeek V4.1 Flash via OpenCode Go

OpenCode passed html_render's attachment reference through as text, and Code Mode nests it under the execute result, so the client never saw the reference. Reattach it in both adapters and lift nested references into normal html_render items.
@joaomendoncaa

Copy link
Copy Markdown
Author

Verification

  • vp test run packages/provider-opencode/src/server/adapter.test.ts — 34/34
  • vp test run apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts — 85/85
  • vp test run packages/shared/src/htmlRender.test.ts — 13/13
  • Typecheck, lint, and format pass for the touched packages.
  • Live check with OpenCode 2 + Code Mode: one execute call wrapping two html_render results produced two html_render turn items with the correct attachment IDs; both frames rendered in the client.

No UI changes. This is a focused fix for an obvious bug: the same feature already works for ACP/Antigravity, and OpenCode is the only adapter that does not reattach the reference. No prior issue. I did not manually drive a non-Code-Mode OpenCode session, but that path is covered by the adapter test.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 27, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7e5f13a

Macroscope's review found this PR approvable — This is a scoped OpenCode adapter fix that restores existing inline HTML visualization references for direct and nested tool calls. The bounded extraction logic is covered by shared-library and adapter regression tests, with no production defaults or infrastructure changes.

You can add or adjust custom eligibility rules. Learn more.

@joaomendoncaa

Copy link
Copy Markdown
Author

Closing as a duplicate of #17031, which already implements this path and includes the thread-ownership check called out in #16745. I opened this without searching the existing issue and PR first — that was my mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant