Skip to content

feat(ui): show background tasks live in the web Control UI#100789

Merged
steipete merged 7 commits into
mainfrom
claude/mystifying-davinci-33f3b9
Jul 6, 2026
Merged

feat(ui): show background tasks live in the web Control UI#100789
steipete merged 7 commits into
mainfrom
claude/mystifying-davinci-33f3b9

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw tracks background work (subagent spawns, cron executions, ACP runs, gateway-dispatched CLI and media runs) in the task registry, but the only surfaces are the CLI (openclaw tasks list) and the chat /tasks board. The web Control UI has no way to see what detached work is running, whether it succeeded, or to cancel a stuck task.

Closes #100706.

Why This Change Was Made

Operators watching an agent fan out subagents from the dashboard are blind to that work today. The gateway already exposes tasks.list / tasks.get / tasks.cancel, and the task registry already has an (unused in prod) observer seam — so the web UI can get a live task ledger without polling by broadcasting registry changes the same way the cron page consumes the cron event.

User Impact

  • New Tasks page in the Control UI sidebar (after Cron Jobs): an Active section (queued/running) and a Recent section (last 50 terminal tasks), each row showing status, runtime (Subagent/Cron/ACP/CLI), agent, relative time, progress or terminal summary, an Open session link to the backing chat session, and Cancel for active tasks.
  • The page updates push-driven through a new additive gateway broadcast event task ({action: "upserted"|"deleted"|"restored", ...}) emitted from task registry changes with the same bounded public TaskSummary mapping the RPC handlers use. No polling; a manual Refresh button and reconnect refetch cover the rest.
  • Docs: docs/automation/tasks.md gains a Control UI subsection; docs/web/control-ui.md lists the Tasks page.

Live screenshots (real gateway, real OpenAI gpt-5.5 agent runs):

Active tasks while three spawned subagents run — status chips, runtime chips, cancel buttons:

Active tasks running

After cancelling a running subagent from the UI — the pushed task event moves the row to Recent as Cancelled ("Cancelled by operator."), completed subagents show their terminal summaries:

After cancel

Evidence

Implementation notes:

  • src/gateway/server-methods/task-summary.ts: public TaskSummary mapping + closed TaskEventPayload union extracted from server-methods/tasks.ts so RPC responses and the broadcast share one bounded mapping (status text sanitized/truncated, runtime statuses translated to the ledger vocabulary, lostfailed).
  • src/gateway/server-runtime-subscriptions.ts: registers the task-registry observer lazily at startup and broadcasts task events with dropIfSlow; disposal wired through server-runtime-handles.tsserver.impl.tsserver-close.ts.
  • "task" added to GATEWAY_EVENTS; iOS/Android allowlisted in scripts/protocol-event-coverage.allowlist.json (no mobile consumer yet).
  • ui/src/pages/tasks/: data.ts (defensive normalization, deterministic sort, active/recent partition, event merge), tasks-page.ts (gateway lifecycle, push events, cancel), view.ts (sections/rows from existing list/chip styles).
  • i18n: English strings + pnpm ui:i18n:sync regenerated locale bundles.

Verification:

  • Live end-to-end against a real gateway (--dev profile) with a real OpenAI gpt-5.5 agent: prompts spawned subagents via sessions_spawn; the page showed queued/running rows live (pushed events, no refresh), completed tasks moved to Recent with terminal summaries, and clicking Cancel on a running subagent cancelled it (tasks.cancel) and re-rendered it as Cancelled via the pushed event — see screenshots above.
  • pnpm test ui/src/pages/tasks src/gateway/server-runtime-subscriptions.test.ts src/gateway/server-methods/tasks.test.ts ui/src/i18n (Testbox): green, including the mocked-gateway Playwright e2e (tasks.e2e.test.ts: sections render, pushed completion moves rows, cancel request asserted).
  • pnpm tsgo + pnpm tsgo:test:ui + pnpm tsgo:test:src (Testbox): green.
  • node scripts/check-protocol-event-coverage.mjs: green (30 gateway events, task allowlisted for both mobile clients).
  • pnpm ui:i18n:check: green after locale sync.
  • Codex autoreview (gpt-5.5): clean.

Review rounds

Six review findings (Codex autoreview + the GitHub Codex review bot) were verified and fixed on this branch before landing:

  1. Active tasks hidden beyond the first tasks.list page → dedicated queued/running query merged over page one (mergeTaskLists).
  2. task broadcast dropped by the gateway broadcaster (missing EVENT_SCOPE_GUARDS entry) → task: [READ_SCOPE] + scope-guard regression test; re-proven live (13 rows pushed to an open page with zero extra tasks.list calls).
  3. Ledger paged by created-time hid just-finished old tasks → tasks.list now pages by last activity (taskUpdatedAt) with a regression test.
  4. Cancel button shown to read-only operators (tasks.cancel is operator.write) → gated on hasOperatorWriteAccess.
  5. tasks.cancel refusals (successful responses with cancelled: false + reason) were silent → surfaced as errors (normalizeTasksCancelResult).
  6. Stale task-observer disposal could clear a replacement gateway's registration → identity-guarded cleanup that shutdown awaits, with an overlapping-restart regression test.

Final Codex autoreview on the branch: clean (no actionable findings).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: L maintainer Maintainer-authored PR labels Jul 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a0a5c1efc

ℹ️ 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".

Comment thread ui/src/pages/tasks/tasks-page.ts
Comment thread ui/src/pages/tasks/view.ts
Comment thread src/gateway/server-runtime-subscriptions.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37473b082b

ℹ️ 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".

Comment thread src/gateway/server-methods/task-summary.ts
@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 6, 2026, 9:33 AM ET / 13:33 UTC.

Summary
The branch adds a Tasks route to the web Control UI, a read-scoped task gateway broadcast from task registry observers, shared task-summary mapping, docs, i18n, protocol event allowlisting, and tests.

PR surface: Source +1522, Tests +455, Docs +6, Other +2. Total +1985 across 70 files.

Reproducibility: yes. the review findings are source-reproducible from the current PR head. The affected paths are tasks-page.ts for Recent/cancel behavior and task-summary.ts plus tasks.ts for terminal ordering and cursor pagination.

Review metrics: 2 noteworthy metrics.

  • Gateway Event Surface: 1 added: task. A new broadcast event needs explicit scope, protocol coverage, and client behavior review before merge.
  • Task List Contract: 1 changed: ordering behind cursor pagination. Existing clients can follow tasks.list cursors, so ordering changes are compatibility-sensitive.

Stored data model
Persistent data-model change detected: persistent cache schema: ui/src/i18n/.i18n/fr.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/zh-TW.tm.jsonl. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #100706
Summary: This PR is the implementation candidate for the linked Control UI Tasks feature issue, but the PR still needs technical fixes before it can close that issue.

Members:

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

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦪 silver shellfish
Result: blocked by patch quality or review findings.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix the four task-ledger review findings and add focused regression coverage for each edge case.
  • [P2] Rerun the targeted Tasks page, gateway task-methods, gateway subscription, i18n, and protocol event coverage checks after the repair.

Risk before merge

  • [P1] Merging as-is can make the new Tasks page omit recent terminal work when active tasks fill the unfiltered Recent page or old tasks finish after stale progress.
  • [P1] Changing tasks.list to mutable updated-time ordering while keeping numeric offset cursors can skip or duplicate rows for existing cursor-following clients.
  • [P1] A late tasks.cancel response can insert task state from a previous gateway/client after reconnect or gateway switch.

Maintainer options:

  1. Fix Task Ledger Correctness Before Merge (recommended)
    Repair the terminal Recent query, terminal ordering, stable pagination, and stale cancel guards before this new gateway/UI surface lands.
  2. Pause For Product Surface Decision
    If maintainers are not ready to accept the standalone page and gateway event, keep the linked issue open and pause or close this implementation branch.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Fix the Tasks page and gateway task ledger blockers: fetch Recent with terminal statuses or page until 50 terminal rows; compute terminal updatedAt from endedAt before lastEventAt; replace mutable offset pagination over taskUpdatedAt with a stable cursor/snapshot or stable cursor-safe ordering; guard tasks.cancel success, error, and cleanup mutations by captured client/generation after awaits; add focused regression coverage for each case.

Next step before merge

  • [P2] This is a safe repair-lane candidate for the four concrete source-backed blockers; final product acceptance remains maintainer-owned.

Maintainer decision needed

  • Question: After the correctness blockers are fixed, should OpenClaw accept a standalone Control UI Tasks route plus read-scoped task gateway event for this feature?
  • Rationale: The PR adds a new visible Control UI page and gateway event for an issue previously marked as needing product direction; automation can repair the code defects, but it cannot choose the permanent product surface.
  • Likely owner: steipete — steipete is the strongest routing owner from recent Control UI navigation work and the linked product-direction issue context.
  • Options:
    • Accept After Technical Fixes (recommended): Land the dedicated Tasks page and task event after the four task-ledger correctness blockers are repaired and validated.
    • Fold Into Broader Dashboard Work: Pause this PR and keep [Feature]: Show running background tasks in the web Control UI #100706 open for a broader dashboard or Workboard-owned design.
    • Decline New Core Surface: Close the PR and leave task inspection/cancel to the existing CLI and chat task board for now.

Security
Cleared: No concrete security or supply-chain concern found; the diff does not change dependencies, workflows, lockfiles, secrets, or package execution, and the new task broadcast is read-scoped.

Review findings

  • [P2] Fetch Recent with terminal task statuses — ui/src/pages/tasks/tasks-page.ts:107
  • [P2] Use terminal end time for terminal ordering — src/gateway/server-methods/task-summary.ts:28-30
  • [P2] Avoid offset cursors over mutable task order — src/gateway/server-methods/tasks.ts:124-131
Review details

Best possible solution:

Keep the standalone Tasks route and read-scoped task event shape, but fix terminal-only Recent fetching, terminal updatedAt semantics, stable pagination, and stale-cancel guards before maintainer product sign-off.

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

Yes, the review findings are source-reproducible from the current PR head. The affected paths are tasks-page.ts for Recent/cancel behavior and task-summary.ts plus tasks.ts for terminal ordering and cursor pagination.

Is this the best way to solve the issue?

No, not yet: the standalone page and task event are a maintainable direction, but the current implementation is not the best mergeable shape until the task-ledger edge cases are fixed with focused regression coverage.

Full review comments:

  • [P2] Fetch Recent with terminal task statuses — ui/src/pages/tasks/tasks-page.ts:107
    This is still present on the current head after the previous review cycle. The Recent request is unfiltered, so if 200 queued/running tasks have newer activity than completed/failed/cancelled rows, mergeTaskLists and partitionTasks receive no terminal rows for Recent even though terminal work exists. Request terminal statuses for this fetch, or page until the UI has the intended terminal rows.
    Confidence: 0.94
  • [P2] Use terminal end time for terminal ordering — src/gateway/server-methods/task-summary.ts:28-30
    This is still present on the current head after the previous review cycle. taskUpdatedAt prefers lastEventAt, but finalizers such as tryFinalizeTrackedAgentTask can finish a task with only endedAt, leaving an old progress timestamp to rank a just-finished task. For terminal statuses, prefer endedAt before lastEventAt so Recent reflects actual completion time.
    Confidence: 0.92
  • [P2] Avoid offset cursors over mutable task order — src/gateway/server-methods/tasks.ts:124-131
    This is still present on the current head after the previous review cycle. The PR now orders tasks.list by activity time but keeps numeric offset cursors; while a client is paging, a task from a later page can receive progress and move before the stored offset, causing rows to be skipped or duplicated. Use a cursor-safe stable ordering or a stable snapshot/page token for updated-time pagination.
    Confidence: 0.9
  • [P2] Ignore stale cancel results after reconnect — ui/src/pages/tasks/tasks-page.ts:137-152
    This is still present on the current head after the previous review cycle. refreshTasks() guards mutations with the captured client/generation, but cancelTask() applies the awaited tasks.cancel result, error, and cancellingTaskIds cleanup unconditionally. If the operator reconnects or switches gateways during the request, stale task state can be inserted into the new page.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 25a7708f19ca.

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: The PR changes tasks.list ordering behind existing cursor pagination and adds a new gateway event surface.
  • add merge-risk: 🚨 session-state: The current cancel path can apply task state from a stale gateway client after reconnect or gateway switch.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.

Label justifications:

  • P2: This is a normal-priority operator UX feature with concrete correctness blockers but no setup blocker, crash loop, or urgent production regression.
  • merge-risk: 🚨 compatibility: The PR changes tasks.list ordering behind existing cursor pagination and adds a new gateway event surface.
  • merge-risk: 🚨 session-state: The current cancel path can apply task state from a stale gateway client after reconnect or gateway switch.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes live-gateway screenshots and live-run notes; I inspected the running-tasks screenshot, and the current Real behavior proof check is passing.
Evidence reviewed

PR surface:

Source +1522, Tests +455, Docs +6, Other +2. Total +1985 across 70 files.

View PR surface stats
Area Files Added Removed Net
Source 58 1671 149 +1522
Tests 8 455 0 +455
Docs 3 7 1 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 70 2135 150 +1985

Acceptance criteria:

  • [P1] pnpm test ui/src/pages/tasks src/gateway/server-methods/tasks.test.ts src/gateway/server-runtime-subscriptions.test.ts ui/src/i18n.
  • [P1] pnpm tsgo.
  • [P1] pnpm tsgo:test:ui.
  • [P1] pnpm tsgo:test:src.
  • [P1] node scripts/check-protocol-event-coverage.mjs.

What I checked:

Likely related people:

  • steipete: Recent history shows steipete carrying sidebar/navigation and Control UI route work that this PR extends, and the linked feature issue was already marked for maintainer product direction. (role: recent Control UI and task-ledger product contributor; confidence: high; commits: 89f911f322c9, 51771c3a1485, 60cf7eaa005b; files: ui/src/app-navigation.ts, ui/src/app-route-paths.ts, docs/web/control-ui.md)
  • tmimmanuel: GitHub history shows tmimmanuel introduced the SDK/gateway task ledger RPCs and protocol schemas that the new UI consumes. (role: introduced task ledger RPC surface; confidence: high; commits: 2945948a5ee4; files: src/gateway/server-methods/tasks.ts, packages/gateway-protocol/src/schema/tasks.ts)
  • vincentkoc: History shows vincentkoc renamed task registry hooks to observers and recently touched task registry helper boundaries, which are central to the new task broadcast. (role: task registry observer and gateway adjacent contributor; confidence: medium; commits: 7aa22959e47f, 71645bb8a321, c42ef8b26759; files: src/tasks/task-registry.store.ts, src/tasks/task-registry.ts, src/gateway/server-methods/tasks.ts)
  • ly85206559: Recent history shows ly85206559 worked on the Cron Control UI page, the closest existing push-refresh page pattern cited by this PR. (role: adjacent Control UI cron contributor; confidence: low; commits: b3ba0307079b; files: ui/src/pages/cron/cron-page.ts, ui/src/pages/cron/view.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (3 earlier review cycles)
  • reviewed 2026-07-06T10:41:58.729Z sha e0fcbc9 :: found issues before merge. :: [P2] Filter the recent task request to terminal rows | [P2] Prefer terminal end time for completed task updates | [P2] Keep task pagination stable while tasks update
  • reviewed 2026-07-06T11:43:09.527Z sha 0bf8e26 :: found issues before merge. :: [P2] Filter the Recent fetch to terminal tasks | [P2] Prefer terminal end time for terminal task updates | [P2] Keep task pagination stable while tasks update | [P2] Ignore stale cancel responses after gateway changes
  • reviewed 2026-07-06T13:10:23.108Z sha 09abc4c :: found issues before merge. :: [P2] Fetch Recent with terminal task statuses | [P2] Use terminal end time for terminal ordering | [P2] Avoid offset cursors over mutable task order | [P2] Ignore stale cancel results after reconnect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9225028df6

ℹ️ 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".

Comment thread ui/src/pages/tasks/tasks-page.ts
Comment thread src/gateway/server-methods/tasks.ts
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bf8e26c07

ℹ️ 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".

Comment thread ui/src/pages/tasks/tasks-page.ts
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Jul 6, 2026
@steipete
steipete force-pushed the claude/mystifying-davinci-33f3b9 branch 2 times, most recently from ea07e6c to 09abc4c Compare July 6, 2026 13:00
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Jul 6, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. labels Jul 6, 2026
@steipete
steipete force-pushed the claude/mystifying-davinci-33f3b9 branch from 6294fea to 214851a Compare July 6, 2026 13:34
@steipete
steipete merged commit f623d81 into main Jul 6, 2026
95 checks passed
@steipete
steipete deleted the claude/mystifying-davinci-33f3b9 branch July 6, 2026 13:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 214851ae80

ℹ️ 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".

if (!active || !recent) {
throw new Error(t("tasksPage.invalidResponse"));
}
const tasks = mergeTaskLists(recent, active);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefer the fresher task snapshot when merging

When a queued/running task finishes while these two tasks.list requests are in flight, the active-filtered response can contain the old running row while the unfiltered response contains the newer completed row. Because this call passes recent before active and mergeTaskLists lets later lists overwrite earlier entries, the stale active copy wins and the page can move a just-completed task back into Active until another refresh/event happens; choose the row with the newest updatedAt/terminal status instead of relying on query order.

Useful? React with 👍 / 👎.

@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

The four review-bot findings raised on the final head (terminal-row ranking via stale lastEventAt, Recent starvation under ≥200 active tasks, offset-cursor skips under mutable ordering, stale-client cancel responses) are tracked as follow-up hardening in #100911 — all verified real but edge-regime; none affect normal operation of the shipped page.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
…100789)

* feat(gateway): broadcast task ledger changes as task events

* feat(ui): add background Tasks page to Control UI

* fix(gateway): address tasks page review findings

* fix(ui): surface tasks.cancel refusals on the Tasks page

* fix(gateway): guard stale task observer disposal against replacement gateways

* chore: satisfy lint and docs-map gates for tasks page

* test(gateway): await async agent unsub in stale-dispose test
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
…100789)

* feat(gateway): broadcast task ledger changes as task events

* feat(ui): add background Tasks page to Control UI

* fix(gateway): address tasks page review findings

* fix(ui): surface tasks.cancel refusals on the Tasks page

* fix(gateway): guard stale task observer disposal against replacement gateways

* chore: satisfy lint and docs-map gates for tasks page

* test(gateway): await async agent unsub in stale-dispose test
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 gateway Gateway runtime 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: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Show running background tasks in the web Control UI

1 participant