Use new cloud mode setup UI for local -> cloud handoff UI#9653
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ce2f268 to
b0a73ac
Compare
b0a73ac to
a1189d6
Compare
48ed3c0 to
9311573
Compare
a1189d6 to
0852c52
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves local-to-cloud handoff to fork on chip click, pre-populates the new cloud pane with the forked conversation, and reuses cloud-mode setup UI/replay suppression for the handoff flow.
Concerns
- The diff has compile-blocking Rust issues in the handoff session/input-mode path and the
PendingHandoffinitializer. - The setup-command flag is still cleared by restored conversation exchanges, so the handoff pane can leave setup mode before the cloud session's startup commands arrive.
- The submit path can silently no-op if snapshot upload has not produced a cached prep token.
- Manual security pass found no additional security-specific findings in the inlined diff.
Verdict
Found: 2 critical, 2 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
| let is_pre_first_exchange = FeatureFlag::CloudModeSetupV2.is_enabled() && { | ||
| let view_ref = view.as_ref(ctx); | ||
| is_cloud_agent_pre_first_exchange( | ||
| view_ref.ambient_agent_view_model(), | ||
| view_ref.agent_view_controller(), | ||
| &view_ref.model, | ||
| ctx, | ||
| ); | ||
| ) | ||
| }; |
There was a problem hiding this comment.
🚨 [CRITICAL] This block has an extra );/), so is_pre_first_exchange will not compile; keep the helper call as the block expression.
| let is_pre_first_exchange = FeatureFlag::CloudModeSetupV2.is_enabled() && { | |
| let view_ref = view.as_ref(ctx); | |
| is_cloud_agent_pre_first_exchange( | |
| view_ref.ambient_agent_view_model(), | |
| view_ref.agent_view_controller(), | |
| &view_ref.model, | |
| ctx, | |
| ); | |
| ) | |
| }; | |
| let is_pre_first_exchange = FeatureFlag::CloudModeSetupV2.is_enabled() && { | |
| let view_ref = view.as_ref(ctx); | |
| is_cloud_agent_pre_first_exchange( | |
| view_ref.ambient_agent_view_model(), | |
| view_ref.agent_view_controller(), | |
| &view_ref.model, | |
| ctx, | |
| ) | |
| }; |
| // here on. `submit_handoff` reads the cached `forked_conversation_id` | ||
| // and `snapshot_prep_token` directly from this struct — the orchestrator | ||
| // path that REMOTE-1486 used has been inlined into the async block below. | ||
| let pending = PendingHandoff { |
There was a problem hiding this comment.
🚨 [CRITICAL] PendingHandoff no longer defines source_conversation_id, so this initializer fails to compile; if the upload still needs the token, keep it in a separate local before constructing pending.
| @@ -5135,19 +5135,6 @@ impl TerminalView { | |||
| .set_is_executing_oz_environment_startup_commands(false); | |||
There was a problem hiding this comment.
is_executing_oz_environment_startup_commands for AppendedExchange events emitted while restoring the forked conversation, so the handoff pane exits setup mode before the cloud session's startup commands arrive; gate this reset until a new cloud turn is appended.
| log::warn!("submit_handoff called before touched-workspace derivation completed"); | ||
| return; | ||
| } | ||
| let Some(prep_token) = handoff.snapshot_prep_token.clone() else { |
There was a problem hiding this comment.
submit_handoff now silently returns when the snapshot upload has not cached a prep token yet; unless the send button is also gated on snapshot_prep_token, users can submit into a no-op with only a log line.

Description
We want to use the same new cloud mode setup UI for local -> cloud handoff that we have for regular cloud mode setup. We also want to immediately fork the entire conversation into the new cloud pane before you've actually starting the cloud run.
The main change required to do this was to fork the conversation on-chip-click instead of on-prompt-send (see the corresponding server PR for this issue), as we don't want the forked conversation to get stale if new prompts are sent to the old conversation between clicking the chip and sending a prompt in the cloud mode window.
Screenshots / Videos
Agent Mode