Repository navigation
fix(ui): keep Swarm outcomes visible after completion - #139490
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. Reviewed September 5, 2026, 9:18 PM ET / September 6, 2026, 01:18 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherSwarm 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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +247, Tests +1181, Docs +8, Other +6. Total +1442 across 52 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
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. |
5be6076 to
4464ab7
Compare
a6e948c to
bbda1c9
Compare
|
Merged via squash.
|
* 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) ...
* 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)
* 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
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.describegains an optionalagentIdusing 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.
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.