Add (and correctly trigger) failure state for cloud mode setup#10761
Add (and correctly trigger) failure state for cloud mode setup#10761harryalbert wants to merge 2 commits into
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds Cloud Mode V2 setup-failure handling, including a failed setup-command state, an error footer, and product/tech specs for the behavior.
Concerns
- The setup-command failure path toggles command output visibility, so a command the user already expanded can be hidden exactly when it fails.
- The startup-command gate is cleared before the async server error is resolved, which can expose the normal input while the failure footer is still pending.
- The deferred task-data lookup has no fallback path when the fetch fails, so the generic error footer is not guaranteed within a bounded time.
Verdict
Found: 0 critical, 3 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| me.status = Status::Completed { is_success }; | ||
| if !is_success { | ||
| me.is_expanded = true; | ||
| ctx.emit(CloudModeSetupCommandBlockEvent::ToggleBlockVisibility( |
There was a problem hiding this comment.
| { | ||
| model | ||
| .block_list_mut() | ||
| .finish_oz_environment_startup_commands_at_block( |
There was a problem hiding this comment.
is_executing_oz_environment_startup_commands before setup_failure_error is set. When task data is not cached, is_cloud_agent_pre_first_exchange becomes false and the normal input can render until the fetch succeeds, so keep a failure-pending state or defer clearing this gate until the error footer is ready.
| ctx.emit(AmbientAgentViewModelEvent::EnvironmentSetupFailed); | ||
| } else { | ||
| // Task data not cached yet — subscribe for when it arrives. | ||
| ctx.subscribe_to_model( |
There was a problem hiding this comment.
get_or_async_fetch_task_data only emits TasksUpdated after a successful fetch; fetch failures update internal cooldown state without notifying this subscription. In that case setup_failure_error stays None and the generic fallback never appears, so add an error/timeout path that sets the fallback message.

Description
If any command in environment setup failed, the new setup UI would just get stuck in the "setting up environment" state. Instead, we should indicate this error state by blocking the input and expanding the error block.
Testing
./script/runScreenshots / Videos
Agent Mode