Skip to content

MCP connection tooltip remains floating after opening the status window #563

Description

@0xNino

Impact

On RepoPrompt CE v1.0.29 (30), the MCP connection-count tooltip can remain visible after its MCP Server popover is dismissed.

The tooltip becomes detached from its control, stays at its previous screen position, and can float above unrelated windows.

Screenshot

Image

Reproduction

  1. Open the MCP Server toolbar popover.
  2. Hover the connection-count pill until its tooltip appears.
  3. Click the connection count to open the MCP status window and dismiss the popover.
  4. Move the RepoPrompt window or focus another window.

Frequency: Reproduced on the current v1.0.29 release.

Expected behavior

The tooltip should disappear when its owning popover or window is dismissed, moves, closes, or loses key-window status.

Actual behavior

The tooltip can remain visible at its old screen position after the MCP Server popover closes. Because it is presented at floating window level, it can remain above other windows.

Investigation

MCPConnectionsCounter uses the shared .hoverTooltip(...) modifier.

The shared TooltipOverlayController presents each tooltip as a standalone borderless NSWindow at .floating level. It deliberately does not attach the tooltip as a child window because of prior menu-hierarchy concerns.

The controller currently observes only NSWindow.willCloseNotification. SwiftUI popovers may instead be ordered out or resign key-window status without closing their backing window. In that lifecycle path, the tooltip window can outlive its owner and retain its previous screen coordinates.

Prior PR #227 proposed a broader solution using an application-wide tooltip-dismiss notification called from the MCP controls, together with invalid-anchor handling. That PR was intentionally closed without merging so the approach could be reconsidered. The current reproduction confirms that the user-visible defect remains in v1.0.29.

A narrower current-main fix has been validated locally by dismissing the tooltip at the shared owner-window lifecycle boundary, without adding MCP-specific dismiss calls or changing the window hierarchy.

No matching standalone open or closed issue was found.

Acceptance criteria

  • Clicking the MCP connection count cannot leave its tooltip visible after the MCP Server popover closes.
  • A tooltip cannot remain detached when its owning window closes, moves, or resigns key-window status.
  • Existing hover-tooltip behavior remains unchanged while the owner is active.
  • The fix does not change MCP server, connection, or routing behavior.

Environment

  • RepoPrompt CE v1.0.29 (30)
  • macOS 27.0
  • arm64

Related work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions