Skip to content

Transcript: a run of background-task notifications folds into one line; a reply of only punctuation draws no row - #32884

Merged
cmux-bot[bot] merged 7 commits into
feat-cmux-nextfrom
leo/collapse-bg-task-rows
Nov 3, 2026
Merged

cmux-bot[bot] merged 7 commits into
feat-cmux-nextfrom
leo/collapse-bg-task-rows

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-02, about his chat showing a column of rows that alternated "Background task finished" with a lone "·" agent reply under each: "why do you still do these", then "should we improve the app then".

What changes

  1. A run of background-task notifications folds into one line. Two or more in a row (a quiet background turn's ended line, a background shell's end noted as finished or stopped) draw as one muted line, the same look as the single line: 4 background tasks finished (or N background updates when a stopped shell or a scheduled check is among them). A click opens the run to its rows exactly as they drew before; each member line still opens to its own rows. A failed shell, a running line, a turn the agent answered with something to say, or any other row ends the run, so a real reply stays in sight. A single line stays as it was.
  2. An agent reply of only punctuation and white space (., ·, …) draws no row. This widens isBareAgentText (Transcript: status and tool rows sit flush; a lone "." reply draws nothing #32726 hid a lone .) to any punctuation, so the row, its height and the turn's visibility agree, for an agent's reply and for another agent's received message. A person's . or ? is still a message. The check stops at 64 characters, so a streamed token never costs more than that. The Transcript: status and tool rows sit flush; a lone "." reply draws nothing #32726 test that said .. and … still draw is widened to match.

With #32798 (a quiet background line with nothing to open draws no line), a background turn whose only reply was · now has nothing to open, so it draws no line at all. That is Leo's exact screenshot: the four "Background task finished" + · pairs go away, and the stopped task's note stays. Runs of lines that did open to something (a log read, a check) fold into the one counted line.

No notification row loses information (open the run to see each one), and no other row type changes.

How

  • conversation/backgroundRuns.ts: foldBackgroundRuns, one pass over a turn's shaped rows next to foldMessageRuns in shapedTurn (and the rows before the first prompt). The run line reuses the background turn row kind, so its height, spacing and look are the existing line's; it carries backgroundRun instead of background. Its open state lives in the transcript fold set, keyed by its first member, and is part of the cached turn's key (openBackgroundRuns). Its version hashes member versions and the open state, so memoized rows and the height cache keep it across snapshots.
  • hiddenRowFolds opens the run (then the member line) for Find and links.
  • BackgroundTurnLine draws the run line. Two new strings, in every catalog language.
  • Transcript cost: no new pass over the whole transcript per token. The fold runs inside turn shaping, which already walks the live turn's rows, and finished turns stay cached.

The design spec for the transcript surface gets the same rule (leo-workspace design/chat-transcript.md).

References

Design references used: codex-mobile/live/grouped-activity-rows (Codex's "Finished 1 agent ›" count rows) and claude/live/transcript-tool-rows-and-task-list (Claude's "Ran 5 commands (1 failed) ›"). Both fold repeated activity into one counted line with a chevron, which is the look used here. Other wordings considered: "Finished 4 background tasks" (Codex's verb first) and "Background task finished ×4". The noun-first form matches the existing single line, so the line keeps its wording and only gains a count.

Gallery

agent-pane.background-runs, five variants: closed (Leo's case: four in a row with lone dots), open, mixed (a stopped shell among them), reply-kept (a task with a real reply splits the run), single-line.

Tests

  • conversation/backgroundRuns.test.tsx: punctuation-only replies; four lines with lone dots fold, open in order; stopped shells count as updates; a real reply splits a run; failed and running lines end it; an individually opened member keeps its rows inside the run; Find opens run then member; version stability.
  • conversation/visibleMessage.test.ts: punctuation-only agent words are bare; Done., ok, + are not.
  • test/agent-pane-background-turns.test.ts: reducer-level reproductions of the chat's event shape: quiet turns answered only with · draw no line and no dot; quiet turns that also ran a check fold into one 4 background tasks finished line that opens to the four lines in order. Also of the chat's event shape (four quiet task turns, each answered with a · in its own message, with config updates between). The dots are tagged to their turns and the view draws one line with no dots.
  • Fleet runs at the head: the focused files pass (36 tests), typecheck and bun run check pass. The review's finding (closing a run left its last member's opened rows visible) is fixed with a test. In the combined conversation + test/agent-pane-background* run, the only failure is only Open in terminal, inside the opened note, opens the task's terminal, which fails the same way on base 5ee63b3.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 3 commits November 2, 2026 16:38
…e; a reply of only punctuation draws no row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
…32726 began; lines with nothing to open (#32798) stay out of runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review bfee958: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32884 -f ref=leo/collapse-bg-task-rows -f platform=macos -f backend_mode=local

Gallery before/after for bfee958: 16 states rendered, 10 images differ, 3083 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41573818240 -R manaflow-ai/cmux -n gallery-advisory-32884-bfee958adf09579ea6bac9b6ec83ebd759f9c870 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.background-runs/closed Apple System Colors Light new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/closed Apple System Colors new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/open Apple System Colors Light new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/open Apple System Colors new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/mixed Apple System Colors Light new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/mixed Apple System Colors new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/reply-kept Apple System Colors Light new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/reply-kept Apple System Colors new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/single-line Apple System Colors Light new 0% own BackgroundRuns.gallery.ts
agent-pane.background-runs/single-line Apple System Colors new 0% own BackgroundRuns.gallery.ts
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-40 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-56 Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-rest-gap/gap-72 Apple System Colors unchanged 0% own App.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 2f3ccfe to compare; do not merge until green; see lane-rules

Shipped in:

…nctuation-only agent words are bare (test widened)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 7283f73

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 3. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at 7283f73
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/turns.ts:1637: Preserve the inner message-run reveal key. With live runs enabled, Find on a quiet background turn containing SendMessage and Read opens the background run and member but leaves the target hidden inside messageRun. Base reveals it successfully. Include messageRunRevealKey and update link consumers that currently accept only two fold keys.

  2. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/visibleMessage.ts:25: Preserve empty-message handling beyond the punctuation cutoff. An assistant reply containing 65 spaces now returns false from isVisiblyEmptyMessage, restoring blank rows and marking empty background turns as having content. Base hides it. Add coverage for long whitespace and zero-width-only replies.

  3. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/BackgroundRuns.gallery.ts:97: Capture the gallery variants when available; this bundle contains no images for visual review.

Confirmed findings 1–2 against reconstructed base using isolated Node/Babel probes. The full Bun suite was unavailable.

Follow-ups:

  • Reveal every nested fold for Find and links.
  • Keep long blank agent replies invisible.
  • Capture the gallery variants.

…ng blank agent replies stay bare

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@cursor

cursor Bot commented Nov 3, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 7283f73: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp17synyq_/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmp_xps7a_e/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at bfee958

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 3. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at bfee958
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/backgroundRuns.ts:77 — Opening a member containing a nested message run can make the counted group disappear. foldMessageRuns creates a row without inBackground, which this branch treats as a run boundary. Preserve ownership through synthesized rows so the group remains available to close.

  2. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/turns.ts:563 — Closing a group leaves an opened member’s late subagent completion visible when it landed after a later prompt. Group folding only covers the current turn; the global ownership filter tracks individual disclosures. Apply group closure to member rows across prompt boundaries.

  3. [P2] [follow-up] webviews/src/agent-session/acpmux/conversation/BackgroundRuns.gallery.ts:95 — Supply the five gallery captures; no after images were available for visual verification.

Follow-ups:

  • Preserve background ownership through nested message runs.
  • Hide late member completions when their group closes.
  • Capture the five gallery variants.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves bfee958: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@cmux-bot
cmux-bot Bot merged commit f285534 into feat-cmux-next Nov 3, 2026
178 of 180 checks passed
@cmux-bot
cmux-bot Bot deleted the leo/collapse-bg-task-rows branch November 3, 2026 04:52

This branch was previously deployed

1 inactive deployment
ci-routing-agent — bfee958a Deployed Nov 3, 2026 by teamleaderleo via cmux-tui tree preflight #103776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant