Skip to content

gpui: Fix bug on on_hover callbacks#46371

Merged
danilo-leal merged 1 commit intomainfrom
fix-on-hover
Jan 8, 2026
Merged

gpui: Fix bug on on_hover callbacks#46371
danilo-leal merged 1 commit intomainfrom
fix-on-hover

Conversation

@danilo-leal
Copy link
Member

Tackling this as I noticed a bug in the agent panel where the button to delete a thread, which appeared only on hover, stopped showing up. PRs #43324 and #45437 fixed stuff in applying hover styles through .hover() but broke the .on_hover() callback. Problem was that both methods were sharing the same element_state.hover_state but running at different phases. The solution here was to add a new independent state field for the hover listener (hover_listener_state) while the hover style method keeps using hover_state.

Release Notes:

  • Agent: Fixed a bug where the button to delete a thread stopped showing up.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 8, 2026
@danilo-leal danilo-leal merged commit f18b288 into main Jan 8, 2026
24 checks passed
@danilo-leal danilo-leal deleted the fix-on-hover branch January 8, 2026 22:47
@reflectronic
Copy link
Member

/cherry-pick stable

github-actions bot pushed a commit that referenced this pull request Jan 14, 2026
Tackling this as I noticed a bug in the agent panel where the button to
delete a thread, which appeared only on hover, stopped showing up. PRs
#43324 and #45437 fixed stuff in applying hover styles through
`.hover()` but broke the `.on_hover()` callback. Problem was that both
methods were sharing the same `element_state.hover_state` but running at
different phases. The solution here was to add a new independent state
field for the hover listener (`hover_listener_state`) while the hover
style method keeps using `hover_state`.

Release Notes:

- Agent: Fixed a bug where the button to delete a thread stopped showing
up.
zed-zippy bot added a commit that referenced this pull request Jan 14, 2026
#46831)

Cherry-pick of #46371 to stable

----
Tackling this as I noticed a bug in the agent panel where the button to
delete a thread, which appeared only on hover, stopped showing up. PRs
#43324 and #45437 fixed stuff in applying hover styles through
`.hover()` but broke the `.on_hover()` callback. Problem was that both
methods were sharing the same `element_state.hover_state` but running at
different phases. The solution here was to add a new independent state
field for the hover listener (`hover_listener_state`) while the hover
style method keeps using `hover_state`.

Release Notes:

- Agent: Fixed a bug where the button to delete a thread stopped showing
up.

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants