Dismiss hover tooltips when MCP toolbar buttons open a surface#227
Dismiss hover tooltips when MCP toolbar buttons open a surface#2270xNino wants to merge 1 commit into
Conversation
Clicking the MCP connections counter or server toggle could leave a hover tooltip floating over the freshly opened status window/popover: the tooltip's auto-dismiss paths (hover-exit and the click/scroll/key event monitors installed only after it becomes visible) don't fire when a new window steals focus under the cursor, and the tooltip renders at .floating level so it sits on top of the new surface. - Add HoverTooltipCoordinator.dismissAll() posting a notification that both HoverTooltipModifier and TooltipOverlayController observe; the modifier cleanup cancels pending-but-unshown tooltips as well as hiding visible ones. Call it from the two MCP toolbar buttons. - Guard show()/reposition() against empty or non-finite anchor rects so a stale .zero geometry report no longer snaps the bubble to the owner window's bottom-left corner; hide instead. - Refactor observer install/teardown so the new dismiss observer is cleaned up alongside the owner-will-close observer. Add TooltipOverlayControllerTests covering dismiss-all and the invalid-anchor show/reposition paths.
|
@0xNino Why did you closed the PR? The issue is still happening. I almost went crazy over the last hour, debugging my Mac processes to figure out what the heck this pop-up was. My immediate thought was that someone was watching my machine through a backdoor 🫠
|
|
@rodgomesc are you on v1.0.29 (the current)? If you can confirm we'd be happy to re-open this PR or fix it separately. Sorry it's happening to you. |
|
I closed this PR because I was not satisfied with the breadth of the original approach and wanted to revisit the fix against current The bug is now tracked in #563 and reproduced on RepoPrompt CE v1.0.29 (30). A narrower replacement is open as #564. The replacement changes only the shared |

Problem
Clicking the MCP connections counter (the green link/count pill) or the MCP Server toggle in the toolbar could leave a hover tooltip floating over the freshly opened status window / popover.
Why it sticks:
onHover(false)) and the click/scroll/key event monitors — but those monitors are installed only after the tooltip becomes visible (after the 300 ms hover delay). A click that lands during that delay can't dismiss it.onHover(false)never fires..floatingwindow level, so it sits on top of the newly opened surface — very visibly stuck until the next unrelated click/scroll/keypress.A second, related failure: a stale/empty anchor geometry report (e.g.
.zeroduring a layout/window transition) fedowner.convertToScreen(.zero), snapping the bubble to the owner window's bottom-left corner.Fix
HoverTooltipCoordinator.dismissAll(), which posts a notification observed by bothHoverTooltipModifierandTooltipOverlayController. The modifier-side cleanup cancels a pending-but-unshown tooltip as well as hiding a visible one. The two MCP toolbar buttons call it before opening their surface.show()/reposition()against empty or non-finite anchor rects — hide instead of mispositioning to the window origin.Tests
Adds
TooltipOverlayControllerTestscovering dismiss-all and the invalid-anchorshow/repositionpaths.Validation
make dev-lint— 0 violations (format-check + SwiftLint strict)make dev-test— full suite green (run via push preflight); new suite passes, stable across repeated runsmake dev-swift-build PRODUCT=RepoPrompt— cleancommitandpushmodes (staged-index + outgoing-range secret scans)UI-only change; does not touch MCP CLI/server, Agent Mode, or packaging.
Screenshot
This shows the issue: the MCP status surface opens while the hover tooltip remains floating over any app.