Repository navigation
fix(ui): pool reply-less wake activity into one chat rollup - #128442
Conversation
Consecutive runs whose entire visible outcome is tool activity (heartbeat wakes, cron ticks) now collapse into a single expandable activity row instead of stacking identical rows down the transcript. Runs with a visible reply keep per-run activity separation. Group summaries reuse the standalone row's tool display label, so the rollup reads "Used Heartbeat Respond ×N". Splits tool call/result pairing out of chat-thread-grouping.ts into chat-tool-activity-coalesce.ts (max-lines).
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 25, 2026, 11:49 PM ET / August 26, 2026, 03:49 UTC. ClawSweeper reviewWhat this changesPools consecutive reply-less tool-only wake runs into one expandable Control UI activity rollup and uses human-readable labels for generic tools. Merge readinessKeep open: current main still separates tool activity at run boundaries, but this PR’s new reply test treats renderer-empty assistant text as a visible reply, leaving affected wake rows unpooled. The PR is maintainer-authored/labeled and needs that focused correction plus normal human review. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Control UI turns Gateway transcript events into grouped chat rows, then coalesces completed run activity before rendering the transcript. This PR changes that presentation-stage coalescing for heartbeat and cron-like tool-only runs. flowchart LR
A[Gateway transcript events] --> B[Chat item builder]
B --> C[Message grouping]
C --> D[Activity run coalescing]
D --> E[Transcript projection]
E --> F[Expandable Control UI rollup]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +64, Tests +163. Total +227 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Define reply-less eligibility from the same user-visible text contract as the assistant bubble, so renderer-empty metadata does not prevent pooling while real text, media, streams, and live runs still remain separate. Do we have a high-confidence way to reproduce the issue? Yes for the PR head: the new predicate marks renderer-empty assistant text as a reply, and the supplied live-proof comment reports that it keeps otherwise tool-only wake rows separate. Is this the best way to solve the issue? No. The pooling boundary should follow displayed reply content rather than raw extracted text, preserving the stated visible-reply invariant. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 345cfde43dc9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Live proof (real gateway, real model, real heartbeat wakes)Beyond the mock-gateway E2E in the PR body, this change is now verified on a live rig:
Observed non-blocking edge for a possible follow-up: assistant text that renders to nothing (e.g. literal On the ClawSweeper rank-up items: behind-main drift is advisory per repo policy; exact-head CI is green on f2ac85f and the native landing flow verifies the merge head. The production +64 LOC is the pooling pass in the owning module, justified in the PR body. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…#128442) Consecutive runs whose entire visible outcome is tool activity (heartbeat wakes, cron ticks) now collapse into a single expandable activity row instead of stacking identical rows down the transcript. Runs with a visible reply keep per-run activity separation. Group summaries reuse the standalone row's tool display label, so the rollup reads "Used Heartbeat Respond ×N". Splits tool call/result pairing out of chat-thread-grouping.ts into chat-tool-activity-coalesce.ts (max-lines).
* origin/main: (24 commits) fix(gateway): reject rootless session permission modes (#128149) docs(memory): document shipped turn-taint propagation for network tool output (#129837) fix(ui): pool reply-less wake activity into one chat rollup (#128442) fix(package): prevent installs from deleting validated runtime assets (#129724) fix(nodes): approve silent initial node surfaces and name the pending surface approval (#129795) fix(backup): preserve configured agent state roots (#129773) fix(ui): own chat history issuance with a closed state machine (#129776) fix(cron): preserve cancellation reason after late finalization (#129331) fix(cron): prevent run waits from failing after clock changes (#129805) fix(telegram): route commentary through one frozen progress owner (#128259) fix(release): start approved VCR mirror recovery jobs (#129829) test: complete current-plugin-metadata-snapshot mock factories (#129791) test(telegram): remove duplicate reaction case (#129848) fix(channels): honor supported account reply-threading policies (#129679) refactor(cli): deduplicate lazy subcommand registration (#129351) fix(ai): report interrupted local-model streams instead of empty success (#129794) refactor(cli): consolidate Gateway fallback and hook ownership (#129802) fix(qa): reject token confidence lanes without executed evidence (#129830) fix(tui): fence session state and delayed actions (#129810) fix(control-ui): keep task progress full width on hover (#129832) ...





What Problem This Solves
Sessions driven by recurring wakes (heartbeats, cron ticks) fill the Control UI transcript with a long stack of identical rows — e.g. dozens of
Heartbeat Respondtool cards, one per wake, each rendered as its own transcript row with full group spacing. On a long-lived claw the chat becomes pages of repeated noise with no information gain (reported fromstable.openclaw.ai/chat/tideclaw).Why This Change Was Made
Each wake is its own run, and
coalesceActivityRunsdeliberately flushes activity rollups at run boundaries so one run's work stays in one response frame. That rule is right for runs that produce a reply, but for runs whose entire visible outcome is tool activity there is no response to frame — the per-run separation only produces repeated rows.The fix keeps the run-ownership rule and adds one carve-out at the same owner (
coalesceActivityRuns): consecutive activity groups from reply-less runs pool into a single expandable activity rollup. A run with any visible reply, stream, or live/streaming content keeps per-run separation exactly as before. The rollup label reuses the standalone row's tool display label viasummarizeToolGroup, so six pooled wakes read "Used Heartbeat Respond ×6" instead ofused heartbeat_respond ×6.Mechanical follow-on:
chat-thread-grouping.tscrossed the 700-line lint cap, so the tool call/result pairing block moved verbatim tochat-tool-activity-coalesce.ts(pure move, no behavior change).User Impact
Used Heartbeat Respond ×N ›, expandable to the individual cards.Evidence
ui/src/pages/chat/chat-thread.test.ts— pools reply-less tool runs and heartbeat-shaped assistant tool activity; keeps runs separate when a run has a visible reply; keeps a live run's activity out of the pool.ui/src/lib/chat/tool-call-grouping.test.tscovers the humanized labels.ui/src/e2e/chat-heartbeat-activity-rollup.e2e.test.tsseeds six heartbeat wakes across six runs, asserts exactly one rollup row labeledUsed Heartbeat Respond ×6, zero standalone tool rows collapsed, and six cards after expansion.pnpmchat suites: 168 files / 3431 tests green;check:changedgreen (format, tsgo UI + core tests, oxlint, i18n, knip).gpt-5.6-sol, high): clean, no accepted findings.chat-tool-activity-coalesce.tsis a verbatim move of −291 lines fromchat-thread-grouping.ts). Growth is the new reply-less-run pooling pass in the owning module.Before/after screenshots below (mocked Control UI, deterministic gateway).