Skip to content

fix(ui): fold background command wakes into chat activity - #207305

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/chat-background-command-grouping
Nov 28, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/chat-background-command-grouping

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

When a command in the background resumes a chat turn, the transcript can show “A background command finished” immediately before the tool activity that already explains what happened. If the wake falls between two command blocks, it can also split one stretch of work into two “Ran commands” rows. An older spacing rule also adds extra space where commands meet subagent events in that same turn.

User Impact

When visible tool activity follows a background command wake, it carries the turn forward without a separate notice. Adjacent command blocks can share one expandable log, with commands and results in their original order. A wake followed only by prose, an explicit wait, and a subagent completion still appear separately. The wake remains visible when tool calls are hidden.

Why This Change Was Made

Chat already groups compatible tool activity. Apply the same grouping across automatic command wakes and skip the notice only when a visible tool block follows. Use the regular activity gap between adjacent command and subagent rows. The underlying wake and command records are unchanged.

Risk and coverage

The change is limited to transcript presentation. The same Chromium scenario showed three standalone command notices on main and zero with this change. It also checks command order inside the disclosure, subagent completion, prompt boundaries, and reload. Five focused browser tests passed, including explicit waits. The UI type check, focused lint and formatting passed, and Codex review found no actionable issues in the grouping change. The spacing follow-up was verified with the same Chromium scenario; the two extra 8 px gaps are gone. Stylesheet lint and formatting passed.

Evidence

Same synthetic conversation in the bundled Control UI with an isolated mock Gateway. Baseline: 0af40be44838.

Clean and annotated Chromium comparison for this revision. The same fixture was used before and after, with matched crops.

@clawsweeper

clawsweeper Bot commented Nov 28, 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.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 28, 2026 07:01
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR joins adjacent tool activity across background-command wakes while preserving separation around narration, replies, and other continuation sources.

Example: A background wake separates pnpm docs:check from curl -s preview/health without intervening narration.

  • Before: Two command disclosures appear with a Resumed divider between them.
  • After: One disclosure contains both commands in their original order.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, visually demonstrated presentation improvement with one non-blocking documentation mismatch; failed CI gates remain unattributed.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium before/after screenshots exercise the actual chat UI with synthetic projected history through the supported mock-Gateway lane and show the changed grouping; focused browser assertions support retained command membership and ordering.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Uninterrupted tool work is visually split into repeated command disclosures by a background wake.
Reason: The earlier separation was deliberate, but this maintainer-authored PR supplies the owner decision to reduce clutter while preserving narrated and non-exec boundaries.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR demonstrates a focused presentation improvement, with no blocking correctness or security defect found.

Reviewed head: 45af8858b59bae5e69158b264e506957f159c19a

Before merge

None.

Findings

  • [P3] Document the exception to automatic-wake resume rules — ui/src/pages/chat/chat-agent-run-grouping.ts:77
Agent review details

How this fits together

The Control UI groups projected chat history into assistant frames and expandable activity logs; this change adjusts presentation without changing execution or stored transcripts.

flowchart LR
  A[Projected chat history] --> B[Continuation projection]
  B --> C[Activity grouping]
  C --> D[Agent run frames]
  D --> E[Activity join owner]
  E --> F[Chat transcript]
Loading

Technical review

Best possible solution:

Keep the existing activity-join owner and document the exception for adjacent tool activity across exec wakes.

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

Current-main source explains the split, and the supplied browser comparison demonstrates it with a fixed transcript; no target code or tests were executed during this review.

Is this the best way to solve the issue?

The patch is a small presentation change using the existing join checks, preserving visible boundaries without adding state or another grouping path.

Full review comments:

  • [P3] Document the exception to automatic-wake resume rules — ui/src/pages/chat/chat-agent-run-grouping.ts:77
    For adjacent tool activity after an exec wake, this predicate now joins the logs and removes the intervening rule. The chat guide still states that a rule marks each automatic continuation at https://docs.openclaw.ai/web/control-ui/chat. Qualify that statement to explain the joined-log exception while retaining the documented behavior for narration, replies, restart wakes, and subagent wakes.
    Confidence: 0.99

Overall correctness: patch is correct
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Continuation rules between adjacent tool groups changes intended behavior with a stated reason (24385a2: The earlier change deliberately made each continuation visible with its own Resumed rule, retaining separate activity rows wherever that rule appeared.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm format:docs:check
  • pnpm docs:check-mdx
  • pnpm docs:check-links
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 2a87667 adds ui/src/pages/chat/chat-agent-run-grouping.ts:210 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2a87667bb256; files: ui/src/pages/chat/chat-agent-run-grouping.ts)
  • Ayaan Zaidi: Raw commit 24385a2 adds ui/src/e2e/chat-continuation-wakes.e2e.test.ts:41 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24385a20428a; files: ui/src/e2e/chat-continuation-wakes.e2e.test.ts)
  • Peter Steinberger: Raw commit f6065d6 adds ui/src/pages/chat/chat-agent-run-grouping.ts:156 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f6065d67762f; files: ui/src/pages/chat/chat-agent-run-grouping.ts)
  • Shakker: Raw commit 96667f3 adds ui/src/pages/chat/chat-agent-run-grouping.ts:196 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 96667f3c70db; files: ui/src/pages/chat/chat-agent-run-grouping.ts)

PR surface

Source +3, Tests +13. Total +16 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 8 5 +3
Tests 1 16 3 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 24 8 +16

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 28, 2026, 2:18 AM ET / 07:18 UTC.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 28, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/chat-background-command-grouping branch from 45af885 to 3a899dd Compare November 28, 2026 21:59
@vyctorbrzezowski vyctorbrzezowski changed the title fix(ui): group commands across background wakes fix(ui): fold background command wakes into chat activity Nov 28, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Visual proof for b7072cf8475a against 0af40be44838: the same synthetic conversation in bundled Chromium (1280 × 1400), with identical crops. The clean pair comes first, followed by the annotated pair.

Before: separate background command notices

After: adjacent commands share one expandable row

Before, annotated: duplicate notices and split command groups

After, annotated: command activity takes the place of the notices

@vyctorbrzezowski
vyctorbrzezowski merged commit d4996d4 into main Nov 28, 2026
109 of 110 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/chat-background-command-grouping branch November 28, 2026 22:50
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 29, 2026
…or baseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…aseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…aseline

* commit '2f2edbf36836a8ddc6758dfdcce872d4414a3a92': (520 commits)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  chore(i18n): refresh native locales (#207796)
  fix: name safe recovery when agent schema markers disagree (#207705)
  improve(ui): show only setup warnings on skill pages (#203750)
  fix(gateway): keep Linux legacy lock recovery explicit (#207340)
  fix: deliver a saved child answer after a Gateway crash (#207706)
  fix(ui): fold background command wakes into chat activity (#207305)
  fix: restore the Feishu proxy transport tests (#207782)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…07305)

* fix(ui): fold background command wakes into chat activity

* fix(ui): use a consistent gap between chat activity rows
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 impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. 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: 🐚 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.

1 participant