Repository navigation
refactor(ui): finish the assistant dock rename and drop duplicate work - #134435
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 31, 2026, 4:04 PM ET / 20:04 UTC. ClawSweeper reviewWhat this changesThe branch renames assistant-dock CSS and layout hooks, consolidates small dock helpers, and moves Home work-context construction from the application shell into the dock component. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThe prior P1 reactivity finding remains: this refactor removes the shell’s reactive work-context object but does not make the dock subscribe to session updates that change the snapshot title. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI shell tracks route and session state and renders the assistant dock. The dock creates a bounded work-context snapshot for Home chat and reserves page space through its layout controller. flowchart LR
Sessions[Session state] --> Shell[Application shell]
Shell --> Dock[Assistant dock]
Dock --> Snapshot[Work-context snapshot]
Snapshot --> Home[Home chat]
Dock --> Layout[Page layout reservation]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +10. Total +16 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Subscribe the dock to session-state updates, or retain an equivalently reactive snapshot input, and add an owner-boundary regression for a work-session title update while the dock stays open. Do we have a high-confidence way to reproduce the issue? Yes. Open the Home dock on a chat route, update that session’s label through the session capability, then send without a pane-context or agent-selection update. Is this the best way to solve the issue? No. Local derivation is reasonable only when it reacts to every input it reads; this patch drops the shell-provided session reactivity without replacing it. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 75de683dd299. LabelsLabel justifications:
EvidenceWhat 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
HistoryReview history (1 earlier review cycle)
|
The shared dock still spoke the old custodian vocabulary: .cp* classes sat beside .assistant-panel-context in one stylesheet, and --oc-custodian-reserve-* named the layout reservation for a dock that now hosts both destinations. Rename both to assistant-panel; the shipped localStorage key stays and says why. Collapse three copies of the visible-transcript refresh policy into one guard and the duplicated availability ternary into availableFor(). The shell built a full work context that the panel immediately rebuilt from two of its fields; pass the route id instead, so the snapshot is derived once by the owner that subscribes to its inputs. Make the truncation table exhaustive with satisfies so a new context field cannot reach the model unbounded.
9c3ba19 to
5790957
Compare
|
Merged via squash.
|
Use the captured main generation-scope contract in lifecycle and source/compiled provider-owner fixtures. Remove its retired config input while preserving provider selection and empty-generation fencing. Integrate captured main 10564e2 with the Home context refinement from PR #134059 and the assistant dock cleanup from PR #134435. Preserve the existing contributor credit and canonical catalog owner already on main. The integrated candidate passes the normal full build, scoped checks, 679 original-order model cases, 400 backend owner cases, both catalog E2Es, 290 UI cases and 18 browser cases. Final grouped startup gzip is 347299 B under the unchanged 347353 B enforcement limit.
* chore(deps): refresh eligible seven-day npm dependencies * docs(plugins): align embedded TypeBox dependency pins * test(deps): align evidence and Escape ownership * fix(ci): repair native PID imports and cancellation assertions * test(ui): make effort Escape ownership explicit * fix(agents): keep error presentation on prepared policy * fix(agents): preserve loaded provider policy in error presentation * fix(agents): carry prepared provider owners into lifecycle errors Preserve endpoint-owned recovery guidance for custom provider routes in terminal events and callbacks. Reuse the prepared model handle and full-signal classifier, with a real Agent/AgentSession boundary regression. * fix(agents): reconcile explicit diagnostic ownership and structured errors Keep presentation on explicit prepared owners, preserve full assistant error facts ahead of generic request wrappers, and retain raw-schema diagnostics. Carry prepared owners into terminal observations and prove source/compiled scope boundaries. Complete the shared attempt fixture with the real model-handle getter. * fix(agents): carry full classified facts into safe failure copy Share explicit-owner assistant classification between direct formatting and the user-facing wrapper. Preserve structured codes, types and body evidence in safe provider/model/status copy, including message-less failures, while retaining raw-schema diagnostics and ownerless policy boundaries. * fix(ui): keep Home work context lazy and current Let the existing deferred assistant panel prepare page work context once, using the shell's validated route facts. Keep explicit agent ownership through global/main aliases and refresh the quoted reference when session, agent or Gateway snapshots change. Reuse the frozen refinement from PR #134059: 6e2a8f9550e6e6da957b0352fa674024f198118e. Add source-bound roster-refresh/send proof, extend the existing owner fixture for snapshot updates and cleanup, and regenerate the boot manifest for the pinned dependency graph. Startup gzip is 347243 B under the unchanged 347353 B gate. The UI repair removes two production lines net. * test(agents): align generation fixtures with prepared metadata Use the captured main generation-scope contract in lifecycle and source/compiled provider-owner fixtures. Remove its retired config input while preserving provider selection and empty-generation fencing. Integrate captured main 10564e2 with the Home context refinement from PR #134059 and the assistant dock cleanup from PR #134435. Preserve the existing contributor credit and canonical catalog owner already on main. The integrated candidate passes the normal full build, scoped checks, 679 original-order model cases, 400 backend owner cases, both catalog E2Es, 290 UI cases and 18 browser cases. Final grouped startup gzip is 347299 B under the unchanged 347353 B enforcement limit. * refactor(ui): keep submission projection in lazy chat owner Keep the app store responsible for bounded retained bytes and client lifetime. Move receipt adaptation and display retirement into the existing history projection owner, shared by both lazy chat consumers. Preserve missing-store behavior and the retained-prompt, attachment and reconnect contracts. Continue the retained-submission owner from PR #134059 (0f3e17e). Validation: 808 owner tests, 21 Chromium cases, grouped-bundle Home and retired-prompt proof, changed checks and fresh full-candidate autoreview. Startup gzip: 347588 -> 347320 bytes; unchanged limit 347353.
openclaw#134435) The shared dock still spoke the old custodian vocabulary: .cp* classes sat beside .assistant-panel-context in one stylesheet, and --oc-custodian-reserve-* named the layout reservation for a dock that now hosts both destinations. Rename both to assistant-panel; the shipped localStorage key stays and says why. Collapse three copies of the visible-transcript refresh policy into one guard and the duplicated availability ternary into availableFor(). The shell built a full work context that the panel immediately rebuilt from two of its fields; pass the route id instead, so the snapshot is derived once by the owner that subscribes to its inputs. Make the truncation table exhaustive with satisfies so a new context field cannot reach the model unbounded.
…3772) * chore(deps): refresh eligible seven-day npm dependencies * docs(plugins): align embedded TypeBox dependency pins * test(deps): align evidence and Escape ownership * fix(ci): repair native PID imports and cancellation assertions * test(ui): make effort Escape ownership explicit * fix(agents): keep error presentation on prepared policy * fix(agents): preserve loaded provider policy in error presentation * fix(agents): carry prepared provider owners into lifecycle errors Preserve endpoint-owned recovery guidance for custom provider routes in terminal events and callbacks. Reuse the prepared model handle and full-signal classifier, with a real Agent/AgentSession boundary regression. * fix(agents): reconcile explicit diagnostic ownership and structured errors Keep presentation on explicit prepared owners, preserve full assistant error facts ahead of generic request wrappers, and retain raw-schema diagnostics. Carry prepared owners into terminal observations and prove source/compiled scope boundaries. Complete the shared attempt fixture with the real model-handle getter. * fix(agents): carry full classified facts into safe failure copy Share explicit-owner assistant classification between direct formatting and the user-facing wrapper. Preserve structured codes, types and body evidence in safe provider/model/status copy, including message-less failures, while retaining raw-schema diagnostics and ownerless policy boundaries. * fix(ui): keep Home work context lazy and current Let the existing deferred assistant panel prepare page work context once, using the shell's validated route facts. Keep explicit agent ownership through global/main aliases and refresh the quoted reference when session, agent or Gateway snapshots change. Reuse the frozen refinement from PR openclaw#134059: 6e2a8f9550e6e6da957b0352fa674024f198118e. Add source-bound roster-refresh/send proof, extend the existing owner fixture for snapshot updates and cleanup, and regenerate the boot manifest for the pinned dependency graph. Startup gzip is 347243 B under the unchanged 347353 B gate. The UI repair removes two production lines net. * test(agents): align generation fixtures with prepared metadata Use the captured main generation-scope contract in lifecycle and source/compiled provider-owner fixtures. Remove its retired config input while preserving provider selection and empty-generation fencing. Integrate captured main a3310c7 with the Home context refinement from PR openclaw#134059 and the assistant dock cleanup from PR openclaw#134435. Preserve the existing contributor credit and canonical catalog owner already on main. The integrated candidate passes the normal full build, scoped checks, 679 original-order model cases, 400 backend owner cases, both catalog E2Es, 290 UI cases and 18 browser cases. Final grouped startup gzip is 347299 B under the unchanged 347353 B enforcement limit. * refactor(ui): keep submission projection in lazy chat owner Keep the app store responsible for bounded retained bytes and client lifetime. Move receipt adaptation and display retirement into the existing history projection owner, shared by both lazy chat consumers. Preserve missing-store behavior and the retained-prompt, attachment and reconnect contracts. Continue the retained-submission owner from PR openclaw#134059 (1ae5ba2). Validation: 808 owner tests, 21 Chromium cases, grouped-bundle Home and retired-prompt proof, changed checks and fresh full-candidate autoreview. Startup gzip: 347588 -> 347320 bytes; unchanged limit 347353.
Follow-up cleanup on the Home agent dock landed in #133676.
What Problem This Solves
The dock was renamed to "assistant panel" when it started hosting both Home and Ask OpenClaw, but its internals kept the old vocabulary, and the feature left two places doing the same work:
.cp*(custodian panel) CSS classes sat in the same stylesheet as the newer.assistant-panel-context— two spellings for one concept — and--oc-custodian-reserve-*named the layout reservation for a dock that is no longer custodian-only.connectedCallback,willUpdate,setOpen), and thehome ? homeAvailable : custodianAvailabledecision in two.buildHomeWorkContext()on every render and passed the result to the panel, which immediately rebuilt it from two of its fields. The panel has to rebuild — it re-derives on its own work-context and agent-selection subscriptions without waiting for a shell render — so the shell's copy was redundant scanning of sessions and agents on a hot path.formatChatWorkContext's truncation table was a plain literal, so a newly addedChatWorkContextfield would be silently dropped from the snapshot instead of bounded.Why This Change Was Made
One spelling per concept, one owner per decision. The dock's classes and reservation variable are now
assistant-panel*; the repeated policies collapse intorefreshCustodianTranscript()andavailableFor(destination); the work snapshot is derived once, by the component that subscribes to its inputs, from a narrowerworkPageprop; and the truncation table issatisfies Record<keyof ChatWorkContext, number>, so an unbounded new field is a compile error rather than a silent omission.The shipped
openclaw.custodian.panel.v1localStorage key deliberately keeps its legacy name — it holds operators' saved dock size and placement, and renaming it would silently reset their layout. A comment now records that so a future cleanup does not "fix" it.User Impact
None intended: no visual, behavioral, or persistence change. Saved dock placement and size continue to load from the existing key.
Evidence
section.assistant-panel, 2 tabs, 3 icons, 1 resizer), zero stale.cp*nodes,--oc-assistant-reserve-right: 440px/--oc-assistant-reserve-bottom: 420pxapplied with no stale--oc-custodian-reserve-*, and.assistant-panel--bottomrenders on dock switch. Both placements are visually identical to the landed version.Right dock:
Bottom dock with the work-context snapshot expanded:
ui/src/components,ui/src/app,ui/src/pages/chat).node scripts/check-changed.mjspasses, including the assertion-SAFETY ratchet — the retained type assertion now cites thesatisfiesclause as its proof.Size
Production
+64/−58(net +6); the growth is nine short comment lines recording non-obvious contracts (why the legacy storage key stays, why the dock derives its own snapshot, the truncation-table invariant). Non-comment production code is net negative. Tests+26/−16.