You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
planning interview surface: HTML visuals that need JavaScript render blank #4702
On the /planning:interview page surface (plugins/planning/surface/, at a3a9c7d), an html visual whose content is built by a script shows an empty panel, with no message saying why. Seen 2026-09-27 attaching a self-contained design mockup (format: html, file: in the data dir) to a question: the file loaded through /api/visual-file without error, and the Visuals tab showed a blank frame.
Cause
visualBody() renders html (and svg) into <iframe sandbox=""> with srcdoc (index.html around lines 1106-1149 and 1211-1212). An empty sandbox attribute disables scripts, so any visual that builds its DOM in JavaScript (interactive prototypes, chart libraries inlined into the file, variant switchers) renders nothing. Static HTML still works.
Proposed fix
Pick one:
Add allow-scripts to the sandbox, and never allow-same-origin. The frame stays an opaque origin: it cannot read the page's token, cookies, or DOM, and the page CSP (connect-src 'self', frame-src 'self' about:) still applies to the srcdoc document. This makes prototype visuals work, which the prototype skills produce.
Keep scripts off and say so: when an html visual contains <script, show a one-line notice ("this visual needs JavaScript, which the page does not run") plus an "Open in a new tab" link served from /api/visual-file as a download or text/plain, so the user is not left with a blank panel.
Either way, document in context/surface.md "Visuals" that html visuals run with or without scripts, so skills know whether to attach a screenshot instead.
Workaround used
Rendered the mockup's variants to PNG with headless Chromium and attached them as image visuals.
Acceptance
An html visual containing a script either runs in an opaque-origin sandbox or shows an explicit notice, never a silent blank.
A test in plugins/planning/surface/tests covers the chosen behavior.
Operator feedback: the Visuals panel needs a rework, not only the script fix
Reported 2026-09-27 while choosing between dashboard design mockups on the page. In the operator's words, the visuals "are not working, they're not organized well, and they're not named well", and the operator fell back to opening the mockups directly in the browser.
Concrete problems seen in that session, beyond the blank script-driven HTML above:
No way to replace or remove a visual. Re-declaring an id is refused ("a visual needs a new id"), so the two blank HTML visuals stayed listed beside their screenshot replacements, and the only fix was a note telling the user to skip them.
No grouping. Fourteen screenshots attached to one question render as one flat tab list; there is no way to group "direction 1 / 2 / 3" or "round 1 / round 2", or to mark one as the primary view.
Naming. Tabs show the raw title truncated; nothing distinguishes variants at a glance, and ids leak where titles are long.
No comparison. Choosing between design directions needs side-by-side or quick flip (keyboard arrows, light/dark pairs); the panel shows one at a time behind tabs.
No "open full size / open in browser". An image or HTML visual cannot be opened outside the fly-out panel.
Suggested scope for the rework
Add replace and archive for visuals (keyed by id), mirroring questions.
Let visuals carry a group (and order), rendered as grouped tabs or a gallery, with one marked primary.
A gallery mode for image sets: thumbnails, arrow-key flip, side-by-side compare of two.
An "open in new tab" action per visual.
Decide the script rule from the first comment and document it in context/surface.md.
From the 2026-09-29 audit of the Cursor run. The operator's Visuals-panel rework request (comment of 2026-09-27) had no tracker of its own and the issue closed. Filed as #5331 with acceptance derived from that comment. Nothing implemented.
Activity
kyle-sexton commentedon Sep 27, 2026
Operator feedback: the Visuals panel needs a rework, not only the script fix
Reported 2026-09-27 while choosing between dashboard design mockups on the page. In the operator's words, the visuals "are not working, they're not organized well, and they're not named well", and the operator fell back to opening the mockups directly in the browser.
Concrete problems seen in that session, beyond the blank script-driven HTML above:
titletruncated; nothing distinguishes variants at a glance, and ids leak where titles are long.Suggested scope for the rework
replaceandarchivefor visuals (keyed by id), mirroring questions.group(and order), rendered as grouped tabs or a gallery, with one marked primary.context/surface.md.fix(planning): run HTML visual scripts in opaque-origin sandbox (#4702)…
kyle-sexton commentedon Sep 29, 2026
From the 2026-09-29 audit of the Cursor run. The operator's Visuals-panel rework request (comment of 2026-09-27) had no tracker of its own and the issue closed. Filed as #5331 with acceptance derived from that comment. Nothing implemented.
fix(planning): audit remediation (interview scope, outcome gate, plan…
feat(planning): rework the interview surface Visuals panel (#5464)