Banner for remote server disconnect#11565
Open
kevinyang372 wants to merge 5 commits into
Open
Conversation
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 adds remote-disconnect detection, a banner, and a save failure toast for remote code editor and file notebook panes.
Concerns
- The file notebook change contains a Rust move-out-of-borrow compile error in the new loaded-state check.
- The code editor banner is derived at render time, but the view is not subscribed to remote host connection events, so the banner may not appear or disappear when the remote connection state changes.
- No security findings. No approved spec context was available for this PR.
Verdict
Found: 1 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
moirahuang
approved these changes
May 22, 2026
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.

Summary
When a remote SSH session disconnects while a code editor or file notebook pane is open, the pane silently becomes stale — save fails, auto-reload stops, and there is no visual indication. This PR adds a disconnection banner and save guard.
Changes
save_local()immediately returnsImmediateSaveError::RemoteDisconnectedwhen the host is disconnected, with a specific toast message ("Cannot save — remote session disconnected.").is_remote_disconnected()checksRemoteServerManager::client_for_host()each render, so it is always in sync.FileNotebookViewsubscribes toHostDisconnected/HostConnectedevents to trigger re-renders.Files Changed
app/src/code/mod.rs— AddedImmediateSaveError::RemoteDisconnectedvariantapp/src/code/local_code_editor.rs—is_remote_disconnected(), save guard, render banner,render_remote_disconnected_banner()app/src/code/view.rs— Specific toast + error handling forRemoteDisconnectedapp/src/notebooks/file/mod.rs—is_remote_disconnected(), render banner, subscribe toRemoteServerManagereventsConversation
https://staging.warp.dev/conversation/bab4762c-633a-40a3-9258-4a0752b608e1
Plan
https://staging.warp.dev/drive/notebook/VqsXi9GmQ7EW1TnCJ9jlOp
Demo
https://www.loom.com/share/f0bab2f11c4047609bf1b318827af0ec