Commit 57f01f2
Hide orchestration hover card as soon as cursor leaves the pill
Exiting the hover card in certain ways (cursor leaving the app
window, focus changes, layout drops mid-hover, the cursor passing
through a stale Hoverable that suppresses the synthetic hover-out)
could leave `hovered_pill` stuck on a stale id and the card
visible until something else triggered a re-render. The pill's
`on_hover(false)` callback didn't fire in those cases, so the
`SetHoveredPill(None)` action was never dispatched.
Add a defensive render-time check: only render the hover card if
the underlying `MouseState::is_mouse_over_element` for the
hovered pill still reports the cursor is over it. This makes the
overlay strictly track the cursor — as soon as the pointer moves
off the pill, the next render hides the card, regardless of
whether the typed-action callback fired.
Trade-off: the existing 80ms hover-out smoothing (intended to
bridge the 6px gap between pill and card) becomes a no-op at the
render layer because `is_mouse_over_element` is not delayed.
The card was never meant to be interactive (its docstring already
notes the card disappears as soon as the pointer leaves the pill
body), so losing the smoothing is acceptable in exchange for
guaranteed dismissal.
Co-Authored-By: Oz <oz-agent@warp.dev>1 parent 69b6343 commit 57f01f2
1 file changed
Lines changed: 22 additions & 0 deletions
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
854 | 867 | | |
855 | 868 | | |
856 | 869 | | |
857 | 870 | | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
858 | 880 | | |
859 | 881 | | |
860 | 882 | | |
| |||
0 commit comments