Skip to content

Fix deadlock in terminal view rendering.#10308

Merged
zachbai merged 1 commit into
masterfrom
zb/fix-deadlock
May 6, 2026
Merged

Fix deadlock in terminal view rendering.#10308
zachbai merged 1 commit into
masterfrom
zb/fix-deadlock

Conversation

@zachbai
Copy link
Copy Markdown
Contributor

@zachbai zachbai commented May 6, 2026

Description

Update is_cloud_agent_pre_first_exchange to take in &TerminalModel instead of locking internally, which is super prone to deadlocks

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
Copy link
Copy Markdown
Contributor Author

zachbai commented May 6, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@zachbai zachbai requested a review from harryalbert May 6, 2026 22:15
@zachbai zachbai marked this pull request as ready for review May 6, 2026 22:15
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@zachbai

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/terminal/view.rs
}

/// Create a SyncEvent for other terminals to use based on
/// the state of this terminal. If this terminal view has an active input
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this comment just on the wrong fn lol

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR refactors is_cloud_agent_pre_first_exchange to accept a borrowed TerminalModel, moving locking responsibility to call sites that already have or can create the terminal-model guard. The changed render and shared-session paths avoid the previous nested terminal-model lock while keeping the pre-first-exchange checks scoped to the same model state.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@zachbai zachbai merged commit a639d76 into master May 6, 2026
48 checks passed
@zachbai zachbai deleted the zb/fix-deadlock branch May 6, 2026 22:38
trungtai1805 pushed a commit to trungtai1805/warp that referenced this pull request May 9, 2026
## Description
Update `is_cloud_agent_pre_first_exchange` to take in `&TerminalModel`
instead of locking internally, which is super prone to deadlocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants