Repository navigation
fix(ui): preserve dashboard input when hiding the side panel - #137744
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 3:00 AM ET / 07:00 UTC. ClawSweeper reviewWhat this changesThe branch keeps an already-loaded Dashboard side panel mounted but hidden and inert while minimized, preserving unsaved embedded-widget input until the dashboard is removed. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this member-authored, maintainer-labeled PR repairs a current Control UI regression and current main still removes the panel DOM on minimize. Source review found no actionable correctness or security defect; exact-head CI is still in progress. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI renders each chat session’s side panel beside its transcript. Dashboard widgets, including sandboxed app iframes, mount in that panel and need their DOM retained to keep unsaved in-memory input. flowchart LR
A[Chat session layout] --> B[Sidebar region]
B --> C{Side panel open?}
C -->|Yes| D[Render all panel content]
C -->|No after Dashboard mounted| E[Retain Dashboard DOM]
E --> F[Hide and inert panel]
F --> G[Reopen with input intact]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +28, Tests +197, Docs +2. Total +227 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the dashboard-only lifecycle boundary in the shared sidebar, preserve lazy initial mounting and explicit disposal, and land once the current head’s required checks are green. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: current main removes the entire panel when it is minimized, disconnecting embedded Dashboard content. The added Chromium test encodes the input-and-reopen regression path, but this read-only review did not execute it. Is this the best way to solve the issue? Yes: Dashboard declares its retention requirement at the shared sidebar owner, while other panels retain their existing teardown behavior and the board caller keeps its single iframe template boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a81f6cf276fe. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
4861b78 to
4ef25ed
Compare
|
Merged via squash.
|
…w#137744) * fix(ui): preserve dashboard input when hiding the side panel * style(ui): apply the pinned formatter to dashboard retention * test(ui): verify minimized dashboard lifecycle * test(ci): make audit budget cancellation deterministic
What Problem This Solves
Fixes an issue where closing and reopening a session's Dashboard panel erased unsaved input and reset embedded apps. This regression followed the dashboard side-panel migration in #137068, after stable 2026.9.1.
Why This Change Was Made
The shared sidebar removed every child when minimized, so the dashboard's own retained view could not keep its iframe alive. Dashboard now declares that its already-mounted content survives minimization; the sidebar hides and inerts that content while other panel content retains its existing teardown behavior. An initially minimized panel remains lazy, and removing a tab still releases its content.
This reuses the current side-panel and widget lifecycle. It adds no configuration, storage, schema, protocol, or dependency changes. Production delta: +28 lines for the explicit content-retention boundary and hidden shell; tests: +198; docs: +2.
User Impact
You can return to chat and reopen the Dashboard without losing a widget's unsaved form input. Dashboard tabs, expansion, and retained sessions keep their existing behavior. Reloading the page still starts fresh widget views.
Evidence
The regression test types into an actual sandboxed MCP App iframe, minimizes the panel, and reopens it. Before the fix it failed with an empty value; after the fix the input and exact iframe identity survive, the minimized surface is hidden/inert, and no extra app-view requests occur.
Focused browser command:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/board-mcp-app.e2e.test.ts ui/src/e2e/dashboard-gallery.e2e.test.ts ui/src/e2e/dashboard-session-retention.e2e.test.ts ui/src/e2e/session-dashboard.e2e.test.ts.The screenshots use synthetic fixture data from the running Control UI and real sandbox server; Gateway responses are mocked. No provider or user Gateway was involved.
Before: reopening has erased the entered note.
After: the note survives closing, reopening, and switching panel tabs.
Review follow-through
The ClawSweeper cross-session eager-mount concern does not apply to the production owner:
ui/src/pages/chat/chat-page-pane-render.ts:69-104keys each retained ChatPane by session key, andchat-page-retained-sessions.ts:73-91keeps separate session elements. The added browser scenario opens an ordinary Browser panel in Alpha, navigates through the actual sidebar to Beta's saved minimized Dashboard, verifies a distinct sidebar instance and no mounted Beta panel or board, then opens Beta explicitly and verifies its dashboard. This addresses the Rank-up request with source and live proof; no additional production state or reset is warranted.CI found two remaining tests that expected the panel DOM to disappear on minimize. They now verify hidden/inert state, zero panel dimensions, no resize divider, full-width chat, and the exact same board element after reopening through either control. Explicit tab removal still has the separate component disposal test. All six
board-split-transcript.e2e.test.tsscenarios and bothdashboard-session-retention.e2e.test.tsscenarios pass. The scoped changed-check gate, core-test typecheck, lint, and fresh review cover this test follow-up.Final integration and CI
Final head:
e358f4ca467e4f7069ba7481827cf985822c595c. The required integration onto mainfd9adb5af2c2b7c40a939a4ece3c9acf92a6feaepreserved all three focused commits (git range-diffequal), including main's newer companion shortcut and font behavior. All 33 lifecycle tests passed after integration. Earlier Chromium proof and screenshots retain their original-head scope; the runtime patch is unchanged.CI exposed an unrelated audit fixture that mixed real timers with a monotonic deadline. The independently reviewed test-only repair advances timers and
performancetogether, verifies no cancellation at 19 ms and cancellation at 20 ms, and preserves exact-one-request and status-specific error assertions for HTTP 200/503/403. All 62 audit tests passed in both the source and final native PR worktrees. Pinned formatting, scoped typed lint, and fresh P0–P2 review passed. The fixture adds one net test line and changes no production audit behavior or policy; it also landed through the companion cooldown repair #137853.The final-head CI run completed successfully: 91 jobs passed, 12 skipped, no failures. The full production audit executed main's current fail-closed policy, completing at 08:02:52 UTC after about 10 seconds. Npm returned no matching high-or-higher production advisories; upstream repository advisories were not checked, so this is not comprehensive vulnerability clearance.
Earlier hosted and local audits failed on npm HTTP 503 responses or timeouts. Each bounded hosted retry followed independent successful full-audit evidence; the final UI audit itself succeeded. No audit policy or timeout was relaxed for this PR.
The latest completed ClawSweeper review (07:00 UTC) has no actionable source findings, and its exact-head CI request is fulfilled. Its production-growth note is addressed by the explicit Dashboard retention boundary: the owner must distinguish an unopened panel from an already-mounted iframe while preserving teardown for ordinary panels. The shared owner carries that policy without a second widget lifecycle. A later review started at 08:03 UTC; the completed review remains current under the repository's review policy.