Repository navigation
fix(ui): keep retained dashboards warm - #126339
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready proof for exact head 7acb51136ec0af672721aae7e10bb5304354e758. Root cause: retained presentation teardown owned the dashboard provider lease, so hiding a still-retained pane discarded its warmed board snapshot and widget runtime. The fix aligns the provider lease with the bounded retained-pane lifecycle and uses the separate visual-presentation signal to keep hidden boards, widgets, and commands inactive. Focused proof: The pre-fix A/B reverses only the seven production changes and fails because Exact-head CI: run 32271983185 completed successfully on attempt 1 for this SHA: 108 jobs succeeded, 11 scope-disabled jobs skipped, and zero jobs failed. Visual proof:
Final code-aware autoreview completed with no accepted or actionable findings (correctness 0.98). Production LOC is +13/-7 (net +6); regression-test LOC is +131/-0. Native prepare/Testbox gate: Proof gap: the signed-in team-server Chrome relay was unavailable. This is deterministic isolated mocked-Gateway proof in a real Playwright Chromium browser, not a live team-server run, and no operator Gateway or state was touched. |
|
Merged via squash.
|
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
AI-assisted change. The implementation, lifecycle ownership, regression proof, and final diff were reviewed by the maintainer; no agent transcript or session links are included.
What Problem This Solves
Fixes an issue where switching between retained team-server dashboard sessions painted chat first and then waited seconds for the dashboard to reload, even when that dashboard had already been warmed in the same pane.
Why This Change Was Made
Retained chat panes released their dashboard provider and snapshot when they became hidden, even though the pane itself remained retained. The fix makes the board provider lease follow the bounded retained-pane lifetime, while a separate visual-presentation signal gates board activity so hidden widgets and commands remain suspended.
This is the owner-boundary fix: the retained pane owns the provider lifetime, while the visible presentation owns activity. It avoids a second board cache or prefetch path and keeps the existing inactive board/widget suspension contract.
Provenance: the release-on-hide behavior was carried forward by #121625, authored and merged by @steipete on August 10, 2026. No bot merge or automerge trigger was involved.
User Impact
Revisiting a warmed dashboard is immediate instead of showing chat first and waiting for a dashboard reload. Hidden retained dashboards remain inactive, so this does not keep their widgets or commands running in the background.
Evidence
Before
Alpha is selected 500 ms after returning, but only chat is visible because the retained dashboard was torn down.
After
The warmed Alpha dashboard is visible immediately while its
board.getrefresh remains deliberately stalled.Video
Alpha → Beta → retained Alpha:
dashboard-session-retention.webm
Focused verification
The deterministic Playwright/Vitest flow uses a real Chromium page and an isolated mocked Gateway. It warms Alpha, visits Beta, stalls the next Alpha
board.get, then requires the original Alpha DOM node to become visible within one second while verifying that only the visible dashboard is active.Pre-fix A/B proof: reversing only the seven production changes makes the E2E fail because
alpha-maindoes not become visible within one second whileboard.getis stalled. The fixed code passes and preserves the same runtime element identity.Final code-aware autoreview completed with no accepted or actionable findings; patch correctness was rated 0.98.
Production LOC: +13/-7 (net +6), justified by separating retained provider lifetime from visual activity ownership. Test LOC: +131/-0.
Proof gap: the signed-in team-server Chrome relay was unavailable. This evidence is an isolated mocked-Gateway/real-Playwright-browser flow, not a live team-server test, and no operator Gateway or state was touched.