Skip to content

fix(ui): preserve dashboard input when hiding the side panel - #137744

Merged
steipete merged 4 commits into
mainfrom
codex/stable-audit-ui
Sep 4, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/stable-audit-ui

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • 33 focused sidebar and panel-owner unit tests passed, covering lazy initial mount, retention, ordinary panel teardown, and explicit tab removal.
  • 21 real Chromium scenarios passed across the Dashboard gallery, retained sessions, MCP App lifecycle, Canvas widgets, Workboard widgets, both minimize controls, and transcript geometry. The first broad run caught an obsolete Workboard disconnect assertion; it now requires inactive retained identity and still verifies no hidden polling plus refresh on return.
  • UI and core-test typechecks, scoped oxlint/stylelint, pinned Oxfmt 0.65.0, and whitespace checks passed. The shared changed-check wrapper reached formatting but used stale installed Oxfmt 0.60.0; its remaining gates were run directly with the exact pinned formatter checked separately.
  • Fresh independent Codex review accepted no P0–P2 findings.

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.

Before: unsaved note erased after reopening

After: the note survives closing, reopening, and switching panel tabs.

After: unsaved note retained after reopening

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-104 keys each retained ChatPane by session key, and chat-page-retained-sessions.ts:73-91 keeps 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.ts scenarios and both dashboard-session-retention.e2e.test.ts scenarios 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 main fd9adb5af2c2b7c40a939a4ece3c9acf92a6feae preserved all three focused commits (git range-diff equal), 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 performance together, 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.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@steipete
steipete marked this pull request as ready for review September 4, 2026 01:22
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 3:00 AM ET / 07:00 UTC.

ClawSweeper review

What this changes

The 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 provenance

Possible 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
Reviewed head: 4ef25ed1283f769a0551082e7a6fbce79c4f8c10

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with behavior-level regression coverage and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies a member-authored PR, so the external-contributor proof gate does not apply. Its submitted Chromium scenario is nevertheless source-connected supplemental evidence, while the prepared media concerns the predecessor migration rather than this exact patch.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies a member-authored PR, so the external-contributor proof gate does not apply. Its submitted Chromium scenario is nevertheless source-connected supplemental evidence, while the prepared media concerns the predecessor migration rather than this exact patch.
Evidence reviewed 7 items Current-main defect: Current main returns no side-panel template whenever the layout is closed, disconnecting every embedded child, including a dashboard iframe.
Owner-boundary repair: The Dashboard alone opts into retention, while the sidebar keeps an initially minimized panel lazy and removes the shell when no retained panel remains.
Dashboard caller: The board owner already uses one guarded template boundary specifically so hiding the panel does not remount app iframes; the PR preserves that boundary rather than adding a competing lifecycle.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Resolve merge risk (P1) - The bug fix adds 28 net production lines. The reviewed owner needs the explicit retention policy and mounted-versus-minimized state to distinguish an unopened panel from a previously loaded iframe without changing other panels’ teardown behavior.
Agent review details

Security

None.

PR surface

Source +28, Tests +197, Docs +2. Total +227 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 35 7 +28
Tests 6 206 9 +197
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 243 16 +227

Review metrics

Metric Value Why it matters
Production versus test delta production +28 net; tests +197 net; docs +2 The small production increase establishes the retention boundary; behavior-level tests cover iframe input, element identity, both minimize controls, and cross-session lazy mounting.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label justifications:

  • P1: The patch repairs a dashboard workflow that currently loses unsaved embedded-widget input when the side panel is minimized.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository state identifies a member-authored PR, so the external-contributor proof gate does not apply. Its submitted Chromium scenario is nevertheless source-connected supplemental evidence, while the prepared media concerns the predecessor migration rather than this exact patch.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Allow the queued exact-head required checks to finish green before native landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-04T01:33:59.960Z sha 2deca16 :: blocked before merge. :: [P2] Key retained mounting to the dashboard session
  • reviewed 2026-09-04T02:04:21.059Z sha 4861b78 :: blocked before merge. :: none
  • reviewed 2026-09-04T03:45:18.776Z sha 4861b78 :: needs changes before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@steipete
steipete force-pushed the codex/stable-audit-ui branch from 4861b78 to 4ef25ed Compare September 4, 2026 06:51
@steipete
steipete merged commit 55ee2fa into main Sep 4, 2026
346 of 350 checks passed
@steipete
steipete deleted the codex/stable-audit-ui branch September 4, 2026 08:09
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant