Skip to content

fix(ui): show task names instead of UUIDs in Swarm cards - #138183

Merged
obviyus merged 3 commits into
mainfrom
openclaw/investigate-task-uuid-label
Sep 4, 2026
Merged

obviyus merged 3 commits into
mainfrom
openclaw/investigate-task-uuid-label

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where users watching a Swarm in Control UI Chat saw a raw parent-run UUID in the compact progress card instead of the work being performed, even when the child had a descriptive label. Unnamed children could also expose their raw session key in the expanded roster.

Why This Change Was Made

The card was deriving its heading from the last segment of swarmGroupId, which is a grouping identity rather than a title. The renderer now names single-child cards with the shared session-display resolver and labels multi-child cards Parallel tasks, using a localized string. The tooltip follows the same display name. The ID-derived heading helper and redundant group-label field are removed; grouping IDs, lifecycle state, counts, and persistence are unchanged.

User Impact

Users can identify a single delegated task without opening the roster. Multi-child groups have a readable heading, and unnamed/key-shaped child names use the existing safe session-display policy.

Evidence

  • Before the fix, the UUID-based renderer failed eight naming/localization assertions; existing lifecycle/count tests continued passing.
  • After the fix and again after rebasing onto refreshed main, 51 tests passed:
    node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-swarm-progress.test.ts ui/src/lib/sessions/swarm-roster.test.ts ui/src/lib/session-display.test.ts
  • Regression coverage includes a UUID-shaped parent run ID; named, unnamed, blank, and key-shaped child names; heading/tooltip agreement; localized multi-child headings; and live rows → hydrated labels → a second child without changing group identity.
  • Full changed-scope checks passed (formatting, core-test/UI typechecking, i18n, coercion/dead-export guards, lint, and style checks):
    node scripts/check-changed.mjs -- ui/src/pages/chat/components/chat-swarm-progress.ts ui/src/pages/chat/components/chat-swarm-progress.test.ts ui/src/i18n/locales/en.ts
  • pnpm ui:i18n:baseline completed without generated-file changes.
  • pnpm tsgo:ui, pnpm ui:build, and git diff --check passed after the clean rebase.
  • Independent automated review of the final source change: scoped-clean, no actionable P0–P2 findings.
  • Production delta: −1 line including the English catalog addition; tests: +82 lines.

Independent real-gateway visual proof — September 4, 2026

The earlier screenshot blocker was resolved in a separate isolated browser run. These are actual browser captures, not reconstructed UI. The comparison uses the same live gateway sessions for each before/after pair.

Before and after: named, multiple, and unnamed Swarm tasks

Case Before After Unchanged
One named child Run ID heading; group ID tooltip Review documentation in heading and tooltip Same group and child; 0 of 1
Two named children Run ID heading; group ID tooltip Parallel tasks in heading and tooltip Same group and children; 0 of 2; both names in the expanded roster
Unnamed child Run ID heading; raw session key in roster Subagent: in heading, tooltip, and roster Same group and child; 0 of 1
Child completion Active Swarm card Card disappears when no children remain active Real gateway lifecycle
  • Before UI: 8a7b141688423220997c39e961794a0abed86599.
  • After UI: c48bd508db92b0c68548e646791e1dcb3305ea7d.
  • Normal chat messages caused a local scripted provider to return sessions_spawn calls with collect: true. The real gateway created and ran the children. Their responses were held for inspection, then released.
  • Both UI versions received real gateway session data over WebSocket. No gateway responses, database rows, DOM text, or application state were injected to produce the cards.
  • Input varied across one named task, two named tasks, and an unnamed task. The same sessions were opened in both UI versions; group identity, heading, tooltip, roster, counts, and completion were checked.
  • The three focused test files were independently rerun on the exact PR head: 51 tests passed.
  • Screenshots were opened and inspected. All visible identifiers were created for this disposable proof. Temporary services were stopped after capture.

Proof limits: the UI source was exact before/after, but both versions used the same existing prebuilt gateway at 3aba444402b281026f8290d0f358f0d44d5a1f49, built September 3. This proves the changed presentation with a real gateway and scripted local provider; it is not exact-head packaged-gateway or live-provider validation. The full screenshots retain the Server updated warning. Unrelated old-runtime method/parameter mismatches were observed for tasks.list.sortBy and sessions.github.options. No native-app validation or full integration approval is claimed.

Full, uncropped screenshots
Scenario Before After
One named task Before After
Two tasks, expanded roster Before After
Unnamed task, expanded roster Before After

After the final child completed: no active Swarm card

Landing-head recheck

The conflict with current main was resolved at 72c894d2e0d2f533cfc37dfa29c7391e9e8c9349. The merge retains main's current Swarm description alongside Parallel tasks; the renderer's only further change is formatting.

  • The three focused test files now contain 65 passing tests, including main's newer default-on and hydration cases.
  • Focused formatting, lint, style checks, and git diff --check pass.
  • The exact landing-head UI was run again against an isolated real gateway: named task, multiple tasks, unnamed task, and completion.
  • This repeat used the same prebuilt gateway and local scripted provider described above; the exact-head packaged-gateway limitation remains.
  • Current production delta after the pinned-formatter correction below: +7/-8, net −1 line; tests remain +85/-3, net +82 lines.
  • The original branch ancestry and contribution credit are preserved.

Final formatting correction

CI found that the shared local formatter was older than the repository pin. Commit 394a6ff8d6b33f267de69f9cdae0ae0cee5a2fcc applies the pinned Oxfmt 0.65.0 output. The naming renderer is now byte-identical to the original verified renderer; no behavior changed.

Scoped follow-up

The sibling audit found separate ID-derived headings in Apple OpenClawChatUI/Swarm.swift and Android chat/ChatSwarmProgress.kt. Native title parity needs a platform-validated follow-up; this PR deliberately changes only the reported Control UI surface.

Worked on by:

Keep Swarm group IDs as identities rather than display titles. Resolve child
names through the shared session display policy and label multi-child cards
as parallel tasks, including their tooltips.

Worked on by:
- @obviyus

Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 6:32 AM ET / 10:32 UTC.

ClawSweeper review

What this changes

The PR replaces Swarm progress-card identifiers with safe child task names for single-task groups and a localized “Parallel tasks” heading for multi-task groups.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains a necessary, focused Control UI repair: current main still displays a Swarm run identifier, while the branch uses the established safe session-display policy and has no identified source-level correctness or security defect.

Priority: P3
Reviewed head: c48bd508db92b0c68548e646791e1dcb3305ea7d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, well-scoped repair that reuses the canonical display policy and adds meaningful behavior coverage; visual landing evidence remains outstanding.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate is not applicable to this repository-member bot PR. Its reported focused tests are supplemental; repository UI policy still requires the documented missing before/after visual evidence before landing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate is not applicable to this repository-member bot PR. Its reported focused tests are supplemental; repository UI policy still requires the documented missing before/after visual evidence before landing.
Evidence reviewed 8 items Current-main behavior: Current main still derives the group label from the final swarm-group segment and renders that group ID as both visible heading and tooltip; this can expose the parent run identifier.
Group-ID producer contract: Swarm collection builds the default group ID from the requester’s internal session key and run ID, confirming it is correlation metadata rather than task text.
Canonical display policy: The shared resolver selects label, display name, or derived title and gives unnamed subagents a safe localized fallback; the sidebar already uses its prefix-suppression option for named subagents.
Findings None None.
Security None None.

How this fits together

Control UI receives live and hydrated Gateway session rows and groups active subagents into Swarm progress cards. The card presents task labels to operators while preserving the group identifier only for grouping and lifecycle handling.

flowchart LR
  A[Gateway session rows] --> B[Swarm roster hydration]
  B --> C[Swarm group collector]
  C --> D{One active task?}
  D -->|Yes| E[Safe task display name]
  D -->|No| F[Localized group heading]
  E --> G[Control UI progress card]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - No sanitized before/after Control UI screenshot or recording is attached; the PR documents that browser navigation was blocked, and repository policy requires visual evidence before landing this UI-visible change.
  • Complete next step (P2) - Before marking this draft ready for landing, attach sanitized before/after Control UI screenshot or recording evidence for the changed Swarm headings.
Agent review details

Security

None.

PR surface

Source -1, Tests +82. Total +81 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 7 8 -1
Tests 1 85 3 +82
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 92 11 +81

Review metrics

Metric Value Why it matters
Production vs test delta production +7/-8 (net -1); tests +85/-3 (net +82) The repair is net-negative in production code while adding focused coverage for the display-name and hydration transitions.

Mantis proof suggestion

A Mantis web-chat proof run could materially provide the missing visual confirmation of the Swarm card headings in the Control UI chat surface. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis verify that a named single-task Swarm card shows its task name and a multi-task card shows “Parallel tasks” in Control UI Chat; return redacted visual evidence.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the renderer-level repair using the shared display resolver, then attach sanitized isolated-Control-UI before/after evidence and mark the draft ready once it visibly shows named and multi-task Swarm cards.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the renderer-level repair using the shared display resolver, then attach sanitized isolated-Control-UI before/after evidence and mark the draft ready once it visibly shows named and multi-task Swarm cards.

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

Yes, source-reproducible: the producer encodes a requester run ID in the group identifier and current main renders its tail as the card heading and tooltip. No reviewer-side live UI run was completed.

Is this the best way to solve the issue?

Yes: replacing identifier-derived presentation at the renderer with the existing session-display resolver preserves the group’s lifecycle identity and matches the established sidebar naming policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 984f49391f4c.

Labels

Label changes:

  • add P3: This is a small operator-facing Control UI clarity repair without evidence of message delivery, state, security, or availability impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is not applicable to this repository-member bot PR. Its reported focused tests are supplemental; repository UI policy still requires the documented missing before/after visual evidence before landing.

Label justifications:

  • P3: This is a small operator-facing Control UI clarity repair without evidence of message delivery, state, security, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 external-contributor proof gate is not applicable to this repository-member bot PR. Its reported focused tests are supplemental; repository UI policy still requires the documented missing before/after visual evidence before landing.

Evidence

What I checked:

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach sanitized before/after screenshots or a short recording from an isolated Control UI run, redacting private endpoints and identifiers.

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.

@obviyus obviyus self-assigned this Sep 4, 2026
@obviyus
obviyus marked this pull request as ready for review September 4, 2026 15:16
@obviyus
obviyus merged commit b016a07 into main Sep 4, 2026
134 checks passed
@obviyus
obviyus deleted the openclaw/investigate-task-uuid-label branch September 4, 2026 15:46
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks @roboclaw-bot!

Landed in b016a076c81c32e63d6eb7af78e1f810032bdf93 from verified source head 394a6ff8d6b33f267de69f9cdae0ae0cee5a2fcc. Ayaan's co-author credit is verified.

The Swarm card now uses the shared session-display policy instead of treating a group identifier as a title.

Case Before After
Named child Run identifier Task name
Multiple children Run identifier Parallel tasks
Unnamed child Raw identifier/session key Subagent:

Proof: before/after comparison, plus final-head browser captures in the PR's Evidence section. Named, multiple, unnamed, and completion states were checked through real gateway session creation. Group identity and counts were preserved; the card disappeared after completion. The disclosed older prebuilt-gateway and scripted-provider limits remain.

Validation: 65 focused tests; pinned Oxfmt 0.65.0; focused lint/style checks; clean exact-head review. Exact-head CI.

Scope: production +7/-8, net −1 line; tests +85/-3. Removed the identifier-derived title helper and redundant group label. Native title parity remains a separate platform-validated follow-up.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…8183)

Use the shared session-display resolver for Swarm child names and show
"Parallel tasks" for multi-child groups. Keep group identifiers as lifecycle
identity rather than visible headings or tooltips.

Verified named, multi-child, unnamed, and completed task states through
Control UI Chat connected to an isolated Gateway with a local scripted
provider. Preserve the disclosed prebuilt-Gateway limitation in the PR
evidence. The refreshed head passes 65 focused tests and exact-head review.

Preserve main's updated Swarm description when resolving the catalog
conflict. Native title parity remains a separate platform-validated follow-up.

Co-authored-by: Ayaan Zaidi <[email protected]>
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants