Repository navigation
Fix terminal lag + related warnings when dragging an active session to a new window - #14432
Merged
Merged
Conversation
Co-Authored-By: Ben Holmes <[email protected]> Co-Authored-By: Oz <[email protected]>
Contributor
Author
|
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
Author
There was a problem hiding this comment.
Overview
This PR adds a discard cleanup path for pane groups, uses it when replacing transferred-tab placeholders, and adds regression coverage that discarded panes detach as permanently closed.
Concerns
- The new regression test verifies the permanent detach mode, but it does not cover the terminal-specific PTY shutdown behavior that prevents the wakeup warning.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <[email protected]>
Co-Authored-By: Oz <[email protected]>
bholmesdev
requested review from
alokedesai and
peicodes
and removed request for
alokedesai and
vorporeal
July 31, 2026 18:31
peicodes
approved these changes
Jul 31, 2026
zhangyu1818
pushed a commit
to zhangyu1818/warply
that referenced
this pull request
Aug 3, 2026
…ss-window transfer Port of upstream warpdotdev#14432. A terminal running an active process became laggy after dragging its tab into a new window because TaskCallback::ViewFromStream captured the original window_id, which went stale after the transfer. Removes the explicit window_id field and looks up the current window from view_to_window at item-delivery and completion. Adapted for edition 2021: completion branch uses nested if-let instead of let-chains.
jwp2987
pushed a commit
to jwp2987/phosphor
that referenced
this pull request
Aug 16, 2026
…o a new window Upstream 80a4e46 (warpdotdev#14432), closes upstream warpdotdev#14387. TaskCallback::ViewFromStream carried the window_id captured at spawn time, so after a tab with a running process was dragged into another window the relay kept resolving the *old* window, found no view there, and errored on every stream item -- the terminal went laggy and burned CPU. The prop is dropped and the view's current window is looked up in view_to_window at call time, for both item delivery and completion. transfer_view_to_window already maintains that map in this fork. Cherry-picked with -x; both conflicts were against this fork's own divergence: Zap keeps TUI views in the tui-gated window.tui_views map and dispatches to whichever map holds the view, since dropping the TUI fallback silently kills the relay task (and with it its stream, e.g. the PTY wakeup receiver). Resolved by nesting the fork's GUI-then-TUI dispatch inside the new view_to_window lookup, so the TUI path is now transfer-correct too rather than being left on the stale id. No test was weakened: test_spawn_stream_local_from_view_await_after_closing_window asserts only that the stream terminates, which it still does -- a closed window drops its view_to_window entry, so the miss is now reported as "unable to retrieve window" rather than "unable to retrieve view". Upstream's new test_transfer_view_stream_continues_in_target_window applies unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VNUMjBVuwvEnRSgaawUCR3
TranscriptionFactory
pushed a commit
to TranscriptionFactory/warp
that referenced
this pull request
Aug 30, 2026
…o a new window (warpdotdev#14432) Closes warpdotdev#14387 https://github.com/user-attachments/assets/e5a4cbca-cab1-4b6d-b2c8-bc7a543c9917 A terminal with an actively running process (ex. Claude Code) became laggy after you dragged its tab into a different window. This is because the `window_id` could become stale after the session is moved to a new window. This removes the explicit prop on `TaskCallback::ViewFromStream` and looks up the window id at call time. - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). - [x] I have manually tested my changes locally with `./script/run` Manual test: drag a tab that runs a Claude Code session into a new window. The terminal stays responsive, and the CPU load stays low. Automated test: `test_transfer_view_stream_continues_in_target_window` sends stream items after a window transfer. It confirms that the target window receives each item and the completion callback. Commands: - `cargo nextest run -p warpui_core transfer_view` - `./script/format` - `cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings` - `cargo clippy -p warp --all-targets --tests -- -D warnings` - `cargo clippy -p warp_completer --all-targets --tests -- -D warnings` See the video above. - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode CHANGELOG-BUG-FIX: Fixed a terminal that became laggy and used more CPU after you dragged its tab into a different window. --------- Co-authored-by: Oz <[email protected]> Co-authored-by: Ben Holmes <[email protected]> (cherry picked from commit 80a4e46)
1 task
NourEldinShobier
pushed a commit
to NourEldinShobier/MyWarp
that referenced
this pull request
Nov 16, 2026
…o a new window (warpdotdev#14432) Closes warpdotdev#14387 https://github.com/user-attachments/assets/e5a4cbca-cab1-4b6d-b2c8-bc7a543c9917 A terminal with an actively running process (ex. Claude Code) became laggy after you dragged its tab into a different window. This is because the `window_id` could become stale after the session is moved to a new window. This removes the explicit prop on `TaskCallback::ViewFromStream` and looks up the window id at call time. - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). - [x] I have manually tested my changes locally with `./script/run` Manual test: drag a tab that runs a Claude Code session into a new window. The terminal stays responsive, and the CPU load stays low. Automated test: `test_transfer_view_stream_continues_in_target_window` sends stream items after a window transfer. It confirms that the target window receives each item and the completion callback. Commands: - `cargo nextest run -p warpui_core transfer_view` - `./script/format` - `cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings` - `cargo clippy -p warp --all-targets --tests -- -D warnings` - `cargo clippy -p warp_completer --all-targets --tests -- -D warnings` See the video above. CHANGELOG-BUG-FIX: Fixed a terminal that became laggy and used more CPU after you dragged its tab into a different window. Adapted for edition 2021: the upstream let chain in the on_done arm was rewritten as nested if let with identical semantics. (cherry picked from commit 80a4e46) (cherry picked from commit c9447b8)
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.
Closes #14387
fix-keyboard-lag.mp4
Description
A terminal with an actively running process (ex. Claude Code) became laggy after you dragged its tab into a different window.
This is because the
window_idcould become stale after the session is moved to a new window. This removes the explicit prop onTaskCallback::ViewFromStreamand looks up the window id at call time.Linked Issue
ready-to-specorready-to-implement.Testing
./script/runManual test: drag a tab that runs a Claude Code session into a new window. The terminal stays responsive, and the CPU load stays low.
Automated test:
test_transfer_view_stream_continues_in_target_windowsends stream items after a window transfer. It confirms that the target window receives each item and the completion callback.Commands:
cargo nextest run -p warpui_core transfer_view./script/formatcargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscargo clippy -p warp --all-targets --tests -- -D warningscargo clippy -p warp_completer --all-targets --tests -- -D warningsScreenshots / Videos
See the video above.
Agent Mode
CHANGELOG-BUG-FIX: Fixed a terminal that became laggy and used more CPU after you dragged its tab into a different window.