Repository navigation
feat(ui): add a background tasks pane to chat panes - #104010
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30b20dc392
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .chat-tasks-rail { | ||
| grid-column: -2; | ||
| grid-row: 1; | ||
| display: flex; |
There was a problem hiding this comment.
Hide the tasks rail at the narrow breakpoint
When a user opens the background-tasks rail and then narrows the chat below 1120px, this new rail still renders as display: flex: the existing narrow media rule only hides .chat-workspace-rail while both task toggles are hidden and .chat-workbench switches to flex layout. That leaves the tasks rail taking space ahead of the chat with no visible close affordance. Add .chat-tasks-rail to the narrow breakpoint hide/collapse behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 633e283deb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const current = getBackgroundTasksState(host); | ||
| if (current !== state || current.requestId !== requestId) { | ||
| return; | ||
| } | ||
| current.tasks = mergeTaskLists(recent, active); | ||
| current.loadedClient = client; |
There was a problem hiding this comment.
Ignore task loads from prior connections
If the background-tasks rail is open while a tasks.list request spans a disconnect/reconnect that reuses the same GatewayBrowserClient, this stale response can still pass the requestId check and set loadedClient back to the client. The next connected render then sees loadedClient === host.client and skips the refetch that the disconnect path is trying to force, so any task events missed while offline leave the rail and badge stale until a manual refresh; stale errors can similarly block auto-reload. Tie the response to the current connected epoch/client state, or invalidate the request id on disconnect.
Useful? React with 👍 / 👎.
|
Codex review: stale review; fresh review needed. Summary Next step |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5f7ad2f16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const payload = await client.request("tasks.cancel", { taskId }); | ||
| if (getBackgroundTasksState(host) !== state) { |
There was a problem hiding this comment.
Guard task cancels against reconnects
When an operator clicks Stop and the Gateway disconnects/reconnects before tasks.cancel resolves, ChatPane increments connectionEpoch even if the same browser client object is reused, but this handler only checks that the background-task state object is still current. A stale cancellation refusal or task snapshot can therefore set state.error or replace rows after the reconnect and after a fresh task list is loaded; the existing Tasks page avoids this with an operation epoch in its cancellation lifecycle. Capture/check the connection epoch (or invalidate pending cancels on disconnect) before applying this response.
Useful? React with 👍 / 👎.
* origin/main: fix(tui): preserve UTF-16 pairs in long tokens (#104024) fix(release): raise Telegram attestor buffer (#104025) fix(slack): apply sender policy to group DMs (#104007) feat(ui): add a background tasks pane to chat panes (#104010) docs(changelog): credit landed fixes fix(installer): clean temporary files on failure (#103725) fix(clickclack): sanitize outbound assistant text (#103142) fix(sms): normalize Twilio RCS webhook senders (#102373)
* feat(ui): add background tasks rail to chat panes * chore(i18n): sync control-ui locale bundles * fix(ui): match gateway owner-key task scoping and hide tasks rail on narrow viewports * chore(i18n): translate background tasks rail strings
…panes The tasks rail (from #104010) only rendered as a right-docked 230-280px column and vanished with its toggles below a 1120px viewport, so narrow split-view panes got a crushed thread and compact windows lost access to background tasks entirely — the same bug class #104033 fixed for the workspace rail and detail panel. The rail now follows the pane's measured width: it presents as a full-width bottom strip (sections side by side like the workspace rail's bottom dock) when the pane is too narrow for a side column, and the workspace rail keeps first claim on the side slot when only one column fits. Side-docked rails, not bottom strips, now count against the width available to the chat + detail split. Closes #104091
…panes (#104107) The tasks rail (from #104010) only rendered as a right-docked 230-280px column and vanished with its toggles below a 1120px viewport, so narrow split-view panes got a crushed thread and compact windows lost access to background tasks entirely — the same bug class #104033 fixed for the workspace rail and detail panel. The rail now follows the pane's measured width: it presents as a full-width bottom strip (sections side by side like the workspace rail's bottom dock) when the pane is too narrow for a side column, and the workspace rail keeps first claim on the side slot when only one column fits. Side-docked rails, not bottom strips, now count against the width available to the chat + detail split. Proof: check:changed + 212 focused tests green on Testbox at this exact content; codex autoreview clean; chromium+webkit visual verification at seven window widths plus split view with zero geometry overlaps. Landed with maintainer CI override. Closes #104091
…panes (openclaw#104107) The tasks rail (from openclaw#104010) only rendered as a right-docked 230-280px column and vanished with its toggles below a 1120px viewport, so narrow split-view panes got a crushed thread and compact windows lost access to background tasks entirely — the same bug class openclaw#104033 fixed for the workspace rail and detail panel. The rail now follows the pane's measured width: it presents as a full-width bottom strip (sections side by side like the workspace rail's bottom dock) when the pane is too narrow for a side column, and the workspace rail keeps first claim on the side slot when only one column fits. Side-docked rails, not bottom strips, now count against the width available to the chat + detail split. Proof: check:changed + 212 focused tests green on Testbox at this exact content; codex autoreview clean; chromium+webkit visual verification at seven window widths plus split view with zero geometry overlaps. Landed with maintainer CI override. Closes openclaw#104091
* origin/main: fix(tui): preserve UTF-16 pairs in long tokens (openclaw#104024) fix(release): raise Telegram attestor buffer (openclaw#104025) fix(slack): apply sender policy to group DMs (openclaw#104007) feat(ui): add a background tasks pane to chat panes (openclaw#104010) docs(changelog): credit landed fixes fix(installer): clean temporary files on failure (openclaw#103725) fix(clickclack): sanitize outbound assistant text (openclaw#103142) fix(sms): normalize Twilio RCS webhook senders (openclaw#102373)


Closes #104003
What Problem This Solves
Background work (subagent spawns, cron executions, ACP runs, CLI/media jobs) was only visible on the separate Tasks page or
openclaw tasks list. While chatting there was no way to see what the agent is doing in the background, stop a runaway subagent, or open a subagent's transcript without leaving the conversation.Why This Change Was Made
Adds a collapsible Background tasks rail to each Control UI chat pane, following the existing session-workspace rail pattern. The rail is scoped to the pane's agent through the existing
tasks.list { agentId }filter, kept live by the existingtaskgateway event, and cancels throughtasks.cancel— no new gateway RPCs, events, or config surfaces. Shared task normalizers/label helpers moved from the Tasks page intoui/src/lib/tasks/data.tsso both surfaces use one canonical data path. Rail state is per-pane and in-memory (collapsed by default); no new persisted settings.User Impact
operator.write).Evidence
ui/src/pages/chat/components/chat-background-tasks.test.ts(agent-scoped loads, live event upsert/delete/restore handling, cancellation refusal surfacing, render actions) and movedui/src/lib/tasks/data.test.ts.ui/src/pages/chat/background-tasks.e2e.test.ts— opens the rail, asserts agent-scopedtasks.listparams, pushes ataskcompletion event and watches the row move Running → Finished, clicks Stop and asserts thetasks.cancelrequest, clicks View transcript and asserts pane navigation to the child session.pnpm test ui/src/pages/chat/components/chat-background-tasks.test.ts ui/src/lib/tasks/data.test.ts ui/src/pages/tasks/tasks-page.test.ts(15 passed),pnpm test ui/src/pages/chat/background-tasks.e2e.test.ts(passed),pnpm tsgo:test:uiclean,pnpm ui:i18n:checkclean.Docs:
docs/web/control-ui.mdchat section anddocs/automation/tasks.mdControl UI section updated.