Skip to content

feat(ui): make task panels interchangeable - #138077

Merged
steipete merged 3 commits into
mainfrom
codex/flexible-task-panels
Sep 4, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/flexible-task-panels

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Work with Dashboard as the main view and Chat on either side or below it; use the same controls for other task panels.
  • Focus the current main view and restore the previous split, including its dock and dimensions.
  • Keep live widget input, terminal sessions, and chat drafts through layout changes. Narrow panes stack the side panel below the main area.
  • Reopen a task with its saved arrangement. Closing a panel tab changes the layout without deleting the dashboard’s widgets.

Evidence

Same synthetic task and viewport (1440×1000). Before was captured from cbcbb005fdcf4c8c38770b65957b7f8b6527a1e4; after was refreshed from final commit b2f607ff4d2fd803dd4482c82f28da7888f91c1f. Screenshots and browser tests use the real Control UI with synthetic Gateway and native-host fixtures.

Before: Dashboard fixed beside Chat After: Dashboard main, Chat on the right
Before: Dashboard fixed in the right panel After: Dashboard main with Chat on the right
Before: expanded Dashboard hides Chat After: Chat on the left, Dashboard main
Before: expanded Dashboard replaces the conversation After: Chat docked left of the main Dashboard
Swap names the two views One Layout menu
Swap Dashboard and Chat tooltip Move side panel left, right, or below
Mobile: Swap remains available with stacked panes

Mobile task toolbar and retained terminal

  • Layout, board, tab, terminal lifecycle, reconnect, upload, and accessibility suites passed during implementation. Final control revisions passed 113 focused unit cases, then all 178 board/layout/responsive cases, including the complete responsive browser suite.
  • Real Chromium coverage passed 63 cases across focused runs, followed by 21 header, navigation, gallery, and task-layout cases. The task flow checks actual dynamic Swap tooltip text, mobile reachability, iframe document identity, unsaved widget input, chat draft, reload persistence, and one terminal session through layout changes. The mobile terminal ends at 51 columns × 24 rows.
  • Review caught and reproduced two edge cases: short bottom docking collapsed main to zero height, and focusing an already-main Dashboard with a closed side panel left Restore split ineffective. Both now pass their regressions. The full UI at 1440×430 keeps Dashboard at 112px and Chat at 168px, restoring the saved 360px side height after enlargement.
  • Final retention validation passed 99 owner, workspace, and transcript-controller cases plus the browser Swap regression and all eight session-diff scenarios, including retained collapsed files across task navigation without a repeated RPC. Both the lost Review view and incorrect Swap width notification were reproduced before their repairs.
  • Integration with the dashboard launcher landed in feat: add first-class dashboard command #137685: 117 focused unit cases and 16 browser cases passed after rebasing onto that shared panel interface; all PR files pass the pinned formatter and UI types.
  • Independent Codex review: no actionable P0–P2 findings after repairs. Changed-file guards, core-test/UI types, all three dead-export scans, lint, styles, i18n, and the complete docs check passed across focused runs. The prepared local formatter was 0.60.0; all PR files were explicitly checked with the repository-pinned oxfmt 0.65.0.
  • The first CI run exposed stale wrapper/parent selectors and the old mobile-header CSS owner, all corrected. Its lint/docs jobs stopped at the formatter-version mismatch before their later checks; the pinned formatter now passes.

ClawSweeper follow-through: all 27 final-head layout/persistence cases pass, including legacy multi-column ordering, the old Dashboard chat slot, 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-gate and 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.

@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: XL maintainer Maintainer-authored PR labels Sep 4, 2026
@steipete
steipete force-pushed the codex/flexible-task-panels branch from 83e6c3d to a260463 Compare September 4, 2026 08:31
@steipete
steipete marked this pull request as ready for review September 4, 2026 08:32
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 4, 2026
@steipete steipete self-assigned this Sep 4, 2026
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.
@steipete
steipete force-pushed the codex/flexible-task-panels branch from 7e88610 to b2f607f Compare September 4, 2026 09:46
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 6:01 AM ET / 10:01 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: b2f607ff4d2fd803dd4482c82f28da7888f91c1f

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The layout owner and consumers are coherent under static review with broad focused coverage, but independently inspectable current-head visual proof is still missing from this review.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 6 items Shared layout owner: The layout model identifies the main panel, active side panel, visibility, promotion, close, docking, and size behavior in one owner rather than per-panel branches.
Rendered panel roots use the same visibility model: The primary chat root and non-chat panel roots derive their main/side state and hidden state from the shared layout helpers.
Focused browser coverage: The added Control UI scenario exercises dashboard and draft continuity through swapping, all docks, focus/restore, close/reopen, reload persistence, terminal use, and narrow layouts using a mocked Gateway.
Findings None None.
Security None None.

How this fits together

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

Before merge

  • Resolve merge risk (P1) - Persisted browser task layouts are normalized and reinterpreted on upgrade; an edge case could restore an existing user’s panels in an unintended region or visibility state.
  • Resolve merge risk (P1) - The PR body’s linked visual captures could not be retrieved in this environment, so the claimed current-head browser result was not independently inspected.
  • Complete next step (P2) - Make current-head browser proof inspectable before merge; the supplied linked captures could not be retrieved in this review environment.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Source +220, Tests +913, Docs +45. Total +1178 across 59 files.

View PR surface stats
Area Files Added Removed Net
Source 21 537 317 +220
Tests 34 1233 320 +913
Docs 4 75 30 +45
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 59 1845 667 +1178

Review metrics

Metric Value Why it matters
Production versus test delta production +537/-317; tests/test support +1233/-320; docs +75/-30 The net production growth implements a shared movable-layout capability, while most added coverage targets retained roots, saved layouts, and Control UI flows.

Merge-risk options

Maintainer options:

  1. Confirm saved-layout migration (recommended)
    Keep the shared normalizer and verify representative legacy browser layouts restore to the intended main, side, and closed states before merge.
  2. Pause the feature
    Defer the change if maintainers do not want existing browser-saved panel placement reinterpreted by this release.

Technical review

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit. Replaced prior rating: 🐚 platinum hermit.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is a non-urgent Control UI capability expansion, not a reported outage or regression.
  • merge-risk: 🚨 compatibility: The branch changes how persisted browser panel-layout preferences are normalized and restored for existing users.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit. Replaced prior rating: 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] Inspect current-head browser proof for swap, docking, focus/restore, reload persistence, and terminal resize.
  • [P1] Confirm exact-head CI after it completes.
  • [P1] Exercise representative legacy saved-layout restoration states.

What I checked:

  • Shared layout owner: The layout model identifies the main panel, active side panel, visibility, promotion, close, docking, and size behavior in one owner rather than per-panel branches. (ui/src/pages/chat/sidebar-layout.ts:51, b2f607ff4d2f)
  • Rendered panel roots use the same visibility model: The primary chat root and non-chat panel roots derive their main/side state and hidden state from the shared layout helpers. (ui/src/pages/chat/chat-pane-sidebar-layout.ts:208, b2f607ff4d2f)
  • Focused browser coverage: The added Control UI scenario exercises dashboard and draft continuity through swapping, all docks, focus/restore, close/reopen, reload persistence, terminal use, and narrow layouts using a mocked Gateway. (ui/src/e2e/task-panel-layout.e2e.test.ts:47, b2f607ff4d2f)
  • Current main remains on the prior interaction model: Current main documentation describes expanding/collapsing a dashboard side panel, rather than swapping independently docked main and side task views. Public docs: docs/web/dashboards.md. (docs/web/dashboards.md:9, 0c2da1da0315)
  • Feature-history routing: Recent history includes Peter Steinberger’s panel-layout commits and earlier dashboard side-panel fixes by Jason (Json) and Vyctor H. Brzezowski; missing promisor objects prevented exact source-line introduction verification. (ui/src/pages/chat/sidebar-layout.ts, 3fa31a7b2d46)
  • Terminal dependency boundary: The terminal runtime directly imports ghostty-web and the libterminal browser API, then routes fitting through one controller-owned observer. The libterminal package source was unavailable locally and remote dependency retrieval was blocked by DNS. (ui/src/components/terminal/terminal-runtime.ts:10, b2f607ff4d2f)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: 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.

  • Make the existing or refreshed current-head browser capture available for inspection before merge.

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.

@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

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 chat Dashboard slot, stable multi-column migration, and per-task state. Refreshed Dashboard-main capture, Layout menu, and mobile terminal were directly inspected locally. The reviewer reported that its isolated environment could not retrieve the earlier links; there is no outstanding code finding.

Exact-head CI run 33859977500 passed, including openclaw/ci-gate, on b2f607ff4d2. Native review artifacts are bound to that commit with zero findings.

@steipete
steipete merged commit d9dcdfd into main Sep 4, 2026
148 of 150 checks passed
@steipete
steipete deleted the codex/flexible-task-panels branch September 4, 2026 10:25
@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
* 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
steipete added a commit that referenced this pull request Sep 23, 2026
Point readers to Panels > Show session files in the chat header menu and
identify the changed-file badge there. Preserve the existing shortcut and
file-access guidance.

Retain the original PR ancestry while dropping runtime changes superseded
by #123482, #137068, and #138077.
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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