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
9311573 to
eea298a
Compare
53f23d7 to
a8f005f
Compare
eea298a to
3e9b09c
Compare
a8f005f to
ed2d37d
Compare
3e9b09c to
305a73a
Compare
| || view_model.is_local_to_cloud_handoff(); | ||
| let use_queued_prompt = view_model.is_third_party_harness(); | ||
| if use_queued_prompt { | ||
| // Non-oz runs and local-to-cloud handoff (REMOTE-1486) runs: |
There was a problem hiding this comment.
I actually think we should use the queued prompt UI for cloud->cloud handoff for oz, so maybe we should revert this and continue to use queued ui for local -> cloud handoff
| // shared-session view; otherwise `apply_client_actions` won't reconstruct | ||
| // UserQuery / ActionResult inputs from the cloud agent's response messages. | ||
| history.update(ctx, |history, _| { | ||
| history.set_viewing_shared_session_for_conversation(*conversation_id, true); |
There was a problem hiding this comment.
It feels kind of weird that this is done here - shouldn't this be set at the point at which the shared session starts and the cloud mode pane is connected to it?
| // Only skip the replayed response when we already have a local exchange whose | ||
| // `server_output_id` matches `request_id`. New exchanges (e.g. the user's first | ||
| // post-handoff prompt) carry unseen request_ids and must flow through normally. |
| // Only skip the replayed response when we already have a local exchange whose | ||
| // `server_output_id` matches `request_id`. New exchanges (e.g. the user's first | ||
| // post-handoff prompt) carry unseen request_ids and must flow through normally. |
There was a problem hiding this comment.
when would we actually have a local exchagne whose server output id matches the givne request_id that we just got from the server?
| /// duplicate rendering in the AI block path when that optimistic block was actually inserted. | ||
| /// (not replaying historical conversation events) AND the AI block's display query matches an | ||
| /// optimistically rendered user query. The per-query check is important for forked | ||
| /// conversations (e.g. local-to-cloud handoff) where the conversation's first exchange comes |
There was a problem hiding this comment.
I don't get this- "the conversations first exchange comes from the source conversation and must remain visible"?
|
|
||
| // Re-render when the cloud agent transitions through setup phases so the response | ||
| // footer toggles correctly with `is_cloud_agent_pre_first_exchange`. Each event below | ||
| // toggles that helper's output. |
There was a problem hiding this comment.
"toggles that helper's output" means what?
| | AmbientAgentViewModelEvent::NeedsGithubAuth | ||
| | AmbientAgentViewModelEvent::HarnessCommandStarted | ||
| ) { | ||
| ctx.notify(); |
There was a problem hiding this comment.
This seems pretty inefficient- it doesn't seem right to trigger render for every AI block based on status updates at the task level. Can we either unsubscribe after a certain point or listen to a more granular event

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
https://www.loom.com/share/580624a891d64bec81f9642dda766583
Agent Mode