Repository navigation
feat(ui): render live dashboard gallery previews - #138640
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 4, 2026, 6:10 PM ET / 22:10 UTC. ClawSweeper reviewWhat this changesThe PR replaces synthetic dashboard-card artwork with lazy near-viewport rendering of each saved dashboard’s real board content in the Control UI gallery. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 7 items remain Keep this PR open: the prior P1 remains on the unchanged head. A near-viewport gallery card mounts an active board document, so a saved granted MCP App can obtain an app-view lease and create its sandbox bridge despite the decorative card being inert. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI dashboard gallery receives saved dashboard sessions from the Gateway and links each card to its chat. This change feeds each nearby card into the board renderer, which normally loads widgets and their associated view lifecycles. flowchart LR
A[Saved dashboard sessions] --> B[Dashboard gallery]
B --> C[Near viewport check]
C --> D[Preview board renderer]
D --> E[Widget lifecycle]
E --> F[HTML preview or MCP App bridge]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff introduces a concrete capability-boundary regression by mounting active MCP App content in decorative gallery cards. PR surfaceSource -43, Tests +134. Total +91 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add an explicit passive gallery-preview mode that can render safe saved HTML but never starts MCP App lifecycles, requests app views, or creates tool bridges; render non-HTML widgets as inert placeholders if needed. Do we have a high-confidence way to reproduce the issue? Yes, from source: create a saved dashboard containing a granted MCP App, browse until its card is near the viewport, and observe the active lifecycle request board.widget.appView followed by mcp.app.view setup. Is this the best way to solve the issue? No. Reusing the fully active board document is not the best gallery renderer; a dedicated passive mode at the board/view lifecycle boundary avoids creating privileged app-view resources for a decorative card. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8918e743cdf8. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Passive-boundary repair is now on exact head Proof: the bundled gallery E2E renders the real saved HTML beside a granted MCP App fixture, asserts the MCP App is absent, and records zero @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* feat(ui): render live dashboard gallery previews * fix(ui): bound dashboard gallery preview loading * test(ui): narrow dashboard request payloads * fix(ui): keep dashboard previews passive
Summary
Before / after
Before: dashboard cards used a fixed placeholder scaffold regardless of their saved content.
After: a real dashboard created on the disposable OCM gateway renders its actual saved HTML in the gallery.
Validation
node scripts/run-vitest.mjs run ui/src/components/board/board-document.test.ts ui/src/components/board/board-view.test.ts ui/src/components/board/board-widget-cell-mcp-app.test.ts ui/src/components/board/board-widget-frame.test.ts ui/src/lib/board/widget-sandbox-host.test.ts ui/src/pages/dashboards/dashboard-preview.test.ts ui/src/pages/dashboards/dashboards-page.test.ts— 87 passednode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/dashboard-gallery.e2e.test.ts— passedpnpm tsgo:uipnpm lint:ui:stylespnpm ui:builddashboard-gallery-live-sampleThe browser regression includes visible saved HTML and a granted MCP App in the same dashboard. It verifies the HTML iframe body, confirms the MCP App is omitted, and records zero
board.widget.appViewrequests while the gallery card is visible. The sandbox-host regression separately proves passive HTML is fetched and delivered while its capability port is closed and no Gateway bridge request occurs.Review notes