Repository navigation
feat: keep the Home agent beside your work - #133676
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 31, 2026, 12:41 PM ET / 16:41 UTC. ClawSweeper reviewWhat this changesThis PR adds a persistent Control UI dock for an agent’s Home conversation, with context capture, composer handoff, and a global keyboard toggle. Merge readinessKeep open: the prior P1 remains at the current head—Dashboard can show the selected Home conversation without suppressing the dock, leaving competing composers. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI shell hosts session pages such as Chat and Dashboard and can also render the assistant dock. The dock resolves the selected agent’s Home conversation, then hands normal chat sending and queued-message behavior to the existing chat pane. flowchart LR
A[Sidebar agent selection] --> B[Home conversation resolution]
C[Chat or Dashboard session page] --> D[Session-route detection]
D --> E[Assistant dock suppression]
B --> E
E --> F[Home chat pane]
C --> G[Bounded work-context snapshot]
G --> F
F --> H[Existing chat send and queue flow]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +955, Tests +731, Docs +21, Other +2. Total +1709 across 59 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: 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: Use the already-computed session-route fact for Home suppression, add Dashboard coverage for the matching Home identity, then capture the repaired dock behavior on the current head. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence path: open the dock, navigate to Dashboard for the selected agent’s Home session, and observe that the dock is not suppressed. This read-only review did not execute the UI. Is this the best way to solve the issue? No. Reusing the existing dock and chat pane is sound, but this head must apply the existing sessionRoute predicate rather than treating only Chat as a session page. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 692cb7b1f28f. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
90cf12f to
24b94c7
Compare
94468e1 to
cef5d24
Compare
The mocked Control UI dev server already handles both methods but never advertised them, so the new Home dock footer toggle stayed invisible on the repo's canonical mocked validation surface.
The dock grew its own Home-agent picker while the sidebar identity switcher already owns agent choice; two switchers for one concept was confusing. The dock now derives its target from agentSelection, the picker row and its pinned-agent persistence are removed, and the open-full-page action moves into the dock header.
Cmd/Ctrl+Shift+H toggles the Home assistant dock from anywhere; the shell owns the chord since the assistant panel never handles keydown, and it stays inert when the gateway lacks chat.history/chat.send. The combo shows in both toggle tooltips and the shortcuts overlay. The collapsed-chrome assistant toggle buttons move to shell-assistant-toggles.ts to keep app-shell-view under the max-lines cap.
Route binding during snapshot application can synchronously publish a new snapshot and re-enter applyGatewaySnapshot; the inner application claims connectedClient, so the outer application's stale clientChanged started a second startup and duplicated models.authStatus. Re-evaluate the claim at the branch instead of trusting the stale local. Reproduced via the chat-quota-pill e2e under load (2/3 failing); 6/6 pass after the fix.
CI compact shards wedge execute.supervisor-capture with 120s timeouts that never reproduce locally; the spawn wrapper silently proceeds on an undefined managed run when a once-mock is consumed or reset elsewhere. Reject loudly so the next occurrence names the defeat instead of timing out opaquely.
cef5d24 to
2c1a526
Compare
|
Merged via squash.
|
* feat: keep the Home agent beside your work * refactor: simplify shared assistant shell and pane ownership * test: advertise chat.history and chat.send on the mocked dashboard The mocked Control UI dev server already handles both methods but never advertised them, so the new Home dock footer toggle stayed invisible on the repo's canonical mocked validation surface. * refactor(ui): home dock follows the sidebar agent switcher The dock grew its own Home-agent picker while the sidebar identity switcher already owns agent choice; two switchers for one concept was confusing. The dock now derives its target from agentSelection, the picker row and its pinned-agent persistence are removed, and the open-full-page action moves into the dock header. * feat(ui): add a keyboard chord for the Home dock Cmd/Ctrl+Shift+H toggles the Home assistant dock from anywhere; the shell owns the chord since the assistant panel never handles keydown, and it stays inert when the gateway lacks chat.history/chat.send. The combo shows in both toggle tooltips and the shortcuts overlay. The collapsed-chrome assistant toggle buttons move to shell-assistant-toggles.ts to keep app-shell-view under the max-lines cap. * style: format rebase-resolved handoff scope key * docs: drop inline kbd markup for the Home dock chord * fix(ui): claim pane startup against reentrant snapshot application Route binding during snapshot application can synchronously publish a new snapshot and re-enter applyGatewaySnapshot; the inner application claims connectedClient, so the outer application's stale clientChanged started a second startup and duplicated models.authStatus. Re-evaluate the claim at the branch instead of trusting the stale local. Reproduced via the chat-quota-pill e2e under load (2/3 failing); 6/6 pass after the fix. * test(agents): fail fast when the supervisor spawn mock is defeated CI compact shards wedge execute.supervisor-capture with 120s timeouts that never reproduce locally; the spawn wrapper silently proceeds on an undefined managed run when a once-mock is consumed or reset elsewhere. Reject loudly so the next occurrence names the defeat instead of timing out opaquely.
Closes #133632 — keep the Home agent available in an app-level dock.
What Problem This Solves
Talking to the personal Home agent currently means leaving the active work page or arranging a chat split. Ask OpenClaw has an app-level dock, but it is a different system-care conversation.
Why This Change Was Made
Reuse the existing dock controller and normal Home chat pane, separating composer focus from application navigation ownership. Home and Ask OpenClaw share placement/chrome but retain distinct conversations and permissions. No new chat RPC, provider protocol, transcript store, database schema, or background model call.
User Impact
Evidence
git diff --checkpasses.ae2ad16c976014f428121067e81cf15d52947091: formatting, guard checks, all three dead-export scans, i18n, core test types, UI types, and core lint passed. After the gateway restart, the old process handle no longer exposed the aggregate exit status; its sequential log reached the final style batch without failure. All six current-head stylesheet batches were then rerun with captured exit codes: all 0. No aggregate exit result is inferred from the lost handle.Reproduction commands
pnpm ui:build node scripts/check-changed.mjs --base 3ef446c7b6bd9e8dcab49727f55594c717c2ed4d node scripts/run-vitest.mjs ui/src/components/assistant-panel.test.ts ui/src/pages/chat/chat-work-context.test.ts ui/src/pages/chat/chat-send-submit.test.ts ui/src/pages/chat/chat-page.test.ts ui/src/pages/chat/chat-page-retained-sessions.test.ts ui/src/app/app-host.dock-suppression.test.ts ui/src/pages/chat/components/chat-pane-header.test.ts ui/src/pages/chat/chat-pane-browser-annotation-lifecycle.test.ts node scripts/run-vitest.mjs ui/src/pages/chat/chat-pane-attachment-handoff.test.ts ui/src/pages/chat/chat-pane-lifecycle.test.ts ui/src/pages/chat/chat-pane-retained-presentation.test.ts ui/src/pages/chat/chat-page-attachment-handoff.test.ts node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/custodian-panel-toggle.e2e.test.ts ui/src/e2e/initial-connect-splash.e2e.test.ts pnpm --dir ui test --project chromium src/components/sidebar-attention-layout.browser.test.tsVisual evidence (mocked Control UI dashboard)
Captured on the repo's mocked Control UI dev server (
pnpm dev:ui:mock) at headf4468a2ddca— the real UI bundle running against the deterministic mock gateway; every name, session, and path shown is fixture data. The demo fixture's unrelated "session needs attention" toast is hidden via CSS in two captures for legibility.Before (
origin/main): the sidebar footer has no Home toggle; talking to the Home agent means leaving the work page.After: the same work session with the new footer toggle (bottom left, next to the avatar):
Home dock open beside the work page — Home / Ask OpenClaw tabs, the open-full-page/dock/close header actions, and the "Working on" row:
"Working on" expanded shows the bounded quoted-JSON reference snapshot that will accompany the next message:
Draft typed in the dock composer:
Open Home full page: the dock hides, the full Home page owns the conversation, and the draft carries over losslessly:
Sending in the dock: the sent message visibly carries the "Working context captured at send time" reference block (plain text in conversation history, by design); the mock gateway's echo reply confirms the context traveled with the send:
Bottom dock placement, same draft retained:
The capture script also asserted: no footer toggle on
origin/main; zero dock elements after the full-page handoff; and the exact draft text present in the page composer.f177e16c89fmakes the mocked dashboard advertisechat.history/chat.send(it already handled both), so the Home dock is visible onpnpm dev:ui:mock; changed-file checks pass on that commit.24b94c71e37adds a keyboard chord: Cmd/Ctrl+Shift+H toggles the Home dock from any route (inert withoutchat.history/chat.send), the combo shows in both toggle tooltips and the shortcuts overlay, and the collapsed-chrome assistant toggles move intoshell-assistant-toggles.tsto respect the max-lines cap. Live-verified on the mocked dashboard: chord opens and closes the dock (also with the sidebar collapsed), tooltip renders "Talk to your Home agent (⌘⇧H)", and the overlay's Panels section lists the chord. A shell keydown regression test covers dispatch and the availability gate.Collapsed sidebar: the assistant toggles sit in the top chrome, dock opened via the chord:
f4468a2ddcaremoves the dock's own Home-agent picker after maintainer feedback: the sidebar agent switcher already owns agent choice, so the dock now followsagentSelection(system agents excluded), drops the pinned-agent persistence, and moves Open Home full page into the dock header. Net −23 lines; owner/sibling suites (assistant panel, work context, dock suppression, attachment handoff, chat page) pass, changed-file gates and a fresh scoped-clean autoreview pass.Live proof status
A live dev-gateway walkthrough is still outstanding. The earlier session's browser tool refused localhost navigation (
browser navigation blocked by policy); the current review session confirmed its browser can reach localhost, so a live capture is feasible in a follow-up once the isolated dev gateway has an authenticated model provider. The preserved dev-gateway state from the earlier attempt remains available. The captures above are real rendered UI on the mocked dashboard, not a live gateway session, and are not presented as live proof.Refactor and size
The route/page owns selected session and persisted navigation; an application-scoped focus owner selects the input region. Normal chat owns sending, retrying, and history. Composer handoff is fenced by gateway, authenticated recovery profile, conversation, and current client.
Removed the standalone custodian panel/chrome, pane-side navigation writes during focus/send, and duplicated workspace-root resolution. Consolidated repeated pairing-modal markup, window listener registration, and classic/split edge-drop handling; relocated regression tests into existing owner suites without lint suppressions. Existing dock preferences are retained. Current production delta: +925 lines; tests: +682; docs/generated: +13. Positive production growth implements the new persistent dock, inspectable context, and lossless composer handoff; no new backend subsystem.
Context is deliberately visible plain text in conversation history. Structured historical context cards remain a possible later improvement, not a parallel protocol in this change.
Rebased onto current
main(e7bacb6e552) for landing; conflicts with #133628's outbox-scope rename were resolved by adoptingresolveUiConversationIdentityat the three call sites. 293 owner/sibling tests pass post-rebase.CI's
checks-ui-e2eshard caught a real regression on the rebased head: the chat-quota-pill e2e saw 3models.authStatusrequests instead of 2. Root cause: the new route binding can synchronously publish a snapshot duringapplyGatewaySnapshot, and the reentrant application plus the outer staleclientChangedran pane startup twice. Fixed in782468c1b5eby re-evaluating the startup claim at the branch (claim-before-reentry); reproduced locally under load (2/3 failing), 6/6 passing after the fix, and the full chat owner suite (12,412 tests) passes.Landing blocker: compact-shard worker starvation (CI infra, not this PR)
Five consecutive CI runs at head
782468c1b5efailchecks-node-compact-large-3/-9with roaming 120s test timeouts in code this PR does not touch:src/agents/cli-runner/execute.supervisor-capture.test.ts(4x),src/audit/message-delivery-progress-store.test.ts(1x, runner git-credential outage), andsrc/agents/embedded-agent-subscribe.handlers.lifecycle.test.ts(1x). Evidence that this is shard-level starvation rather than a regression: the merge tree'ssrc/agentsis byte-identical to main (this PR changes onlyui/**, docs, and the mocked dashboard script); main's own CI is green on the same projects; and locally the single test, whole file, wholeagents-supportproject (4,962 tests), the exact 118-file shard subset (2,737 tests), CI env vars, CI file order, and load variants all pass on both main and this branch. The failing worker's event loop wedges (202s elapsed against a 120s timeout), consistent with the compact job's two concurrent vitest runs plus module-cache transform storms on 8 vCPUs. The shard concurrency/timing budget is owned by the CI plan (scripts/lib/ci-node-test-plan.mts, timings refit #134024 in flight); this PR intentionally does not patch unrelated core tests or CI budgets.