Skip to content

Use new cloud mode setup UI for local -> cloud handoff UI#9653

Open
harryalbert wants to merge 4 commits intoharry/remote-1486-implement-local-cloud-handofffrom
harry/remote-1519-make-ui-better-for-local-cloud-handoff
Open

Use new cloud mode setup UI for local -> cloud handoff UI#9653
harryalbert wants to merge 4 commits intoharry/remote-1486-implement-local-cloud-handofffrom
harry/remote-1519-make-ui-better-for-local-cloud-handoff

Conversation

@harryalbert
Copy link
Copy Markdown
Contributor

@harryalbert harryalbert commented Apr 30, 2026

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

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Copy link
Copy Markdown
Contributor Author

harryalbert commented Apr 30, 2026

@harryalbert harryalbert changed the base branch from harry/remote-1486-implement-local-cloud-handoff to graphite-base/9653 April 30, 2026 20:10
@harryalbert harryalbert force-pushed the harry/remote-1519-make-ui-better-for-local-cloud-handoff branch from ce2f268 to b0a73ac Compare April 30, 2026 21:47
@harryalbert harryalbert changed the base branch from graphite-base/9653 to harry/remote-1486-implement-local-cloud-handoff April 30, 2026 21:47
@harryalbert harryalbert force-pushed the harry/remote-1519-make-ui-better-for-local-cloud-handoff branch from b0a73ac to a1189d6 Compare April 30, 2026 21:58
@harryalbert harryalbert force-pushed the harry/remote-1486-implement-local-cloud-handoff branch from 48ed3c0 to 9311573 Compare April 30, 2026 22:43
@harryalbert harryalbert force-pushed the harry/remote-1519-make-ui-better-for-local-cloud-handoff branch from a1189d6 to 0852c52 Compare April 30, 2026 22:43
@harryalbert harryalbert changed the title write product and tech specs Improve local -> cloud handoff UI Apr 30, 2026
@harryalbert harryalbert changed the title Improve local -> cloud handoff UI Use new cloud mode setup UI for local -> cloud handoff UI Apr 30, 2026
@harryalbert harryalbert marked this pull request as ready for review April 30, 2026 22:49
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 30, 2026

@harryalbert

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PendingHandoff initializer.
  • 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

Comment on lines +1313 to +1321
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,
);
)
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] This block has an extra );/), so is_pre_first_exchange will not compile; keep the helper call as the block expression.

Suggested change
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,
)
};

Comment thread app/src/workspace/view.rs
// 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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [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.

Comment thread app/src/terminal/view.rs
@@ -5135,19 +5135,6 @@ impl TerminalView {
.set_is_executing_oz_environment_startup_commands(false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This still clears 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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant