Skip to content

Dismiss Settings overlay when invoking New Thread#56818

Merged
rtfeldman merged 1 commit into
mainfrom
AI-237/fix-new-thread-in-settings
May 15, 2026
Merged

Dismiss Settings overlay when invoking New Thread#56818
rtfeldman merged 1 commit into
mainfrom
AI-237/fix-new-thread-in-settings

Conversation

@rtfeldman

Copy link
Copy Markdown
Contributor

When the Agent Panel had the Settings overlay open on top of the
ephemeral new-draft thread, pressing Cmd-N (or clicking Start New
Thread
in Settings) silently did nothing — the action ran, but the
Settings overlay stayed painted on top.

The bug was in AgentPanel::activate_draft. Every other activate_*
path goes through set_base_view, which clears the overlay. But
activate_draft has an early return for the case where the base view
already holds the requested draft, and that early return only refocused
— it never touched overlay_view. So when the user was already on the
draft and the Settings overlay was on top, "new thread" had nothing
visible to do.

Fix: in that early-return branch, if an overlay is currently open, clear
it (which also handles focusing and emits ActiveViewChanged).

Added a regression test that puts the panel on the draft, sets the
Settings overlay, dispatches NewThread, and asserts the overlay is
gone. The test directly toggles set_overlay(OverlayView::Configuration, …) rather than calling open_configuration, because the latter builds
provider configuration views and panics on the fake LM provider's
unimplemented!() configuration_view — and the bug being exercised
lives entirely in the overlay/base-view bookkeeping.

Closes AI-237

Release Notes:

  • Fixed pressing "New Thread" (or Cmd-N) doing nothing when the Agent Panel's Settings view was open

@rtfeldman rtfeldman self-assigned this May 15, 2026
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 15, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 15, 2026
@rtfeldman rtfeldman marked this pull request as ready for review May 15, 2026 02:03
@rtfeldman rtfeldman added this pull request to the merge queue May 15, 2026
@rtfeldman

Copy link
Copy Markdown
Contributor Author

/cherry-pick stable

@rtfeldman

Copy link
Copy Markdown
Contributor Author

/cherry-pick preview

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 15, 2026
@rtfeldman rtfeldman added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 15, 2026
@bennetbo bennetbo added this pull request to the merge queue May 15, 2026
@bennetbo bennetbo removed this pull request from the merge queue due to a manual request May 15, 2026
@rtfeldman rtfeldman added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit bd725ce May 15, 2026
43 checks passed
@rtfeldman rtfeldman deleted the AI-237/fix-new-thread-in-settings branch May 15, 2026 15:43
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label May 15, 2026
@zed-zippy

zed-zippy Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/25926963402

@zed-zippy

zed-zippy Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/25926964527

1 similar comment
@zed-zippy

zed-zippy Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/25926964527

@benbrandt

Copy link
Copy Markdown
Member

/cherry-pick preview

@zed-zippy

zed-zippy Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/25999159597

@cole-miller

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants