Composer: an older chat's Computer menu reads the Cloud account (follow-up to #27973)
Merged
TE
6d ago+40+40+01234567890123456789-9-9-0123456789
Follow-up to #27973, which merged as 43b8e858. This PR now holds only what that merge left out.
Already on base, dropped from this PR
- Sign in for Cloud runs its own
cloudSignInkind, mapped topalette.auth.signIn(environments.tsCONNECT_ACTIONS,AgentPaneModel.connectActions), so it never creates a machine. The Swift testcloudSignInRunsSignInOnAGestureis on base too. - The row in both the plain Computer menu and the environment picker, with its strings, the
chat_statecapture state and the debugcloudSignedInfield. - Unknown account state still offers the row, and a refused read clears the list and the account state. #27973 settled both of these (fresh home: "EnvironmentPicker treats only an explicit true as signed in";
native.not_connectedkeeps the list), and base's tests assert them. This carry had reversed both. The merge takes base's design, so it is not quietly undone.
What remains
- An older chat's menu reads the Cloud account as it opens. Base reads
cloudMachine.listonly for a new chat. A started chat's plain Computer menu still has connect rows, so it never learned the account state and kept offering Sign in for Cloud to someone already signed in. A menu with connect rows now reads it too (ComposerContext.tsx,readsCloudAccount), so the row goes away once the app says signed in. It uses the menu's existing open/refresh callback; no new timer. - Gallery seam
cloudSignedInonComposerContext(the app's state when omitted), and the stateagent-pane.composer-context#computer-first-setup-signed-in(no sign-in row).
Tests
webviews/test/environment-picker-cloud-machines.test.tsx: "an older chat's plain picker reads the Cloud account as it opens, so a signed-in person gets no sign-in row". Red on base'sComposerContext.tsx(1 fail), green here.environment-picker-cloud-machines.test.tsxandenvironment-picker.test.tsx: 82 pass, 0 fail.bun run stringsandbun run check(CMUX_LOCAL_HEAVY_CHECKS=0) pass.- No Swift changes remain.
Risk
Small. One more cloudMachine.list post when a started chat's Computer menu opens. The app serves it from its store.
Changelog
Fixed: an existing chat's Computer menu stops offering Sign in for Cloud once you are signed in.
Agent session: agent session
š¤ Generated with Claude Code