Repository navigation
feat(ui): show what an idle chat is waiting on - #198891
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds an idle-chat waiting card that names background commands and opens their output in Processes. Example: The agent starts sh wait-for-deploy.sh in the background and ends its turn.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds useful, maintainer-approved visibility into pending background work, with no actionable code findings; the earlier asset-budget finding is resolved by recorded acceptance. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe process registry supplies session-scoped observations to the Gateway; the Control UI derives waiting cards from the shared process observation and uses existing panel navigation. flowchart LR
A[Background exec registry] --> B[Process observation]
B --> C[Gateway process list]
C --> D[Shared UI process observation]
D --> E[Idle composer waiting card]
E --> F[Processes output panel]
Technical reviewBest possible solution: Retain the focused waiting-card implementation and handle the attributed CI failures through the existing landing workflow. Do we have a high-confidence way to reproduce the issue? Current-main source and the supplied before captures establish the missing composer indication; no target code was executed during this review. Is this the best way to solve the issue? The change uses the existing completion fact, shared process observation, lazy composer boundary, and panel navigation, providing the smallest coherent implementation of the requested feature. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5ee546414080. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +256, Tests +89, Docs +2. Total +347 across 12 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 1:39 PM ET / 18:39 UTC (Revision 2). |
|
Maintainer decision on the |
When the agent ends its turn and a background command will continue the chat on exit, a calm card above the composer names the command and its elapsed time. Selecting it opens that command's live output in Processes, where Stop is available. Several waiters collapse to one summary row. sessions.processes.list marks those running rows with wakesSession, from the existing process registry and completion guards. Co-authored-by: obviyus <[email protected]>
Share the composer stack card rules instead of shipping a separate stylesheet, move session keying and run-state checks into the lazy card, and open output through the existing Processes action. Co-authored-by: obviyus <[email protected]>
…tion Process observation reads the exit-wake fact from the exec result formatter that now owns it, instead of a second copy in the registry. Co-authored-by: obviyus <[email protected]>
7d52a6c to
05a3083
Compare
|
Rebased onto main after #198908 landed; the exit-wake check is now shared with the exec formatter instead of duplicated in the registry. Size growth is maintainer-approved (see earlier comment). @clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Maintainer override for exact head 05a3083 (ClawSweeper
All other required jobs are green on this head ( |
|
Landed as a519dcf. When the chat is idle and a background command will wake it, a card above the composer now shows what it is waiting on, with elapsed time and a link to the live output and Stop. Verified with a real agent on an isolated Gateway (screenshots and video above). |
## What Problem This Solves An agent can end its turn and wait for a background command whose exit continues the chat (`tools.exec.notifyOnExit`, on by default). Nothing in the conversation says that work is pending. The only signal is a quiet ring in the sidebar, and raw completion notices are hidden from chat history, so the chat looks finished until the agent suddenly replies. ## User Impact While the chat is idle and a background command will continue it, a card above the composer reads **Waiting on `<command>`** with its elapsed time. Selecting it opens that command's live output in **Processes**, where **Stop** already lives. Two or more waiters collapse to **Waiting on N processes**; expanding it lists each one. The card hides while a turn runs and disappears when the command exits, as its completion starts the next turn. A requested Stop removes it at once, because a stopped command does not continue the chat. Chats with no background work load nothing new. ## Why This Change Was Made - **Data:** `sessions.processes.list` rows gain an optional `wakesSession: true`. The existing process observation sets it for running, backgrounded commands that still have a captured chat destination and no requested Stop, matching the completion owner's guards. It reuses `hasExitWake`, the exit-wake check that openclaw#198908 added beside the exec result formatter, so the card and the agent's guidance read the same fact. The additive protocol field has no version bump; protocol outputs and validators were regenerated (no generated diff). - **UI:** the card shares the composer stack's card rules with the goal and progress cards (selector lists in `composer-progress.css`, no new stylesheet), plus the shared session spinner, `ElapsedTime` and the scroll-state name fade. It reads the existing `ProcessesPanelData` observation, the same owner Processes and Details use, so reads, `sessions.processes.changed` refreshes and access errors behave identically. It mounts only while the session row reports `backgroundProcessCount`; session keying and run-state checks live in the lazy chunk. - **Opening output:** selecting a command reuses the existing Details → Processes action, so **Back** returns to Details, which lists the running commands. - **Not Labs:** like the sidebar background-work ring (openclaw#188433), this presents existing state without new cost or config. ## Evidence Real Gateway, real agent (`gpt-5.5` through the OpenAI Responses API), isolated state and port. The agent started `sh wait-for-deploy.sh` and later `sh watch-ci.sh` itself as background exec calls, then ended its turn. Before: `main` at `39efe6fb1cd8` (dist fixture). After: this branch, Gateway from source with the branch's production Control UI build. Avatars are blurred in every capture. | Scenario | Before | After | | --- | --- | --- | | Idle, waiting on one command · 1440×900 · dark |  |  | | Idle, waiting on one command · 1440×900 · light |  |  | | Idle, waiting on one command · 390×844 · dark |  |  | | Idle, waiting on one command · 390×844 · light |  |  | New states: | State | Screenshot | | --- | --- | | Card selected: live output and Stop in Processes · 1440×900 · dark |  | | Card selected · 1440×900 · light |  | | Card selected · 390×844 · dark |  | | Two waiters, collapsed · 1440×900 · dark |  | | Two waiters, expanded · 1440×900 · dark |  | | Two waiters, expanded · 1440×900 · light |  | | Two waiters, expanded · 390×844 · dark |  | | Two waiters, expanded · 390×844 · light |  | The video (real time, ~98 s) starts with two waiters. The first command exits: the card hides while the woken turn runs, the agent reports the deploy, and the card returns for the remaining command. The second exit ends with no card. https://github.com/user-attachments/assets/a1c1a505-a49b-40f8-bc37-44d22956c264 Also exercised on the same Gateway: selecting **Stop** in the opened detail removed the card within one refresh and started no turn; a fresh page load showed the card within 0.5 s. - `ocx test`: `bash-process-observation.test.ts` 8 passed (new case: only running, destination-captured, unstopped processes are marked; exit clears it) and `chat-composer-waiters.test.tsx` 1 passed (filters non-waiters, opens the selected output, collapses two waiters and expands them). - UI typecheck, scoped oxlint/oxfmt, stylelint, Control UI controller guard, `ui:i18n:verify` and baseline (no change), test-lines ratchet (+92 of 400) passed. `protocol:gen` and `ui:validators:gen` produced no diff. - Control UI budgets vs the `39efe6fb1cd8` base build (`ui:check-performance --base-dist`): chat boot JS +202 B gzip (the lazy gate), total CSS +114 B gzip / +871 B raw, startup and New Session +10 B. The first revision added +449 B JS and +848 B CSS gzip; sharing the composer stack rules and moving logic into the lazy chunk removed most of it. Because the base already exceeds these caps, the gate allows 64 B, so `control-ui-performance` still fails on this growth. ## CI Rebased onto `main` after openclaw#198908 landed (head `05a3083e`); CI for this head is running. Known reds on the previous head: - `control-ui-performance`: caused by this PR (chat boot JS +220 B gzip, total CSS +114 B gzip). `main` is already over these caps, so the gate allows 64 B. Maintainer-approved in openclaw#198891 (comment). - `check-test-types`: inherited (`scripts/perf/state-read-worker-bench.ts`, not touched here). - A local `ocx build --dts` of this head stops at the absolute Control UI budget check, as current `main` commits (`b160df89`, `0212c217`) do; the packed tarball integrity check, `openclaw --version` and `gateway --help` pass. Co-authored-by: Ayaan Zaidi <[email protected]>
…199456) ## What Problem This Solves The composer **Waiting on `<command>`** card added in #198891 shows the same running commands that the session **Details** panel already lists under **Processes**, next to **View all processes** and **Subagents**. Two places now report the same background work. ## User Impact The card above the composer is gone. The running background command still appears in **Details → Processes**, where it opens its output and **Stop** is available. Exec completion wakes are unchanged: the agent still continues the chat when the command exits. ## Why This Change Was Made - Removes the card component, its test, its lazy mount in the composer, its selectors in `composer-progress.css`, its three English strings and its docs sentences (`docs/web/control-ui/chat.md`, `docs/gateway/background-process.md`, including the adopted-process mention added later in #199222). - Removes the optional `wakesSession` field from `sessions.processes.list` rows. Only the card read it: no other reference exists in `ui`, `apps/macos`, `apps/ios`, `apps/android`, `extensions` or `src`, and the Swift and Kotlin protocol models never included it. It is not in any release: `git tag --contains a519dcf` lists no `v*` tag (`v2026.11.5-beta.3` does not contain it). Main and beta are not shipped contracts. - Keeps `hasExitWake`: exec notifications, `process poll` guidance and durable adoption use it. - `protocol:gen`, `ui:validators:gen`, `protocol:gen:swift` and `protocol:gen:kotlin` produce no diff. Net change: 11 insertions, 358 deletions, 12 files. ## Evidence Real isolated Gateway from source with its own port and state, real agent (`gpt-6-astra` through the OpenAI Responses API). The agent itself started `sh wait-for-deploy.sh` as a background exec whose exit wakes the chat, then ended its turn. Before: `main` at `5fbdf6989130`. After: this branch. Desktop 1440×900, dark theme. The avatar is blurred. | State | Before (`main`) | After (this branch) | | --- | --- | --- | | Idle, waiting on the command |  |  | | Details open |  |  | - Before: `.chat-waiters` count 1. After: count 0. - Details → Processes lists `sh wait-for-deploy.sh` and **View all processes** on both sides. - `sessions.processes.list` on the same running command: before `{status: "running", wakesSession: true, …}`; after `{status: "running", …}` with no `wakesSession`. - After the command exited on the branch Gateway, the wake turn ran and the agent replied: "The script completed successfully and reported that deployment finished: v2 is live." Checks: - `ocx test`: `bash-process-observation.test.ts`, `chat-composer-content.test.tsx`, `chat-composer-status.test.tsx`, `chat-pane-side-panels.test.ts`, `chat-processes-panel.test.ts` pass. - `tsgo:ui`, `tsgo:core`, scoped oxlint and oxfmt, `lint:ui:styles` (stylelint), `check:control-ui-controllers`, `ui:i18n:verify` pass. - Control UI budget, `ui:check-performance --base-dist` against the `5fbdf6989130` build: - chat boot CSS gzip −112 B (139439 → 139327); total CSS −112 B gzip / −871 B raw. - chat boot JS: `control-ui-boot-chat` is 506 B smaller raw, but its hash-normalized gzip is +81 B, so chat boot JS reads +54 B gzip (1310823 → 1310877), inside the 64 B build-variance allowance. `gzip -9` of the same chunk is −127 B. Startup JS −21 B, New Session JS −21 B. - `ocx build --dts` passes; the packed tarball integrity check, `openclaw --version` and `openclaw gateway --help` from the packed tarball pass. Co-authored-by: Ayaan Zaidi <[email protected]>
…penclaw#199456) ## What Problem This Solves The composer **Waiting on `<command>`** card added in openclaw#198891 shows the same running commands that the session **Details** panel already lists under **Processes**, next to **View all processes** and **Subagents**. Two places now report the same background work. ## User Impact The card above the composer is gone. The running background command still appears in **Details → Processes**, where it opens its output and **Stop** is available. Exec completion wakes are unchanged: the agent still continues the chat when the command exits. ## Why This Change Was Made - Removes the card component, its test, its lazy mount in the composer, its selectors in `composer-progress.css`, its three English strings and its docs sentences (`docs/web/control-ui/chat.md`, `docs/gateway/background-process.md`, including the adopted-process mention added later in openclaw#199222). - Removes the optional `wakesSession` field from `sessions.processes.list` rows. Only the card read it: no other reference exists in `ui`, `apps/macos`, `apps/ios`, `apps/android`, `extensions` or `src`, and the Swift and Kotlin protocol models never included it. It is not in any release: `git tag --contains 7f84512` lists no `v*` tag (`v2026.11.5-beta.3` does not contain it). Main and beta are not shipped contracts. - Keeps `hasExitWake`: exec notifications, `process poll` guidance and durable adoption use it. - `protocol:gen`, `ui:validators:gen`, `protocol:gen:swift` and `protocol:gen:kotlin` produce no diff. Net change: 11 insertions, 358 deletions, 12 files. ## Evidence Real isolated Gateway from source with its own port and state, real agent (`gpt-6-astra` through the OpenAI Responses API). The agent itself started `sh wait-for-deploy.sh` as a background exec whose exit wakes the chat, then ended its turn. Before: `main` at `66e7ae55558c`. After: this branch. Desktop 1440×900, dark theme. The avatar is blurred. | State | Before (`main`) | After (this branch) | | --- | --- | --- | | Idle, waiting on the command |  |  | | Details open |  |  | - Before: `.chat-waiters` count 1. After: count 0. - Details → Processes lists `sh wait-for-deploy.sh` and **View all processes** on both sides. - `sessions.processes.list` on the same running command: before `{status: "running", wakesSession: true, …}`; after `{status: "running", …}` with no `wakesSession`. - After the command exited on the branch Gateway, the wake turn ran and the agent replied: "The script completed successfully and reported that deployment finished: v2 is live." Checks: - `ocx test`: `bash-process-observation.test.ts`, `chat-composer-content.test.tsx`, `chat-composer-status.test.tsx`, `chat-pane-side-panels.test.ts`, `chat-processes-panel.test.ts` pass. - `tsgo:ui`, `tsgo:core`, scoped oxlint and oxfmt, `lint:ui:styles` (stylelint), `check:control-ui-controllers`, `ui:i18n:verify` pass. - Control UI budget, `ui:check-performance --base-dist` against the `66e7ae55558c` build: - chat boot CSS gzip −112 B (139439 → 139327); total CSS −112 B gzip / −871 B raw. - chat boot JS: `control-ui-boot-chat` is 506 B smaller raw, but its hash-normalized gzip is +81 B, so chat boot JS reads +54 B gzip (1310823 → 1310877), inside the 64 B build-variance allowance. `gzip -9` of the same chunk is −127 B. Startup JS −21 B, New Session JS −21 B. - `ocx build --dts` passes; the packed tarball integrity check, `openclaw --version` and `openclaw gateway --help` from the packed tarball pass. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
An agent can end its turn and wait for a background command whose exit continues the chat (
tools.exec.notifyOnExit, on by default). Nothing in the conversation says that work is pending. The only signal is a quiet ring in the sidebar, and raw completion notices are hidden from chat history, so the chat looks finished until the agent suddenly replies.User Impact
While the chat is idle and a background command will continue it, a card above the composer reads Waiting on
<command>with its elapsed time. Selecting it opens that command's live output in Processes, where Stop already lives. Two or more waiters collapse to Waiting on N processes; expanding it lists each one.The card hides while a turn runs and disappears when the command exits, as its completion starts the next turn. A requested Stop removes it at once, because a stopped command does not continue the chat. Chats with no background work load nothing new.
Why This Change Was Made
sessions.processes.listrows gain an optionalwakesSession: true. The existing process observation sets it for running, backgrounded commands that still have a captured chat destination and no requested Stop, matching the completion owner's guards. It reuseshasExitWake, the exit-wake check that fix(agents): stop agents polling background waits that will wake them #198908 added beside the exec result formatter, so the card and the agent's guidance read the same fact. The additive protocol field has no version bump; protocol outputs and validators were regenerated (no generated diff).composer-progress.css, no new stylesheet), plus the shared session spinner,ElapsedTimeand the scroll-state name fade. It reads the existingProcessesPanelDataobservation, the same owner Processes and Details use, so reads,sessions.processes.changedrefreshes and access errors behave identically. It mounts only while the session row reportsbackgroundProcessCount; session keying and run-state checks live in the lazy chunk.Evidence
Real Gateway, real agent (
gpt-5.5through the OpenAI Responses API), isolated state and port. The agent startedsh wait-for-deploy.shand latersh watch-ci.shitself as background exec calls, then ended its turn. Before:mainat18892937f802(dist fixture). After: this branch, Gateway from source with the branch's production Control UI build. Avatars are blurred in every capture.New states:
The video (real time, ~98 s) starts with two waiters. The first command exits: the card hides while the woken turn runs, the agent reports the deploy, and the card returns for the remaining command. The second exit ends with no card.
waiters-wake-final.mp4
Also exercised on the same Gateway: selecting Stop in the opened detail removed the card within one refresh and started no turn; a fresh page load showed the card within 0.5 s.
ocx test:bash-process-observation.test.ts8 passed (new case: only running, destination-captured, unstopped processes are marked; exit clears it) andchat-composer-waiters.test.tsx1 passed (filters non-waiters, opens the selected output, collapses two waiters and expands them).ui:i18n:verifyand baseline (no change), test-lines ratchet (+92 of 400) passed.protocol:genandui:validators:genproduced no diff.18892937f802base build (ui:check-performance --base-dist): chat boot JS +202 B gzip (the lazy gate), total CSS +114 B gzip / +871 B raw, startup and New Session +10 B. The first revision added +449 B JS and +848 B CSS gzip; sharing the composer stack rules and moving logic into the lazy chunk removed most of it. Because the base already exceeds these caps, the gate allows 64 B, socontrol-ui-performancestill fails on this growth.CI
Rebased onto
mainafter #198908 landed (head05a3083e); CI for this head is running. Known reds on the previous head:control-ui-performance: caused by this PR (chat boot JS +220 B gzip, total CSS +114 B gzip).mainis already over these caps, so the gate allows 64 B. Maintainer-approved in feat(ui): show what an idle chat is waiting on #198891 (comment).check-test-types: inherited (scripts/perf/state-read-worker-bench.ts, not touched here).ocx build --dtsof this head stops at the absolute Control UI budget check, as currentmaincommits (e741fd0d,d98f18ff) do; the packed tarball integrity check,openclaw --versionandgateway --helppass.