Skip to content

improve(ui): unify chat side rails in a tabbed panel - #123874

Merged
fuller-stack-dev merged 79 commits into
mainfrom
brzezowski/chat-rails-tabs
Aug 16, 2026
Merged

fuller-stack-dev merged 79 commits into
mainfrom
brzezowski/chat-rails-tabs

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Closes #123286

What Problem This Solves

The chat currently gives each lateral surface its own rail column. Opening several surfaces at once multiplies headers and resize boundaries, consumes conversation width, and becomes difficult to navigate on smaller screens.

Why This Change Was Made

This PR replaces the multi-column model with one full-height, resizable side panel whose open surfaces are represented as tabs. The shared panel owns its tab strip, type picker, empty states, expand/minimize controls, and resize boundary; Review, Terminal, Browser, Files, Side chat, Tasks, Desktop, Discussion, and Board chat use that same path when available.

Tab order, active tab, width, visibility, and expanded state persist per session through the existing sidebar layout settings. Minimizing preserves the tabs; closing the last tab leaves the panel open on the type selector; reopening a session restores its persisted panel state. Legacy persisted multi-column layouts normalize into one ordered right-side panel.

The type picker only advertises existing bindings: Ctrl+\`` for Terminal and ⇧⌘B` for Files. No new shortcuts are introduced.

Pathfinder fix: terminal open contract

While pairing on the tab strip, the Terminal tab could render a raw JavaScript error as the panel's entire contents: Cannot read properties of undefined (reading 'split'). The RPC boundary in ui/src/components/terminal/terminal-connection.ts cast the terminal.open response with client.request<TerminalOpenResult>(...) without validating it, so a response missing shell reached shellBasename() and the resulting TypeError surfaced through the openSessionNow catch as error.message. The protocol requires shell: NonEmptyString (packages/gateway-protocol/src/schema/terminal.ts:35), so that boundary now validates sessionId and shell and raises a typed TerminalOpenUnusableSessionError, which the panel maps to the existing terminal.unavailable copy. Bisecting against the pre-pairing head with an identical fixture reproduces the crash unchanged, so it predates this PR; it lands here because the pairing pass surfaced it.

User Impact

Users can keep the conversation visible while switching among side-panel tabs, close tabs independently, add available types from the + menu, resize or expand the single panel, and use the same navigation model on desktop and mobile. Session Companion is now a regular Side chat tab rather than a separate rail.

Evidence

The screenshots use the canonical Control UI E2E harness and mock gateway (ui/src/test-helpers/control-ui-e2e.ts), with the populated scenario declared in ui/src/e2e/chat-rail-columns.e2e.test.ts. Each crop is the union of the chat header, transcript, and side-panel bounds from the tested page.

State Light Dark
Empty selector Empty tab selector, light Empty tab selector, dark
Review Review tab, light Review tab, dark
Browser Browser tab, light Browser tab, dark
Desktop Desktop tab, light Desktop tab, dark
Populated tab strip and Files Populated tab strip, light Populated tab strip, dark
Bottom dock, resized Bottom dock, light Bottom dock, dark
Single remaining tab Single tab, light Single tab, dark
Narrow-pane reflow Narrow reflow, light Narrow reflow, dark

Mobile expanded state:

Tabbed side panel on mobile

Validation on commit 34d84e48999d166b03ffc9b80f95c082a3c53ea2:

  • formatting check and UI typecheck passed
  • 564 focused UI assertions passed (503 UI + 61 isolated)
  • 45/45 Control UI E2E cases passed across the affected browser suites
  • dedicated navigation matrix passed in light, dark, and mobile, covering empty selection, add/switch/close, existing shortcuts, minimize/reopen, persistence, resize, and expand/restore

Follow-up pairing pass (head e8f5e4cdf01)

Interactive design pass with the maintainer against the mocked Control UI, verified visually at every step:

  • The tab width model reads as three regimes — natural widths, shrink-to-floor with an in-pill fade, then scroll with faded edges — confirmed by a 15-width sweep across both docks (side dock at its 360px floor; bottom dock from 1500px down to 452px). A tab never collapses to icon-only and a label never cuts without a fade.
  • Activating a tab no longer shifts its neighbours: a separator is rendered for every gap and hidden by opacity beside the active pill, and the close slot always reserves its width.
  • The new-tab control is anchored outside the scroll area, so it hugs the last tab when everything fits and stays visible once the tabs overflow.
  • Dock clusters offer destinations only, with no coloured "current" state; the side panel, terminal, and browser now share one owner for that policy (−56 lines of duplicated policy, +41 in the shared module).
  • Terminal panel: the session menu is constrained to the panel instead of the viewport, its mini tab rail shares a single vertical axis with the management icons, and its glyphs match the side panel rail at 15px.
  • Task detail offers a retry when tasks.get fails, instead of dead-ending whenever the Tasks tab is closed.
  • tsgo:ui passes; the five type errors it reported were already present at the branch base a6724b3316d and are fixed here.

Rebase refresh (head 5ed8c0914d2)

Rebased onto current main, carrying the branch over the session-catalog ownership refactor (#123899): the session discussion logic moved to the inherited ChatPaneDiscussion module and was adapted to the unified panel layout, the per-surface terminal button stays deleted (catalog terminal opens keep the agent id through the sidebar callers and the embedded panel binding), and the catalog pane tests follow main's split into chat-pane-catalog.test.ts. Every screenshot above was regenerated by the same harness at this head, now with 8 states per theme plus mobile; the bottom-dock scene blurs the freshly dragged divider so the frame shows its resting state. Focused validation at this head: 79 chat-pane unit tests, 5/5 rail E2E cases, and a clean lint pass on the touched files.

Review finding disposition (head 965d375ec00)

The remaining review finding — seed the new per-session panel from the legacy global Browser/Desktop dock records on upgrade — is intentionally skipped. The legacy records are transient UI preference, not data: nothing is lost on upgrade, the Browser surface stays one click away in the chat topbar action this PR deliberately keeps, and Desktop remains in the panel's add-tab menu. Importing the old global open state into every new session layout would also resurface panels in sessions that never used them. The CI fallout from the rebase (sibling suites asserting the pre-unification dock model, lint caps, and dead rail-era exports) was repaired on this head instead: 9k focused UI assertions, the rail E2E matrix, and the UI/type shards all pass locally.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 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 app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 9:44 PM ET / August 16, 2026, 01:44 UTC.

ClawSweeper review

What this changes

The PR replaces Chat’s separate side rails with one resizable, per-session tabbed panel and updates its migration, embedded surface handling, tests, and Control UI documentation.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open. This is a protected maintainer-owned implementation candidate for the linked unified-panel proposal; supplied recordings show the UI behavior, but the final head is unavailable in this checkout for a complete independent source review.

Priority: P2
Reviewed head: 7043c8903f5bfac1bde1cf5802c879cb3b4e2560
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong user-visible proof and targeted validation are supplied, while exact-head source availability prevents a fully independent final-patch assessment.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): The PR includes after-fix Control UI screenshots and a before/after recording; the final reported change is test-clock stabilization rather than visible behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR includes after-fix Control UI screenshots and a before/after recording; the final reported change is test-clock stabilization rather than visible behavior.
Evidence reviewed 6 items Current main behavior: Current main still creates a separate sidebar column for each opened slot, so the central product change is not already implemented on main.
Persisted-state owner: The Chat page normalizes and persists sidebar layouts per session, making the proposed migration compatibility-sensitive.
Current documentation: Current docs describe standalone Terminal and Browser docks, consistent with the pre-unification implementation.
Findings None None.
Security None None.

How this fits together

Chat routes optional surfaces such as Terminal, Browser, Files, and Tasks through a persisted sidebar layout. The proposed panel centralizes those requests into one tab strip, then renders the selected embedded surface.

flowchart LR
  A[Chat surface request] --> B[Chat pane]
  B --> C[Per-session panel layout]
  C --> D[Tabbed side panel]
  D --> E[Selected embedded surface]
  C --> F[Persisted UI settings]
Loading

Decision needed

Question Recommendation
Should Chat adopt the unified per-session tabbed panel as the replacement for independent side rails after exact-head CI is green? Sponsor the unified panel: Treat the single tabbed panel and its one-time legacy visibility migration as the intended Control UI direction after exact-head validation.

Why: This is a user-facing navigation and persisted-layout policy change, so its acceptance cannot be resolved from code correctness alone.

Before merge

  • Resolve merge risk (P1) - The final PR head is absent from this checkout, so the claim that the last change is test-only cannot be independently source-verified here.
  • Resolve merge risk (P1) - The change migrates persisted sidebar layouts from independent columns to a single per-session panel; exact-head CI and human upgrade-path review remain necessary before merge.
  • Complete next step (P2) - No concrete repair is established; this protected maintainer PR needs human product acceptance and exact-head CI/source review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production versus test delta Exact split unavailable locally; PR aggregate is +5,533/-4,593 The final head is absent from this checkout, so maintainers should confirm the broad UI refactor’s production/test balance from the exact merge ref.

Stored data model

Persistent data-model change detected: migration/backfill/repair: ui/src/components/terminal/terminal-pending-actions.ts, migration/backfill/repair: ui/src/pages/chat/sidebar-layout-legacy-migration.test.ts, migration/backfill/repair: ui/src/pages/chat/sidebar-layout-legacy-migration.ts, serialized state: ui/src/components/session-panel-toggle-buffer.test.ts, serialized state: ui/src/components/session-panel-toggle-buffer.ts, serialized state: ui/src/components/terminal/terminal-panel.test.ts, and 10 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #123286
Summary: This PR is the linked implementation candidate for the canonical unified-panel proposal.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Verify upgrade migration on the exact head (recommended)
    Before merge, confirm an existing per-session layout stays authoritative while legacy open and explicit closed Browser/Desktop records behave as covered by the migration tests.
  2. Accept a deliberate layout reset
    Maintainers may instead explicitly accept loss of legacy global dock visibility, but that would change existing operator expectations.

Technical review

Best possible solution:

Review the exact final head and its merge ref, require exact-head CI to pass, then merge only if maintainers accept the per-session layout migration as the new Control UI contract.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a proposed Control UI navigation model, not a report of a currently failing behavior.

Is this the best way to solve the issue?

Unclear: the shared panel addresses the documented multi-rail UX problem, but the final source revision is unavailable here for an independent best-fix assessment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9c6539c97533.

Labels

Label changes:

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

Label justifications:

  • P2: This is a substantial but non-urgent Control UI navigation and layout change.
  • merge-risk: 🚨 compatibility: Existing standalone dock preferences and documented controls move to a different per-session layout model.
  • merge-risk: 🚨 session-state: The patch changes persisted tab order, active tab, visibility, geometry, and restoration behavior for Chat sessions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR includes after-fix Control UI screenshots and a before/after recording; the final reported change is test-clock stabilization rather than visible behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR includes after-fix Control UI screenshots and a before/after recording; the final reported change is test-clock stabilization rather than visible behavior.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR includes after-fix Control UI screenshots and a before/after recording; the final reported change is test-clock stabilization rather than visible behavior.

Evidence

What I checked:

  • Current main behavior: Current main still creates a separate sidebar column for each opened slot, so the central product change is not already implemented on main. (ui/src/pages/chat/sidebar-layout.ts:101, 9c6539c97533)
  • Persisted-state owner: The Chat page normalizes and persists sidebar layouts per session, making the proposed migration compatibility-sensitive. (ui/src/pages/chat/chat-state-page.ts:344, 9c6539c97533)
  • Current documentation: Current docs describe standalone Terminal and Browser docks, consistent with the pre-unification implementation. Public docs: docs/web/control-ui.md. (docs/web/control-ui.md:427, 9c6539c97533)
  • Feature-history provenance: Available shallow-history blame attributes the current independent-column opening logic to commit eeabc2c; this is routing evidence, not regression attribution. (ui/src/pages/chat/sidebar-layout.ts:101, eeabc2cf69a0)
  • After-fix behavior proof: The PR body supplies populated light/dark/mobile screenshots, and the follow-up comment supplies a before/after Control UI recording; the reported final update is test-clock stabilization only. (7043c8903f5b)
  • Exact-head source gap: The checked-out partial clone does not contain the final PR object, so the final clock-only change could not be independently inspected locally.

Likely related people:

  • Peter Steinberger: Available blame identifies the current sidebar opening behavior with this author; the local history is shallow. (role: current-line author in available history; confidence: low; commits: eeabc2cf69a0; files: ui/src/pages/chat/sidebar-layout.ts)
  • fuller-stack-dev: Recent PR commits repaired the migration, embedded-panel lifecycle, documentation, and final test stabilization. (role: recent repair contributor; confidence: high; commits: d0e1b43e724b, 17e9de5bb96d, 7043c8903f5b; files: ui/src/pages/chat, ui/src/e2e/claude-sessions.e2e.test.ts, docs/web/control-ui.md)

Rank-up moves

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

  • Let exact-head CI complete successfully.
  • Review the final merge ref’s clock-only diff and persisted-layout migration before 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 (19 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-15T18:21:03.418Z sha 58856d6 :: found issues before merge. :: [P1] Migrate standalone dock visibility into panel state
  • reviewed 2026-08-15T18:48:45.948Z sha d814862 :: found issues before merge. :: [P1] Migrate legacy dock visibility before removing the hosts
  • reviewed 2026-08-15T19:02:47.828Z sha 700d6ea :: found issues before merge. :: [P1] Migrate dock visibility before hiding standalone hosts
  • reviewed 2026-08-15T23:26:59.861Z sha 3db8b69 :: needs changes before merge. :: [P2] Document the unified chat side panel
  • reviewed 2026-08-16T00:22:58.123Z sha 17e9de5 :: found issues before merge. :: [P2] Document the unified chat side panel
  • reviewed 2026-08-16T00:37:03.446Z sha 4c64ff6 :: needs changes before merge. :: [P2] Document the unified chat side panel
  • reviewed 2026-08-16T00:57:08.733Z sha 12cd5c3 :: found issues before merge. :: [P2] Document the unified chat side panel
  • reviewed 2026-08-16T01:20:38.848Z sha c1a61cc :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 15, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 15, 2026 01:20
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 15, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
* Control UI: unify chat rails in a tabbed panel

* fix(ui): compact chat side panel navigation

* Polish rail separators around the active tab

* Soften rail tab separators

* Inset the rail tab strip from the resize handle

* Remove the rail tab strip bottom rule

* Add compact close controls to rail tabs

* Redistribute rail tabs after closing a surface

* Restore bottom docking from the rail terminal

* Fade clipped rail tab labels at the edge

* Add drag reordering to rail tabs

* Polish terminal tab chrome

* Polish rail tab close controls

* Regularize rail tab separators

* Space rail tabs evenly

* Add feedback to inactive rail tabs

* Smooth rail tab selection

* Hide unavailable rail menu items

* Preserve browser multi-tab entry

* Support bottom-docked rail tabs

* Polish rail tab sizing

* Refine side panel actions

* Neutralize rail empty-state icons

* Separate dark rail surfaces

* Fade only clipped rail tab labels

* Compact rail header controls

* Refine the surface picker

* Raise and tighten the surface empty state

* Keep Browser and Tasks in the chat topbar

* Unify surface list cards

* Keep embedded rails inside their dock

* Reveal rail tab close actions on demand

* Show full rail labels only when clipped

* Let rail tabs use available space

* Align chat topbar surface controls

* Unify rail surface empty states

* Center rail tab glyphs

* Fade clipped rail labels smoothly

* Keep rail tab labels visible

* Tighten rail tab separator and label fade

* Keep the new-tab control beside the rail tabs

* Keep rail tab separators from reflowing on activation

* Anchor the new-tab control outside the rail tab scroll

* Scroll rail tabs at the floor instead of clipping them

* Tighten spacing between rail tabs

* Report an unusable terminal open response as a readable failure

* Keep the terminal session menu inside the panel

* Share one dock destination cluster across rails, terminal and browser

* Align the terminal mini rail with its management icons

* Tidy panel pickers, browser chrome and task detail retry

* Type the sidebar callbacks object so tsgo:ui passes

* Space out the panel picker rows

* Measure tab strip edges by rect and cancel superseded installs

* Validate every terminal session field and release unusable sessions

* Fold the terminal rail stretch rules into one

* test(ui): match rail tab checks to the tabbed panel header

Anchoring the new-tab control outside the scroll area wrapped the strip in
.side-panel__header-tabs, and every query written as a direct-child chain
started matching nothing. The assertions did not fail loudly: they compared
an empty label list, so three side-panel journeys and the background-tasks
rail went red on a selector detail rather than on behaviour.

Give the label query one named owner scoped to the panel's own header, so
Terminal and Browser strips in the panel body stay excluded while header
layout can keep moving. Freeing that width also means two short tabs now
fit where they used to be squeezed, so the closing step asserts the honest
invariant - a strip that fits again releases the fade - while the overflow
and tooltip regime stays proven earlier in the same journey.

Settle the shared side-panel helper on whichever surface renders: an empty
panel offers its type list and a populated one offers the header menu, and
probing before either existed left it waiting for a control that never
comes. Also drop a shadowed seed binding and an unused locator that oxlint
flagged in the same file.

* fix(ui): adapt session discussion slot to the unified panel layout

* test(ui): capture the bottom dock evidence with a resting divider

* fix(ui): drop the dead previousDock toggle path

* test(ui): align sibling suites with the tabbed panel decisions

* fix(ui): keep narrow-pane hides above the icon-button styling cascade

* fix(ui): create tooltip descriptions via ownerDocument

* fix(lint): merge duplicate terminal header styles and drop dead branches

* refactor(ui): extract embedded panel templates from the pane render

* refactor(ui): delete rail-era dead exports

* test(ui): repair type drift after the rebase

* fix(ui): keep the workspace toggle module-local and settle test caps

* fix(ui): give side-panel tabs their runtime and their own header actions

The tabbed side panel dropped two things the old rails owned. The discussion
tab lost its only runtime registration, so `openclaw-session-discussion` was
never defined and the tab rendered as a permanently blank box; it now loads
through the per-slot lazy runtime map like the other panel types.

Panels also have no header of their own anymore, so any action on the active
panel's content had to reach the shared header. The header now takes panel
contributed actions instead of a discussion-only open-url special case, which
brings back the side-chat "Clear thread" overflow menu — its gateway reset had
no reachable entry point at all in the embedded rail.

* test(ui): anchor the sidebar scroll proof to the panel host

The bounding contract moved from `.sidebar-column__panel` to
`.side-panel__panel`; mounting the detail panel under the removed class let it
grow instead of scroll, so the test failed for its harness rather than for the
behavior it guards.

* refactor(ui): move side-panel wiring out of the chat render monolith

`chat-pane-render.ts` crossed its line budget. The region callbacks are layout
policy, so they resolve in the layout module with the pane injecting only what
it owns, and the two panel-action producers collapse into the single header
contribution the region consumes.

* fix(ui): keep one terminal intent queue per document

A session route mounts the side-panel terminal beside the shell instance kept
for the bottom dock. Each owned a private action array over one sessionStorage
key, so their whole-array writes erased each other's intents and a freshly
mounted panel drained through a reconnect fence it never saw.

The queue, its persisted record, and the fence now belong to the document;
panels bind as executors while connected. The chat pane records a toggle intent
where it observes it, instead of parking the raw event in memory and handing it
to a panel that may not be mounted yet — a service-worker reload in that window
dropped the request, thread id and all, with nothing explaining why. That makes
the deferred-restore handshake dead weight, so it goes.

* fix(ui): let the panel that starts a terminal intent finish it

Opening a catalog terminal from a chat route mounts the side-panel terminal
right after the request, which swapped the queue's executor mid-flight and
stranded the in-flight action; the panel's own mount restore then opened a
plain session instead. The executor that began an action stays responsible for
it as long as it can still run.

* test(ui): cover closed legacy side docks

* refactor(ui): split side panel controllers

* fix(ui): stabilize embedded panel handoffs

* style(ui): format browser panel refresh

* test(ui): settle catalog prepend paint incrementally

* docs(ui): describe the unified chat side panel

* test(ui): settle catalog clock transitions

---------

Co-authored-by: Jason (Json) <[email protected]>
steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: #145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: #153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: #142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same #142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: #162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: #148070/#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: #125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: #113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. #168789 cites synthetic #143426/#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (0ea0807). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…w#173015)

* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: openclaw#145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: openclaw#153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: openclaw#142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same openclaw#142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: openclaw#162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: openclaw#148070/openclaw#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: openclaw#125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: openclaw#113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: openclaw#158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  openclaw#125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: openclaw#158335 added reply persistence
  and openclaw#166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: openclaw#146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: openclaw#171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report openclaw#171310 and fixes openclaw#171377/openclaw#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: 2a4c20f
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: openclaw#123874 flattened the flexible
  openclaw#113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 7f7310a (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. openclaw#168789 cites synthetic openclaw#143426/openclaw#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (openclaw#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (8c995fb). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
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. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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.

Unify chat side rails into a single tabbed panel

2 participants