Skip to content

remove unneeded focus_ai_block_if_self_focused#12286

Merged
moirahuang merged 1 commit into
masterfrom
moira/fix-focus
Jun 6, 2026
Merged

remove unneeded focus_ai_block_if_self_focused#12286
moirahuang merged 1 commit into
masterfrom
moira/fix-focus

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang commented Jun 6, 2026

Description

edf8354 changed it so that we avoid resetting focus whenever any AI block is stolen. But this means we'd have instances where we want focus to be stolen back to the input editor that weren't triggering.

Here's a video of the issue
https://github.com/user-attachments/assets/d8d528cc-d117-4155-a71b-3fce14626ce7

This PR removes the unnecessary focus attempt so redetermine_terminal_focus can continue distinguishing intentional AI-block focus from elsewhere without preserving an async accidental steal.

Linked Issue

N/A

Testing

Manually tested

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

https://www.loom.com/share/e23ae73a05dc42609abd2a888772047e

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@moirahuang moirahuang requested a review from zachbai June 6, 2026 01:01
@cla-bot cla-bot Bot added the cla-signed label Jun 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 6, 2026

@moirahuang

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

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 removes the extra focus_ai_block_if_self_focused call from the FinishedReceivingOutput path when another AI block is active, allowing the existing focus redetermination logic to distinguish user-intended AI-block focus from transient async focus changes. The PR includes visual/manual testing evidence, and no approved spec context was provided.

Concerns

  • No blocking correctness, security, or spec-drift concerns found in the annotated diff.

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

@moirahuang moirahuang enabled auto-merge (squash) June 6, 2026 01:04
@moirahuang moirahuang merged commit 2789b0b into master Jun 6, 2026
37 checks passed
@moirahuang moirahuang deleted the moira/fix-focus branch June 6, 2026 01:16
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