Fix remote-control session end removing local input box (APP-4604)#11660
Open
vorporeal wants to merge 2 commits into
Open
Fix remote-control session end removing local input box (APP-4604)#11660vorporeal wants to merge 2 commits into
vorporeal wants to merge 2 commits into
Conversation
After QUALITY-726, a `/remote-control` share of a local conversation is a `User` share that carries a sidecar orchestrator `source_task_id`. When that share ended (for example when the session hit the 100MB sharing limit), `cloud_conversation_continuation_ui_state` resolved a task and ran the cloud-handoff continuation logic, which could insert a "conversation ended" tombstone and remove the input box for a still-running local conversation. Gate the continuation logic so it only applies to genuine cloud (ambient agent) sessions: bail out when the session source is set to a non-ambient kind. Sessions with no source (restored cloud-mode panes, finished viewers) are unaffected. Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
|
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 |
Contributor
There was a problem hiding this comment.
Overview
This PR gates cloud handoff continuation handling so non-ambient /remote-control user shares with a sidecar source_task_id do not render the conversation-ended tombstone, and it adds a regression test for that path.
Concerns
⚠️ [IMPORTANT] For this user-facing change, please include screenshots or a screen recording demonstrating the remote-control session-end path keeping the local input box available end to end.
Verdict
Found: 0 critical, 1 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes APP-4604: after a
/remote-controlsession with a local orchestrator hit the 100MB session-sharing limit, the local Warp app rendered the conversation as completed and removed the input box, blocking further input.The 100MB error itself is expected — it's the per-session
max_session_bytes_sizesharing limit enforced client-side, which terminates the shared session. The bug is in how the client reacts to the session ending.QUALITY-726 (#11465) changed
/remote-controlto start aUsershare that carries a sidecar orchestratorsource_task_id.TerminalModel::ambient_agent_task_id()now returns that id, so when the shared session ends,on_session_share_endedruns the cloud-handoff continuation logic (cloud_conversation_continuation_ui_state) and can insert a "conversation ended" tombstone — removing the input box — even though the local conversation is still running. The same path also triggers on a normal stop of remote control, not just the 100MB error.This change gates the continuation logic so it only applies to genuine cloud (ambient agent) conversations: it bails out when the session source is set to a non-ambient (
User) kind. Sessions with no source (e.g. restored cloud-mode panes, finished viewers) are unaffected, preserving the cloud-handoff and restored-tombstone flows. This matches QUALITY-726's stated invariant that aUsershare carryingsource_task_idmust not activate cloud UI.Linked Issue
APP-4604 (Linear)
Testing
Added regression test
test_on_session_share_ended_keeps_input_for_user_share_with_source_task_idcovering aUsershare with asource_task_idwhose task would otherwise resolve to a tombstone — asserting no tombstone is inserted and the input box stays editable.Ran the shared-session continuation/tombstone test suite (11 tests) — all pass, including existing cloud-handoff, finished-viewer, and restored-tombstone cases.
cargo fmt(no changes) andcargo clippy -p warp --lib --tests -- -D warnings(clean).I have manually tested my changes locally with
./script/runAgent Mode
Conversation: https://staging.warp.dev/conversation/08db43ce-12cb-42f7-ae6a-cda89706c3da
Run: https://oz.staging.warp.dev/runs/019e6012-9dfa-79e0-a2df-ba140bd4ab2a
This PR was generated with Oz.