agent_panel: Hide thread title edit button outside thread view (#56833) (cherry-pick to preview) (#57013)

Cherry-pick of #56833 to preview

----
Hide the edit thread title button unless the visible agent panel surface
is a thread.

Release Notes:

- N/A

Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
This commit is contained in:
zed-zippy[bot] 2026-05-17 17:32:07 +00:00 committed by GitHub
parent eb9ab361d6
commit 48590427d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4096,7 +4096,9 @@ impl AgentPanel {
.overflow_x_hidden()
.child(content)
.when(
self.has_open_project(cx) && !self.is_title_editor_focused(window, cx),
matches!(self.visible_surface(), VisibleSurface::AgentThread(_))
&& self.has_open_project(cx)
&& !self.is_title_editor_focused(window, cx),
|this| {
this.child(gradient_overlay).child(
h_flex()