Skip to content

composer: make a started chat's environment chip actionable - #25644

Merged
teamleaderleo merged 10 commits into
feat-cmux-nextfrom
lane/nx-composer-chip-menu
Oct 27, 2026
Merged

teamleaderleo merged 10 commits into
feat-cmux-nextfrom
lane/nx-composer-chip-menu

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Leo said: “Why is it a highlight? Why is it just text that you can highlight? ... If you want it to be that, we can let it have additional options. Then make it have additional options, right? ... Right now it's just useless. It's just dumb.”

On machines, Leo: "Picking one moves the chat".

A started chat's machine chip is now the searchable environment picker whenever the host offers that chat a move. The moves are the same ones the tab's right-click menu lists (pane.tabState moves): Move to Cloud from this Mac, Bring Back Local from a Cloud machine. The picker shows only where the chat runs, the move, and Choose folder…, which starts a new chat in the picked folder through the host's existing folder flow. A started chat with no move keeps today's behaviour: no strip (#20869), or a fixed label.

Why it was unreachable, and the fix

Composer.tsx mounted ComposerContext only before a chat's first send (showsLocationRow), so the started-chat picker was never drawn. It now also mounts it, with started, for a started chat (isStartedChat in locationRow.ts) whose queue is empty and whose host offers a move.

Choose folder… alone does not bring the strip back. The app offers it to every started local chat, so gating on it would undo #20869's "no strip after the first send" everywhere. It stays an entry inside a movable chat's picker.

A started chat's picker now lists only its own machine; the other machines it showed before could not be picked. Choose folder… appears only where the host can start a new chat from it.

Before / after

Gallery agent-pane.composer-strip/started-movable: a started chat on this Mac whose tab offers Move to Cloud. Chromium, Linux, the same variant rendered on base and on head.

Before (base) After
before started chat chip after started chat chip

Tests

New tests in test/composer-location-row-new-chat-only.test.tsx mount through Composer, not ComposerContext:

  • a movable started chat keeps its strip, and its picker runs the move;
  • its Choose folder… starts a new chat in the picked folder;
  • with no move (Choose folder… only), or with a queue, there is no strip.

The first two fail with the Composer fix disabled (checked on CI).

Linux CI results at the head:

  • composer-location-row-new-chat-only 9/9, environment-picker 34/34, new-tab-saved-environments 17/17, composer-row-layout 32/32.
  • composer-location-strip, composer-top-strip-variants and agent-pane-bottom-stack fail exactly as on base.
  • Typecheck is clean, lint reports the same 2 warnings as base, and format produces no diff.

Review

Codex (gpt-6-astra, xhigh):

  • Round 1 BLOCK (P1): the change was unreachable for started chats. Fixed above.
  • Round 2: SHIP.
  • An earlier next-review BLOCK still applied: Choose folder… was offered with no new chat to start, so the picked folder was dropped (the floating chat). Fixed: it needs both the folder panel and a new-chat callback, and a test covers it.
  • Round 3: SHIP at the final head.

Overlap

cmux#25305 ("live states and actions in the shared machine picker") and cmux#25318 are Leo's drafts with no known owner. They touch the same picker files and are likely redundant after #25955 and this PR. This PR leaves them untouched.

Risk

Webview only. A started chat draws the strip only when a move is listed; every other started chat is unchanged.

Agent session: agent session

🤖 Generated with Claude Code


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

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 26, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-uwsg6 created for this PR by the cmux coordinator.

@blacksmith-sh

blacksmith-sh Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
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 xhigh, next-review): BLOCK at 28d5763

  • [ComposerContext.tsx:207] The picker is enabled whenever onBrowseFolder exists, even if onNewChat is absent. browseNewChat then discards the selected path via onNewChat?.(cwd), leaving a “Choose folder…” action that opens a chooser but cannot create a chat. Gate this on both callbacks (or handle the result directly).

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

teamleaderleo and others added 4 commits October 26, 2026 23:04
…ve or folder

Composer mounted ComposerContext only before the first send, so the started-chat
picker this PR adds was never reached. A started chat now keeps the strip when the host
offers a move or Choose folder… for a new chat, and its picker lists only where it runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6
@teamleaderleo
teamleaderleo force-pushed the lane/nx-composer-chip-menu branch from 28d5763 to 57b3ae4 Compare October 27, 2026 06:14
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 93f1cb4: 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=pr25644 -f ref=lane/nx-composer-chip-menu -f platform=macos -f backend_mode=local

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards. This PR merged before its CI finished: fix forward on main.

CI failed on 93f1cb40c5 (run 40471422875 attempt 1): 2 code, 1 unknown.

Job Verdict Why
web / react-apps-base-check (3) code a web test failed
web / react-apps-base-check (2) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs accent-glass-invariants.test.ts no orange or system accent and no opaque glass on 2286 gallery stages: failed (job)
  • seen on other PRs agent-pane-agents-pill.test.ts by default the running agents sit in the tray above the composer, not in the transcript: failed (job)
  • seen on other PRs agent-pane-bottom-stack.test.ts in a short pane the transcript keeps room and the queue scrolls inside its height: failed (job)
  • seen on other PRs agent-pane-queue-scroll-bottom.test.ts chromium > a prompt the fold hides, run elsewhere, leaves no room as the stack shrinks, opens and cl...: failed (job)
  • seen on other PRs agent-pane-queue-scroll-bottom.test.ts webkit > the queue opened, the view scrolled to its end shows the last row whole, and it stays: failed (job)
  • seen on other PRs agent-pane-queue-scroll-bottom.test.ts webkit > the queue closed at the latest row keeps the last row on the stack, with no room that glide...: failed (job)
  • seen on other PRs agent-pane-queue-scroll-bottom.test.ts webkit > a prompt the fold hides, run elsewhere, leaves no room as the stack shrinks, opens and clos...: failed (job)
  • seen on other PRs agent-pane-queue-scroll-bottom.test.ts webkit > a prompt past the opened queue's cap, run elsewhere, leaves no room when the queue closes: failed (job)
  • seen on other PRs categories.test.ts every page row has exactly one home: failed (job)
  • seen on other PRs agent-pane-mermaid.test.tsx a source both renderers refuse shows the source and why: failed (job)
  • ... 6 more in the job logs
Matched log lines
web / react-apps-base-check (3): (fail) no orange or system accent and no opaque glass on 2286 gallery stages [658877.89ms]
web / react-apps-base-check (2): (fail) every page row has exactly one home [0.51ms]

Not re-run automatically: web / react-apps-base-check (3), web / react-apps-base-check (2), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; NEW: green on the base d43a109; do not merge until green; see lane-rules
red: web / react-apps-base-check (2); no finished base run on d43a109 to compare; do not merge until green; see lane-rules
red: web / react-apps-base-check (3); no finished base run on d43a109 to compare; do not merge until green; see lane-rules
red: web / react-apps-check; no finished base run on d43a109 to compare; do not merge until green; see lane-rules

Tour of 93f1cb40c5 (run): no media. The tour did not run: only webview code changed (7 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label, then re-add media-tour, to tour it on a Mac.

Gallery before/after for 93f1cb4: 16 states rendered, 0 images differ, 836 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 40471422401 -R manaflow-ai/cmux -n gallery-advisory-25644-93f1cb40c597d07020d93a580a053d855ce9bfcd (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.composer/new-chat Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/side-session Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/side-session Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-open Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-failing Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-suggest-draft Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/new-chat-reasoning Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/agent-home Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/agent-home Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer/agent-home-path Apple System Colors Light unchanged 0% own Composer.tsx
agent-pane.composer/agent-home-path Apple System Colors unchanged 0% own Composer.tsx
agent-pane.composer-context/closed Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/closed Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-menu Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-menu Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-favicons Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-favicons Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/framework-marks Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/framework-marks Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/duplicate-worktrees Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/duplicate-worktrees Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/duplicate-search Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/duplicate-search Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/repo-worktrees Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/repo-worktrees Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/repo-worktrees-open Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/repo-worktrees-open Apple System Colors unchanged 0% own ComposerContext.tsx

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

@cursor

cursor Bot commented Oct 27, 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 teamleaderleo changed the title composer: make the environment chip actionable composer: make a started chat's environment chip actionable Oct 27, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 12 of 17 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo
teamleaderleo merged commit 6ca8083 into feat-cmux-next Oct 27, 2026
155 of 160 checks passed
@teamleaderleo
teamleaderleo deleted the lane/nx-composer-chip-menu branch October 27, 2026 08:31
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 93f1cb40 Deployed Oct 27, 2026 by teamleaderleo via wait for same-key tree publisher #63160
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