Repository navigation
feat(ui): make task panels interchangeable - #138077
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
83e6c3d to
a260463
Compare
Allow the active side panel to become the main task view, dock the side panel left, right, or below, and focus or restore the current main view. Preserve live content roots and remember each task's layout in browser preferences, including normalization of existing saved layouts. Keep the task header available across swaps. Ignore controlled tab selection echoes that otherwise reopen focused side panels, and apply terminal resize measurements through one observer so rapid layout changes cannot leave the terminal at a stale width. Validate saved-layout behavior and real Chromium flows for dashboards, MCP Apps, chat drafts, terminal sessions, native chrome, and narrow panes.
7e88610 to
b2f607f
Compare
|
Codex review: blocked before merge. Reviewed September 4, 2026, 6:01 AM ET / 10:01 UTC. ClawSweeper reviewWhat this changesThe branch lets chat task panels exchange main and side roles, adds left/right/bottom docking and focus controls, and saves each task’s layout in browser preferences. Merge readiness⛔ Blocked before merge - 4 items remain Keep open. Current main still documents the earlier side-panel model, while the branch adds a coherent shared task-layout owner; no introduced correctness defect was established in static review. Persisted browser-layout migration and independently inspectable visual proof remain merge-relevant checks. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI presents a chat task alongside optional dashboard, browser, and terminal panels. A shared layout owner restores saved placement and visibility, then supplies mounted panel roots to the main and side regions. flowchart LR
A[Task navigation] --> B[Saved browser layout]
B --> C[Shared layout owner]
C --> D[Main task region]
C --> E[Side task region]
C --> F[Focus and docking controls]
D --> G[Mounted chat and task views]
E --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +220, Tests +913, Docs +45. Total +1178 across 59 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after current-head visual browser proof is inspectable and normal exact-head CI plus legacy saved-layout restoration checks are complete. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR; its source includes a concrete browser scenario for the changed panel and saved-layout paths. Is this the best way to solve the issue? Yes: one shared layout owner keeps docking, promotion, visibility, and retained mounted roots consistent across panel types. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0c2da1da0315. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
|
|
Ready to land the final task-panel interaction: one contextual Swap action in the task toolbar, one Layout menu for left/right/below, and Focus / Restore split on the main view. Before/after screenshots in the PR body were refreshed from the final commit. Layout changes keep live content roots in place. The browser walkthrough verifies dashboard document/input identity, chat drafts, terminal sessions, saved geometry, and mobile controls. Review also caught and repaired short bottom-dock collapse, closed-side focus restoration, hidden Review state loss, and missed transcript width notifications on Swap. The dashboard launcher from #137685 is integrated. Final integration passed 117 focused unit tests and 16 browser cases; the broader responsive, layout, lifecycle, docs, type, lint and formatting checks passed during implementation. Independent Codex review is clean at P0–P2. The final CI run includes a successful Control UI test against a real Gateway. Production delta is +220 lines; tests and docs are counted separately in the body. No dependency, protocol, database schema, or operator configuration was added. The remaining proof-tooling follow-up is isolating the Vite optimization cache for simultaneous standalone screenshots and source-server E2Es; final screenshots ran separately. ClawSweeper proof follow-through: all 27 final-head layout/persistence cases pass, including legacy expanded-open versus minimized Dashboard visibility, the old Exact-head CI run 33859977500 passed, including |
|
Merged via squash.
|
* feat(ui): make task panels interchangeable Allow the active side panel to become the main task view, dock the side panel left, right, or below, and focus or restore the current main view. Preserve live content roots and remember each task's layout in browser preferences, including normalization of existing saved layouts. Keep the task header available across swaps. Ignore controlled tab selection echoes that otherwise reopen focused side panels, and apply terminal resize measurements through one observer so rapid layout changes cannot leave the terminal at a stale width. Validate saved-layout behavior and real Chromium flows for dashboards, MCP Apps, chat drafts, terminal sessions, native chrome, and narrow panes. * refactor(ui): swap task panels from the toolbar * test(ui): align retained Review fixture with dashboard launcher
What Problem This Solves
Dashboard was fixed to the side panel unless expanded across the task, which hid the conversation. Users could not make Dashboard the primary view while keeping Chat alongside it, or move the side panel to the left.
Why This Change Was Made
Give each task a main view and a side panel with interchangeable content. Swap in the task toolbar exchanges the active side tab and main view, with a tooltip naming both views (for example, “Swap Chat and Dashboard”). One Layout menu in the task toolbar docks the side panel left, right, or below. Focus and Restore split in the main pane header control how much space the main view gets. Swap remains visible on narrow screens. Browser preferences remember each task’s arrangement and dimensions. Focus prepares a restorable split even when the side panel was closed; short bottom-docked panes keep both views visible and restore the saved height when space returns.
The same layout owner handles Dashboard, Chat, Browser, Terminal, Files, and Review. Grid placement changes around stable content roots, so swapping and tab reordering preserve iframe documents, terminal sessions, and unsaved drafts. The task header stays available above either view, including compact mobile breadcrumbs and controls. Its old chat-only floating-header path and duplicate content clearance are removed. Saved closed panels stay unmounted until first shown. Existing saved layouts, including minimized expanded panels and older Dashboard slot names, normalize at the browser preference boundary.
The real browser walkthrough also exposed connected lifecycle bugs: controlled tab selection echoed back as a user action and undid Focus, and Ghostty dropped the final resize while briefly fitting a squeezed main panel. The shared tab adapter ignores selection echoes, and the terminal adapter uses one observer with Ghostty’s public dimension measurement API to apply the final size without retries or a second rendering path. Hidden Review content now keeps its cached diff loader and local file state, while layout commits track widths by content identity so Swap immediately remeasures the transcript.
This also integrates the dashboard input-retention fix from #137744 into the shared panel lifecycle, preserving its close/reopen and lazy first-mount regression coverage.
User Impact
Evidence
Same synthetic task and viewport (1440×1000). Before was captured from
cbcbb005fdcf4c8c38770b65957b7f8b6527a1e4; after was refreshed from final commitb2f607ff4d2fd803dd4482c82f28da7888f91c1f. Screenshots and browser tests use the real Control UI with synthetic Gateway and native-host fixtures.Mobile: Swap remains available with stacked panes
ClawSweeper follow-through: all 27 final-head layout/persistence cases pass, including legacy multi-column ordering, the old Dashboard
chatslot, expanded-open versus expanded-minimized visibility, normalization idempotence, and per-task dimensions/tab order. The refreshed current-head screenshots above were directly inspected locally; the reviewer reported that its isolated environment could not retrieve the earlier image links. No code finding was reported.Exact-head hosted CI passed: CI run 33859977500, including the required
openclaw/ci-gateand Control UI tests against a real Gateway.Proof-tooling follow-up: isolate the Vite optimization cache for concurrent standalone screenshots and source-server E2Es. They share a cache today; final screenshot proof ran separately after the suites finished.
Production LOC: +537/-317 (net +220); tests: +1233/-320; docs: +75/-30. Growth adds the generic movable main view, left docking, saved-layout normalization, and terminal/tab lifecycle repairs. Duplicate dropdowns, obsolete callbacks, and the chat-only mobile-header path were removed. No dependencies, Gateway protocol, database schema, or operator configuration options were added.