Add 'continue' (in cloud) button to cloud agent conversation tombstone.#9315
Add 'continue' (in cloud) button to cloud agent conversation tombstone.#9315
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
I'm starting a first review of this pull request. I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment 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 adds cloud-to-cloud follow-up UI plumbing for ambient agent tasks: tombstone Continue actions, pending follow-up submission routing, optimistic prompt rendering, execution-ended status refreshes, and related tests/spec updates.
Concerns
- A new test helper constructs
AmbientAgentTaskwithout all required fields, which will break compilation. - Owned ambient sessions can enter cloud-follow-up mode even when
HandoffCloudCloudis disabled, bypassing the existing read-only viewer cleanup. - Follow-up submission leaves the input editable and the pending mode active while waiting for a new session, allowing duplicate follow-up submissions for the same run.
- Optimistic follow-up rendering is triggered before the API accepts the follow-up, so immediate API rejection can leave a prompt permanently rendered for a run that never started.
Verdict
Found: 1 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
| request_usage: None, | ||
| is_sandbox_running: false, | ||
| agent_config_snapshot: None, | ||
| artifacts: vec![], |
There was a problem hiding this comment.
🚨 [CRITICAL] This AmbientAgentTask literal is missing the current last_event_sequence and children fields, so the test target will not compile.
| artifacts: vec![], | |
| artifacts: vec![], | |
| last_event_sequence: None, | |
| children: vec![], |
|
|
||
| // When the session is ended, the input should be uneditable iff this is a viewer. | ||
| if self.model.lock().shared_session_status().is_viewer() { | ||
| if let Some(task_id) = owned_ambient_task_id { |
There was a problem hiding this comment.
HandoffCloudCloud, so with the feature disabled an owned ambient viewer skips the normal read-only cleanup and enters cloud-follow-up mode that later just errors. Gate this branch, or fall through to the viewer cleanup, when the flag is off.
| ambient_agent_view_model.update(ctx, |model, ctx| { | ||
| model.submit_cloud_followup(prompt, ctx); | ||
| }); | ||
| self.input.update(ctx, |input, ctx| { |
There was a problem hiding this comment.
pending_cloud_followup_task_id set and re-enables editable agent input, so a second Enter before FollowupSessionReady sends another follow-up for the same run. Freeze or disable input, or clear the pending mode, until success/failure.
| None, | ||
| ); | ||
|
|
||
| self.pending_followup_prompt = Some(prompt); |
There was a problem hiding this comment.
submit_run_followup is accepted; because FollowupDispatched inserts the optimistic query immediately, an API rejection still leaves a prompt rendered for a follow-up that never started. Defer optimistic rendering until acceptance or remove it on pre-accept failure.
a18c6a2 to
1077445
Compare
04c8f6b to
0cf8a89
Compare
1077445 to
a495742
Compare
0cf8a89 to
318f8b9
Compare
a495742 to
ecbc7f9
Compare
318f8b9 to
184e5a8
Compare
ecbc7f9 to
6599846
Compare
184e5a8 to
0440a49
Compare
6599846 to
1f1ac58
Compare
0440a49 to
3d57414
Compare
1f1ac58 to
608bcc4
Compare
5fa260b to
7abe5b4
Compare
608bcc4 to
2dcf967
Compare
7abe5b4 to
36a1eac
Compare
2dcf967 to
973da8c
Compare
36a1eac to
cb69d57
Compare
973da8c to
b4a2e4a
Compare
a9e2039 to
3471287
Compare
b4a2e4a to
c5c0843
Compare
036037d to
7c1b05f
Compare
9023daa to
2ccc70c
Compare
2ccc70c to
a44fdd6
Compare
a44fdd6 to
ef277a2
Compare
dbbca79 to
cbef010
Compare
cbef010 to
dbbca79
Compare
5d24aa4 to
5c23320
Compare
5c23320 to
acbe573
Compare
| Terminal input submission still assumes an active shared-session network. `Input::submit_viewer_ai_query` freezes the input, collects context attachments, and emits `InputEvent::SendAgentPrompt` in `app/src/terminal/input.rs (12400-12545)`. `TerminalView::handle_input_event` forwards that as `TerminalViewEvent::SendAgentPrompt` in `app/src/terminal/view.rs (19655-19666)`, and the viewer manager sends it to the current `Network` in `app/src/terminal/shared_session/viewer/terminal_manager.rs (1389-1402)`. Between cloud executions there is intentionally no current network, so PR 3 needs a separate follow-up submission route. | ||
| Cloud Mode setup-v2 already has UI to show startup progress and errors from the ambient model. This PR extends `AmbientAgentViewModel` with `pending_followup_prompt`, `should_show_followup_progress`, and `optimistically_rendered_user_queries` so follow-up setup can show progress without duplicating prompts after replay in `app/src/terminal/view/ambient_agent/model.rs (137-179, 532-578)`. `CloudModeInitialUserQuery` is now paired with `CloudModeFollowupUserQuery`, both backed by the shared `render_user_query` styling in `app/src/terminal/view/ambient_agent/block/query.rs`. | ||
| ## Goals | ||
| Show a cloud “Continue” entrypoint on eligible ambient Cloud Mode tombstones behind `HandoffCloudCloud`. |
There was a problem hiding this comment.
At a product level, I'm not sure I understand the point of this tombstone option (as opposed to just leaving the input open and letting the user follow-up there). Once we have query-less cloud mode startups, I think this makes sense, but is there a reason in the meantime to have this button as opposed to just letting the user send a query directly?
There was a problem hiding this comment.
Right now this is here for viewing cloud agent conversations that you did not start yourself. I'm not sure the tombstone is here to stay, just want to get this PR in and keep iterating
acbe573 to
b2d5235
Compare
b2d5235 to
24869dd
Compare
…or owned cloud mode convos
4351499 to
2646979
Compare
2646979 to
b10f263
Compare

Adds basic UI elements for cloud agent conversation continuation once the runner is dead: