Repository navigation
Description
What happened
I asked the agent to "do a html mockup". The mockup rendered in the chat as an HTML render. When I select text inside it, the Cite option never appears, so I cannot quote anything from the visualization into the composer. Cite works fine on normal assistant text.
Diagnosis
HTML renders are their own timeline row (html-render), loaded through HtmlRenderFrame -> HtmlRenderDocument into a sandboxed iframe (sandbox="allow-scripts allow-forms", no allow-same-origin, so an opaque origin) in apps/web/src/components/files/BrowserDocumentFrame.tsx.
AssistantSelectionToolbar (apps/web/src/components/chat/AssistantSelectionToolbar.tsx:55-61) reads window.getSelection() of the host document and calls captureAssistantTextSelection, which only accepts selections inside an element with data-assistant-citation-source. A selection inside the iframe belongs to the frame's own document, so the host never sees it and the toolbar stays hidden.
The frame bridge already exchanges messages with the page over postMessage (theme, allowed/blocked shortcuts, link requests), but there is no message for text selection, so no path exists for Cite to receive it. The same applies to MCP app frames (McpAppFrame.tsx, same sandbox).
Keeping the sandbox makes sense; a possible direction is a selection message over the existing frame bridge (selected text plus a rect), with the host showing Cite and building a citation that points at the html-render row instead of an assistant message. Nothing on main touches this yet (checked recent commits to HtmlRenderFrame.tsx, BrowserDocumentFrame.tsx, AssistantSelectionToolbar.tsx).
Steps to reproduce
- In the desktop app, ask the agent: "do a html mockup".
- Wait for the HTML render to appear in the chat timeline.
- Drag to select some text inside the render.
- Expected: the Cite button appears, like it does for normal assistant text.
- Actual: no Cite button. Selecting normal assistant text in the same thread shows Cite as usual.
Version
0.1.8-nightly.20261107.4340 (desktop app, local server; triage CLI was 0.1.7)
Environment
Windows 11 Pro 10.0.26300 x64, Node v26.12.1, desktop app against local server
Evidence
No errors logged; this is a missing code path, not a crash.
BrowserDocumentFrame.tsx: <iframe sandbox="allow-scripts allow-forms" ...> (HTML render document)
AssistantSelectionToolbar.tsx:55-58:
const nativeSelection = window.getSelection();
const captured = captureAssistantTextSelection(viewport, nativeSelection);
const messageId = captured?.source.dataset.assistantCitationSource;
if (!captured || !messageId) { clear(); return; }Related issues
None are duplicates: #27666 (Cite slow to appear), #31782 (Cite to side chat), #29209 (unintended citations) all concern normal assistant text.
Fix applied or workaround
None applied. Workaround: copy text from the render with Ctrl+C and paste it into the composer, or ask the agent to restate key content as plain text so Cite works.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity
robin-liquidium commentedon Nov 15, 2026
Still reproduces on 0.1.10-nightly.20261113.4643 (Linux, web UI). Selecting any text inside an inline HTML render (
html_renderoutput) shows no Cite button, while the same selection in normal assistant text does. It matters most for long review pages rendered this way, where quoting a specific row back to the agent is the main way to give feedback.fix(web): Cite works on text selected inside HTML renders
makeavish commentedon Nov 21, 2026
+1
Pulsar-Programmer commentedon Nov 23, 2026
+1. I’d use Cite to quote a particular table cell or caption from an assistant-generated HTML report into my follow-up, then jump back to the render from the citation. The inline flow in #33106 would cover that. I’d also use it in the full-screen render dialog, where I tend to read wider reports.
GPT-6.2 Sol posting on behalf of Pulsar-Programmer.
logan-hunt commentedon Dec 2, 2026
+1 from a daily user on the nightly build. I read inline HTML renders in the chat all the time, and I keep wanting to cite a specific sentence or table row from one the same way I cite assistant text, so I can point the agent at exactly what I mean. Copy and paste works but loses the link back to the render. #33106 covers exactly this, and I'd love to see it land in an upcoming release.