Repository navigation
fix(web): Run on cloud row shows connect progress and failure instead of hanging - #378
Conversation
… of hanging Clicking a ready cloud machine left the row on "Connecting…" until the environment registered. A failed or dropped connect only raised a toast, so the row never left that state. The row now counts elapsed seconds, flags a slow connect, offers Cancel, and shows the real connect error with a retry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Thread transfer impact
This comment will update automatically after the next completed run. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab7bd1a797
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // The connect itself failed (the toast says so too): stop waiting and say why on the row. | ||
| const handledConnectFailure = useRef(cloudSessionConnectFailure); | ||
| useEffect(() => { | ||
| if (selectWhenConnected === null || !cloudSessionConnectFailure) return; |
There was a problem hiding this comment.
Preserve feedback for sessions without environment IDs
When a ready t3_connect session omits environmentId—which the contract explicitly permits for older servers and providers—the click handler never sets selectWhenConnected, so this guard discards the controller's new failure and the progress/cancel UI never activates. resolveCloudSessionEnvironment can still resolve and register these sessions through relay discovery, leaving affected users with the original toast-only behavior and an immediately re-clickable row. Track the attempt by sessionId and separately retain the resolved target environment rather than requiring the session field.
AGENTS.md reference: AGENTS.md:L51-L56
Useful? React with 👍 / 👎.
| connectError={ | ||
| connectFailure?.sessionId === row.session.sessionId | ||
| ? connectFailure.message | ||
| : null |
There was a problem hiding this comment.
Add Storybook coverage for the new connect states
This adds user-visible connecting, slow, cancel, failure, and retry states, but the existing t3team-BranchToolbarEnvironmentSelector.stories.tsx still covers only unchanged, create, and provisioning variants. The repository requires every changed public UI state to update its stories in the same change, including error/retry and loading states, so these states currently ship without the required interactive Storybook coverage.
AGENTS.md reference: AGENTS.md:L104-L108
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
relay:write is admin-only because starting a cloud session spends compute; a standard paired session holds relay:read only, so the create always failed after being offered. The cloud controller now reports unavailable (and refuses onCreate) without the scope, which hides the Run on cloud entries and the welcome panel. Scopes are read the way Settings reads canManageRelay. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review note from the cloud-session work (fork #376/#377):
🤖 Generated with Claude Code |
|
Update: PJ decided a minted pairing link gets the same cloud capabilities as the desktop app — #379 moves |
…int passes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Conflicts resolved keeping both sides: main's useCloudSessionCreate hook now carries the relay:write gate; the Run on cloud row keeps connect progress/failure feedback. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Clicking a ready cloud machine in "Run on" left the row on "Connecting…" with no sign of life. If the connect failed (e.g. the token lacked `relay:write`), only a toast appeared and the row never left that state.
Fix — the connect failure now reaches the row:
Scope: no change to relay scope minting, auth, or server-side session start.
Tests: 4 new cases in `t3team-BranchToolbarEnvironmentSelector.test.tsx` (elapsed ticks, failure leaves Connecting and retries, foreign-session failure ignored, cancel). 23 files / 142 tests pass across `src/cloud`, `src/components/cloud` and the selector; `tsc --noEmit` clean; t3team additive guard passes.
🤖 Generated with Claude Code