Skip to content

fix(ui): keep Swarm outcomes visible after completion - #139490

Merged
steipete merged 4 commits into
mainfrom
codex/swarm-summary-current
Sep 6, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/swarm-summary-current

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #139420

What Problem This Solves

Fixes an issue where users watching a Swarm in the Control UI would lose its display when all children finished, even if the parent failed before producing a final response. Deleted child sessions could no longer supply the full outcome, parent-only viewers could miss cross-agent updates, and child details depended on hover.

Why This Change Was Made

The existing collector registry now supplies a bounded summary for the authorized parent: up to four active groups and the most recent completed group. Counts include retained collectors after child-session cleanup; only a selected-parent read includes bounded member identities and statuses. Child names remain separate authorized reads. Completion counts come from frozen collector results and do not imply that the parent produced a synthesis.

The registry's existing commit boundary emits parent-scoped updates after successful changes, including archive removal. A small process-local committed snapshot prevents failed best-effort writes from suppressing a later successful notification. Atomic publication waits for owner snapshots; child completion never changes parent run status. Ordinary message and agent events retain scoped reads and omit uncomputed Swarm data.

Native details/summary replaces the hover-only display. The component loses obsolete phase wrappers, owner inference from group strings, and redundant marker-limit handling. Raw session keys follow the admitted owner; sessions.describe gains an optional agentId using the existing owner resolver, while qualified key-only callers remain valid.

User Impact

Users can see queued, running, completed and failed totals, open child details with keyboard or touch, and reload without losing retained outcome counts. Missing child details do not hide successful parent counts. Removed or denied parents clear the display, and late responses cannot restore stale ownership.

Counts expire under the existing collector retention policy. Native app widgets retain their existing active-only behavior. There is no new configuration, dependency, database schema, stored representation, retention policy, or protocol-version change. Independent database contention and provider quota failures are separate from this display repair.

Production is net +247 lines (including brace-only formatting required by CI), including the committed-parent notification owner; the component is net -98 and activity tracking -11. The remaining growth supplies the retained read projection and lifecycle delivery, rather than an additional store or compatibility path. Generated Swift adds eight lines.

Evidence

The integrated candidate passed 524 focused tests: 45 Gateway, 19 registry, 417 UI, 40 board, and three browser cases. Final reruns passed 32 summary/API tests, 19 registry tests, and three browser scenarios including literal mobile tap. Scoped lint, formatting and English verification passed. Two fixture copy lint findings and a redundant projection copy were repaired and rerun; the wire test still verifies JSON omission directly.

Original browser fixtures show the completed chart disappearing and mobile disclosure failing. Original registry tests fail at five missing-notification assertions. The candidate exercises real SQLite, parent-only versus child-only visibility, commit/retry/archive/rollback ordering, raw and qualified owners, retained totals, bounded payloads, and stale asynchronous responses. Browser fixtures cover desktop/mobile completion, cleanup, reload, and cross-agent child hydration.

Independent Codex reviews are scoped-clean through P2, including all request-option follow-ups. Generated Swift is byte-identical to the passed OpenClawProtocol build and four Codable round trips. Full UI and Gateway test types, CI-configured lint, and the shrinking assertion ratchet passed. Commit hooks preserved the verified source bytes. A patch-identical rebase picked up the separately landed main retry-test repair (#139519). Exact-head CI is green on bbda1c9eddfe7301bb253551d7d59e7bc7eb3ddb, including the native screenshot gates and the unchanged browser-job rerun.

Browser fixtures and recording-socket Gateway tests are synthetic boundary proof; live deployment evidence is reported separately. The attached before/after captures contain only inspected synthetic data. Manual remote changed-check attempts were either stopped before validation or failed the then-stale assertion baseline; none is counted as passing. The required hosted checks remain the landing gate.

Before: the completed Swarm disappears

After: all thirty outcomes remain visible after cleanup and reload

After: a mobile tap opens child details

CI follow-up: the initial run exposed incomplete async client fixtures, readonly-context construction, mock initialization order, and obsolete assertion-baseline entries. The second run exposed a shared test adapter dropping the third request argument, incomplete backend row fixtures, and a cloud test counting legitimate Swarm reads as placement polling. These are repaired at their test owners without production fallbacks, forced clicks, longer timeouts, or disabling Swarm. The request-tuple regression failed before the fix; 290 helper/placement tests, 72 payload-reader tests, 11 summary tests, two final cloud browser cases, full UI/Gateway test types, and lint pass. The cloud guard still rejects unpaired parent describes, and the placement owner's independent no-polling assertion remains intact.

The unchanged sidebar pointer case and dependency-download HTTP 502 both passed their Linux jobs in the second run; no speculative source or dependency change was made for them.

The final shared-adapter follow-up strengthens model-setup assertions for retained start replies, bounded cancellation, and abortable verification. The broad canonical UI run passed 14,501 cases and failed two unchanged native-fixture scenarios at their 60-second outer limit; one was observed before fixture-body entry, and the managed process owner confirmed cleanup. Both scenarios passed unchanged on the combined source in a focused replay (56.47s and 49.02s), with joined worker cleanup verified. Their slow startup remains a separate harness follow-up; the full run is not counted as passing.

The separate main suppression-inventory failure from #139483 was resolved upstream by #139576. A required conflict refresh retains that exact main helper; this PR no longer changes it. All four Swarm and request-fixture commits remained patch-identical through the refresh. Additional held-drain observer controls are being handled separately.

The latest CI run exposed one dashboard A2UI action case receiving no event after a click. The original two-theme scenario passed locally; six instrumented local cases and two instrumented Linux cases also delivered exactly one event each. Linux tracing confirmed Playwright waited through the frame's inert loading state before delivering native input. No source repair is justified for that isolated failure yet; its original CI job passed unchanged on the exact-job rerun. The Linux Testbox was stopped and independently verified completed after retrieving its four owned trace/screenshot files. The separate pre-existing fixture initializer error in opaque frames is addressed independently in #139618.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 23:05
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:18 PM ET / September 6, 2026, 01:18 UTC.

ClawSweeper review

What this changes

The PR keeps completed Swarm counts visible in Control UI chat using retained collector records, adds touch and keyboard disclosure, and updates Gateway projections and supporting tests.

Merge readiness

✅ Ready for maintainer review

This remains useful work: current main still hides completed Swarm groups. No blocking introduced defect was found, and the verified test merge resolves the previous conflict concern.

Priority: P2
Reviewed head: bbda1c9eddfe7301bb253551d7d59e7bc7eb3ddb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent owner-level repair with useful boundary coverage and no blocking correctness finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The supplied repository state identifies a member-authored PR, so the external deployment-proof gate does not apply. Browser scenarios cover retained cards and mobile disclosure; SQLite and recording-socket tests cover projection and delivery boundaries. These are synthetic evidence, not live-deployment proof, and attachment retrieval was unavailable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a member-authored PR, so the external deployment-proof gate does not apply. Browser scenarios cover retained cards and mobile disclosure; SQLite and recording-socket tests cover projection and delivery boundaries. These are synthetic evidence, not live-deployment proof, and attachment retrieval was unavailable.
Evidence reviewed 8 items Current main still needs the change: The current-main component filters out groups without queued or running children, then renders nothing when no groups remain.
Latest release retains the earlier widget: The supplied latest release, v2026.9.2, contains the same active-only component blob used before this patch and has no session-swarm-summary.ts entry.
Previous conflict blocker resolved: The raw test-merge record has exactly the pinned base and head as parents. Comparing that merge with the head shows only the known base-only assistant-visible-text test; it does not remove the upstream helper. The previous reviewed head was unavailable for a direct historical comparison, so no patch-identical rebase claim is independently made.
Findings None None.
Security None None.

How this fits together

Swarm coordinates child agents and retains their completion records. The Gateway projects those records into authorized parent-session reads, which the Control UI combines with separately readable child details.

flowchart TD
  A[Child run outcomes] --> B[Retained collector registry]
  B --> C[Committed parent update]
  B --> D[Bounded outcome summary]
  C --> E[Authorized parent session read]
  D --> E
  E --> F[Chat outcome cards]
  G[Authorized child details] --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +247, Tests +1181, Docs +8, Other +6. Total +1442 across 52 files.

View PR surface stats
Area Files Added Removed Net
Source 23 542 295 +247
Tests 26 1261 80 +1181
Docs 1 23 15 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 2 8 2 +6
Total 52 1834 392 +1442

Review metrics

Metric Value Why it matters
Production and test growth Production +247; generated Swift +8; tests/support +1,181 net lines The PR explains production growth as retained-count projection and committed lifecycle notification ownership.
Summary bounds 4 active groups + 1 completed group; 64 member details per group Payload and rendering bounds preserve full totals without exposing an unbounded child roster.

Technical review

Best possible solution:

Keep bounded child outcomes sourced from retained collectors, with parent synthesis status and authorized child details remaining distinct.

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

Yes, from source: finish every child in a displayed group and current main filters the group out, even if the parent has no final response. This review did not execute that scenario.

Is this the best way to solve the issue?

Yes. Reusing retained collector results avoids inventing a second outcome store, while separate parent and child reads preserve visibility boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1d9ce1ac9ffa.

Labels

Label justifications:

  • P2: Repairs a limited Control UI outcome-visibility problem without evidence of an urgent runtime or delivery regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a member-authored PR, so the external deployment-proof gate does not apply. Browser scenarios cover retained cards and mobile disclosure; SQLite and recording-socket tests cover projection and delivery boundaries. These are synthetic evidence, not live-deployment proof, and attachment retrieval was unavailable.

Evidence

What I checked:

  • Current main still needs the change: The current-main component filters out groups without queued or running children, then renders nothing when no groups remain. (ui/src/pages/chat/components/chat-swarm-progress.ts, 1d9ce1ac9ffa)
  • Latest release retains the earlier widget: The supplied latest release, v2026.9.2, contains the same active-only component blob used before this patch and has no session-swarm-summary.ts entry. (ui/src/pages/chat/components/chat-swarm-progress.ts, 3928bad9badf)
  • Previous conflict blocker resolved: The raw test-merge record has exactly the pinned base and head as parents. Comparing that merge with the head shows only the known base-only assistant-visible-text test; it does not remove the upstream helper. The previous reviewed head was unavailable for a direct historical comparison, so no patch-identical rebase claim is independently made. (deaf89e24075)
  • Canonical retained outcome projection: The summary matches both requester session and agent, derives terminal counts from frozen collector completion, and bounds output to four active groups plus one completed group and 64 member identities per group. SQLite changes only read existing payload fields; no stored representation or retention rule changes. (src/gateway/session-swarm-summary.ts:9, bbda1c9eddfe)
  • Authorization and publication boundaries: Parent descriptions retain the existing visibility filter before projection. Registry notifications follow successful commits; broadcasts retain recipient authorization and omit child identities. The added recording-socket test checks parent-only delivery, child-only rejection, private-content omission, and unchanged parent run status. (src/gateway/server-broadcast.board.test.ts:810, bbda1c9eddfe)
  • UI lifecycle and visual evidence: The inspected browser scenarios exercise desktop, mobile tap, cross-agent hydration, parent failure, child cleanup, and reload. The author's inspection report describes 25 completed and five failed outcomes in the attached synthetic captures: fix(ui): keep Swarm outcomes visible after completion #139490 (comment). All three attachment retrieval attempts failed in this review environment; the images were not independently viewed. The supplied body distinguishes this boundary evidence from a production deployment. (ui/src/e2e/chat-swarm-lifecycle.e2e.test.ts:17, bbda1c9eddfe)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-05T23:12:25.341Z sha 757f3e0 :: blocked before merge. :: none
  • reviewed 2026-09-05T23:47:51.903Z sha 5be6076 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-06T00:32:32.425Z sha 4464ab736daf18d6d49d14024d3679bed35c8d92 :: blocked before merge. :: none
  • reviewed 2026-09-06T01:08:04.646Z sha a6e948cfa83e40ad3fa116874b2e22b35f928fef :: blocked before merge. :: none

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Visual review completed against the original synthetic captures used by the three attachments. The before image shows the completed widget disappearing. The desktop after image shows all 30 outcomes (25 completed, 5 failed) after cleanup and reload. The mobile after image was captured after a literal touch activation opened child details. The full captures contain only synthetic fixture content.

The browser scenarios passed locally; these images are not a claim of a production deployment. This addresses the attachment-retrieval limitation in the ClawSweeper review without changing the visibility, retention, or authorization design.

CI remains a merge blocker. I am repairing the broader fixture contracts, initialization ordering, and reduced assertion baseline that CI exposed, and will rerun the checks on the updated commit. The separate dependency-download HTTP 502 will also be retried on that run.

@steipete
steipete force-pushed the codex/swarm-summary-current branch from 5be6076 to 4464ab7 Compare September 6, 2026 00:25
@steipete
steipete force-pushed the codex/swarm-summary-current branch from a6e948c to bbda1c9 Compare September 6, 2026 01:09
@steipete
steipete merged commit b66ab5b into main Sep 6, 2026
330 of 332 checks passed
@steipete
steipete deleted the codex/swarm-summary-current branch September 6, 2026 02:16
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits)
  test(ui): scope dashboard settings setup to the top frame (openclaw#139618)
  refactor(skills): share pending proposal creation (openclaw#139617)
  fix(release): accept frozen targets before worker bundles (openclaw#136699)
  fix(gateway): preserve percent sequences in media filenames (openclaw#139508)
  fix: preserve current update availability alongside update history (openclaw#139501)
  feat(diagnostics): expose garbage collection duration metrics (openclaw#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539)
  fix(ui): keep Swarm outcomes visible after completion (openclaw#139490)
  test: check file accessibility without runtime-specific return values (openclaw#139590)
  refactor(sdk): keep helper types private (openclaw#139601)
  fix(cron): preserve current-session delivery intent (openclaw#139491)
  fix: prevent browser profile permission hangs in Doctor (openclaw#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531)
  fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512)
  fix(agents): keep isolated completion context on its admitted generation (openclaw#139607)
  fix: avoid declaration builds during source-server updates (openclaw#139392)
  fix(models): keep discovered models after catalog refresh failures (openclaw#139357)
  fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439)
  refactor(ios): reuse shared integer conversion (openclaw#139581)
  fix(sessions): prevent database lock failures during reclamation (openclaw#139469)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit 'refs/openclaw/tasks/pr-135167-main-latest':
  test(ui): scope dashboard settings setup to the top frame (#139618)
  refactor(skills): share pending proposal creation (#139617)
  fix(release): accept frozen targets before worker bundles (#136699)
  fix(gateway): preserve percent sequences in media filenames (#139508)
  fix: preserve current update availability alongside update history (#139501)
  feat(diagnostics): expose garbage collection duration metrics (#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (#139539)
  fix(ui): keep Swarm outcomes visible after completion (#139490)
  test: check file accessibility without runtime-specific return values (#139590)
  refactor(sdk): keep helper types private (#139601)
  fix(cron): preserve current-session delivery intent (#139491)
  fix: prevent browser profile permission hangs in Doctor (#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (#139531)
  fix(cli): keep note text with Windows and Unicode line endings (#139512)
  fix(agents): keep isolated completion context on its admitted generation (#139607)
  fix: avoid declaration builds during source-server updates (#139392)
  fix(models): keep discovered models after catalog refresh failures (#139357)
  fix(gateway): record a transcript notice when a run fails before replying (#139439)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
* fix(ui): keep Swarm outcomes visible after completion

* test: align chat fixtures with Swarm parent reads

* test: preserve Gateway request options in shared fixtures

* test(ui): assert model setup request deadlines and cancellation options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant