Skip to content

Cloud chat: a pause or resume stays invisible for 1.5 s and moves nothing - #34624

Merged
teamleaderleo merged 9 commits into
feat-cmux-nextfrom
cloud-paused-chat-responsive
Nov 4, 2026
Merged

teamleaderleo merged 9 commits into
feat-cmux-nextfrom
cloud-paused-chat-responsive

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-11-03: "The model sometimes sees a delay and you sometimes see it after sending but it evens out to not much at all just a tiny bit of extra time that you mostly perceive as "thinking" / But it's all still responsive on the ui side". Also: "the user acquisition has to come, and it has to come FAST aka we need it to work well feel good".

Cloud machines are about to pause on their own, first when idle and then between tool calls. A Cloud chat on a paused or resuming machine should feel exactly like one on a running machine.

What changes

One threshold, RESUME_NOTE_DELAY_MS = 1.5 s, gates every resume note in the agent pane. It lives in afterDelay.ts as useAfterDelay(active, ms). The hook runs one timer per stretch of active and clears it when the wait ends or the component unmounts, so nothing runs at idle.

  • Paused chat with nothing to draw (ChatUnavailableState):
    • For the first 1.5 s it shows the empty loading layout, so a quick wake never flashes a card.
    • After that it shows a calm card that fades in. The card has role=status, never alert.
    • The resume spinner's slot exists from the first frame. The spinner fades into it only once the resume passes 1.5 s, so nothing moves.
    • A chat with rows was already never replaced (cloudChatRecoveryActive). That is unchanged.
  • Send to a paused machine (ComposerQueue):
  • Peer copy banner (PeerCopyBanner):
    • Its text shows only past 1.5 s, and an ssh peer's shows at once. A paused machine therefore no longer reads "offline" before the account's machine list answers.
    • It takes its place above the transcript from the first frame, as on base: empty and out of the accessibility tree until the text fades in. Nothing shifts beyond what base already does, and it never covers a row.

Where the slow-resume note goes (gallery: agent-pane.cloud-resume-designs)

I built three variants. queue ships: the line sits over the held prompt in the composer queue.

  • queue: sits on the thing that is waiting, its line already exists, and it adds no new surface.
  • footer: a line under the composer input. It reads as a composer state, not as the state of the sent prompt.
  • transcript: a line under the last reply. It is closest to "thinking", but the prompt it waits on isn't in the transcript yet, so the line points at nothing.

New states in agent-pane.cloud-chat-recovery: paused-quick (invisible), slow-resume, resume-failed. The existing banner variants now pass noteDelayMs: 0, or wait for the banner, so their captures stay settled.

No design reference matched this state in cmux-design-references. The nearest, t3-code/live/approval-resume-motion, shows a gate that gives way to the live composer without a blocking card.

Budgets

  • Instant: sends, the composer, opening the chat and history all render from local state on the first frame, unchanged.
  • No layout shift: every note fills a slot that existed before it. The banner's place is taken from the first frame, so its text fading in moves nothing.
  • Low resources: one setTimeout per wait, cleared on end or unmount. There is no interval and no idle work.

Out of scope (other PRs)

Changelog

Changed: a Cloud chat whose machine is paused or waking shows nothing for the first 1.5 s, then one quiet note, and nothing on screen shifts.

Observed / Not run

  • Ran on the fleet (cmux-ci test --setup webviews) at an earlier head: bun run check (its remaining reds, transcript-spacing-kinds.test.ts after and updateSurfaces.css, are also red on base), and bun test for afterDelay.test.tsx, ChatUnavailableState.test.tsx, ComposerQueue.test.tsx and stopHeldMessages.test.tsx.
  • Tests use fake timers (check:fixed-waits is clean). The settled-state fixtures in cloud-chat-recovery, cloud-chat-resume and agent-pane-peer-copy-paused pass noteDelayMs 0.
  • Not run: gallery captures (advisory) and a DEV build on a paused machine.

Risk: normal. Web-only UI timing; no data, protocol or native change.

🤖 Generated with Claude Code

Agent session: agent session

…hing

One threshold (afterDelay.ts, RESUME_NOTE_DELAY_MS = 1.5 s) gates every resume
note in the agent pane, with its timer cleared when the wait ends:

- ChatUnavailableState: a paused machine shows the empty loading layout for the
  first 1.5 s, then a calm card (role=status, not alert) that fades in. The
  resume spinner's slot is there from the first frame and fills only past 1.5 s.
- ComposerQueue: the prompt held for a waking machine shows at once; its
  "Waking the machine..." line is there, empty, and the note fades in past 1.5 s.
- PeerCopyBanner: shows only past 1.5 s (so a paused machine no longer reads
  "offline" before the machine list answers), floating over the transcript in a
  zero-height slot, so neither its arrival nor its leaving moves a row.

Gallery: agent-pane.cloud-resume-designs (three places for the slow-resume note;
queue ships), and paused-quick, slow-resume and resume-failed in
agent-pane.cloud-chat-recovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@cursor

cursor Bot commented Nov 4, 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 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 809b67e: 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=pr34624 -f ref=cloud-paused-chat-responsive -f platform=macos -f backend_mode=local

Gallery before/after for 809b67e: 16 states rendered, 4 images differ, 2408 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 41781369461 -R manaflow-ai/cmux -n gallery-advisory-34624-809b67e14f979ed9cf1557fd584882a663bf0f84 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.access-offer/turn-no-credits Apple System Colors Light unchanged 0% own styles.css
agent-pane.access-offer/turn-no-credits Apple System Colors unchanged 0% own styles.css
agent-pane.access-offer/turn-low-credits Apple System Colors Light unchanged 0% own styles.css
agent-pane.access-offer/turn-low-credits Apple System Colors unchanged 0% own styles.css
agent-pane.access-offer/turn-no-offer Apple System Colors Light unchanged 0% own styles.css
agent-pane.access-offer/turn-no-offer Apple System Colors unchanged 0% own styles.css
agent-pane.activity-line-looks/none Apple System Colors Light unchanged 0% own styles.css
agent-pane.activity-line-looks/none Apple System Colors unchanged 0% own styles.css
agent-pane.activity-line-looks/spinner Apple System Colors Light changed 0.0556% own styles.css
agent-pane.activity-line-looks/spinner Apple System Colors changed 0.0516% own styles.css
agent-pane.activity-line-looks/kind Apple System Colors changed 0.0265% own styles.css
agent-pane.activity-line-looks/kind Apple System Colors Light changed 0.0251% own styles.css
agent-pane.activity-line-looks/aligned Apple System Colors Light unchanged 0% own styles.css
agent-pane.activity-line-looks/aligned Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/environment Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/environment Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/sources Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/sources Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/directory Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/directory Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/long-directory Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/long-directory Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/keyboard Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/keyboard Apple System Colors unchanged 0% own styles.css
agent-pane.add-project-panel/browse-error Apple System Colors Light unchanged 0% own styles.css
agent-pane.add-project-panel/browse-error Apple System Colors unchanged 0% own styles.css
agent-pane.all-chats-list/page-failed Apple System Colors Light unchanged 0% own styles.css
agent-pane.all-chats-list/page-failed Apple System Colors unchanged 0% own styles.css
agent-pane.all-chats-list/page-recovered Apple System Colors Light unchanged 0% own styles.css
agent-pane.all-chats-list/page-recovered Apple System Colors unchanged 0% own styles.css
agent-pane.all-chats-list/long-values Apple System Colors Light unchanged 0% own styles.css
agent-pane.all-chats-list/long-values Apple System Colors unchanged 0% own styles.css

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

web and size checks: green

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

…on the banner slot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
… its first rows

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

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at 083dd81

BLOCK at 083dd81
Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] webviews/src/agent-session/acpmux/ChatUnavailableState.tsx:60 and PeerCopyBanner.tsx:26 — Update existing tests for the delay. By inspection, cloud-chat-recovery.test.ts:78 now receives empty loading markup from server rendering; cloud-chat-resume.test.tsx:550 clicks a null Resume button; and agent-pane-peer-copy-paused.test.tsx:120 expects the banner before its timer expires. Pass noteDelayMs={0} in settled-state fixtures or advance fake timers. These are deterministic test regressions; execution here was unavailable because dependencies are missing.

  2. [P2] [follow-up] webviews/src/agent-session/acpmux/CloudResumeDesigns.gallery.tsx:9 — Add captures at this head for the quick/slow states and delayed banner arrival to verify layout stability.

…ay; list the new entrances

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

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
main.DeveloperIdAppTests.test_download_prints_the_active_profile_only/
test_download_prints_the_active_profile_only
View Logs
stubs: /System/Library/Frameworks/Security.framework/Versions/A/Security has no stub/
Security has no stub
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_CFRetain']/
CoreFoundation, missing 1: ['_CFRetain']
View Logs
stubs: CoreFoundation.tbd: install-name /System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation, missing 1: ['_log2']/
CoreFoundation, missing 1: ['_log2']
View Logs
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)/
test_the_type_check_covers_every_webviews_test_file (main.WorkflowShape.test_the_ty
pe_check_covers_every_webviews_test_file)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at dbf77ae

BLOCK at dbf77ae

Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] PeerCopyBanner delays every peer-copy banner, including SSH peers. PeerCopyBanner is generic and remains rendered for SSH snapshots, while only the Cloud-machine lookup excludes SSH (App.tsx:6448). The unconditional useAfterDelay(true, noteDelayMs) at PeerCopyBanner.tsx:26 hides the existing offline/stale-copy notice for 1.5 seconds on SSH chats, an unrelated user-visible regression. Apply the delay only to Cloud recovery states or pass zero for non-Cloud peers.

Follow-ups: [P2] [follow-up] No after gallery stills were available.

…possible Cloud machine waits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
…ext in past the threshold

Covers rows never, shifts nothing beyond what base did, and still never reads offline before the
machine list answers.

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

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review of 290711d..49a2191): SHIP at 49a2191

Visual verdict: no images supplied (range review); Leo tries the build

Checked the earlier blocking findings at this head: fixed-waits (tests now use fake timers), settled-state fixtures in other suites, ssh peers showing at once, and the banner neither covering rows nor shifting beyond base.

Follow-ups: [P2] the banner's data-enter="top" entrance plays while it is hidden, so the reveal past the threshold is an opacity transition only; gate the entrance on the delay.

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

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at ecd5f1c

BLOCK at ecd5f1c

Visual verdict: no images; Leo tries the build

  1. [P1][blocking] The implementation at [afterDelay.ts:1] is entirely Cloud chat UI work, while the PR description promises cmux link sync history, undo, and restore with snapshot storage and restore logic. The diff contains no sync command, snapshot, or history changes, so the advertised feature is absent; replace this with the sync implementation or correct/split the PR scope.

Follow-ups: none

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

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

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

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

  1. [P2] [follow-up] webviews/src/agent-session/acpmux/PeerCopyBanner.tsx:27 — The timer does not wait for the machine-list response. If that response takes longer than 1.5 seconds, a paused machine still shows “offline” and Reconnect before switching to Paused and Resume. Keep the copy neutral while lookup is pending, and cover a response delayed beyond the threshold.

  2. [P2] [follow-up] webviews/src/agent-session/acpmux/ChatUnavailableState.gallery.tsx:43 — No screenshots were available to verify the new states. Capture the quick-pause and slow-resume states and check their layout in the build.

The eight popover/entrance checks passed. Component tests could not start because this box lacks dependencies (@base-ui/utils/useIsoLayoutEffect).

Follow-ups:

  • Track machine-list readiness separately from the banner delay.
  • Capture and visually verify the changed states.

@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 ecd5f1c: 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.

@cursor

cursor Bot commented Nov 4, 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 809b67e

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

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

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

Source review and syntax checks completed. Runtime tests were unavailable because Bun is absent.

  1. [P2] [follow-up] PeerCopyBanner.tsx:28: The reveal depends only on elapsed time. If cloudMachine.list takes longer than 1.5 seconds, machine remains undefined when the banner appears, exposing “offline” and Reconnect before switching to Paused and Resume. Track inventory readiness and use neutral pending copy until classification completes.

  2. [P2] [follow-up] ChatUnavailableState.gallery.tsx:42: No after images exist for this head. Capture the quick and slow states, queue, and banner to verify their placement and transitions.

Follow-ups:

@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 809b67e: 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.

@teamleaderleo
teamleaderleo merged commit 64a33ca into feat-cmux-next Nov 4, 2026
179 of 180 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-paused-chat-responsive branch November 4, 2026 06:36

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 809b67e1 Deployed Nov 4, 2026 by teamleaderleo via wait for same-key tree publisher #109900
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