Repository navigation
Description
What happens
Moving into a hover popup should cancel what the pointer left behind: the tooltip of a neighbouring widget it crossed on the way, and the popup's own close delay. When the main thread is busy at the moment one of those waits runs out, the cancel comes too late. The neighbour's tooltip still replaces the popup, or the popup closes although the pointer came back into it.
On CI it fails hoverTriangleProtectsDiagonalMovementUntilThePointerEntersStopsOrLeaves(replace: true, finish: "enter") at PresentationIntegrationTests.swift:254 (presentations.count → 2) and :257: 4 times, twice since 2026-11-01, including the push to main in run 41020019966. Those runs spent 35–55 seconds in that test, a sign of a very busy main actor.
Steps to reproduce
In the app it takes a main thread busy for more than 200 ms at the wrong moment, so it should be rare. In a test it happens every time:
- Start a hover wait: cross a neighbouring widget on the way to an open hover popup, or leave the popup so its close delay starts.
- Keep the main actor busy for longer than the 200 ms wait.
- Move into the popup, which cancels the wait.
- The cancelled task still shows the neighbour's tooltip, or closes the popup.
Expected
Entering the popup always cancels the pending tooltip or close.
Environment
CI (macos-26, Xcode 26.6) under load; locally on macOS 27.2 (Xcode 27.2) by holding the main actor.
Diagnosis
WidgetPopup.hover(_:store:anchor:show:) and closeAfterHover() (Sources/StableBar/WidgetPopup.swift) act after Task.sleep and waitForHoverPath(). A cancel interrupts a sleep that is still waiting, but not one that already ran out and whose continuation waits behind a busy main actor. That continuation resumes, waitForHoverPath() returns normally because the pointer has stopped, and show() or close() runs. Nothing checks for cancellation after the waits, although hover's documentation says that leaving the widget or closing the popup cancels the show.
Related
- Hover popups disappear while moving diagonally into them #360 and fix: keep hover popups open while moving toward them #361 added the protection for the path into the popup (
waitForHoverPath); this is about the cancel that ends it. - A tooltip opens shrunken and blurred, then grows to its size #244 is an unrelated glitch in how tooltips first draw.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.12.0 [skip ci]
stablebar-releases commentedon Nov 10, 2026
🎉 This issue has been resolved in version 0.12.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀