Impact
The shared tooltip lifecycle fix dismisses an already-created tooltip when its owner moves, closes, or resigns key. It does not cover lifecycle events that occur during the 300 ms hover delay before the tooltip controller exists.
A tooltip can therefore appear after its owner already opened a popover or lost key-window status, leaving a stale floating tooltip above the new surface.
Regression/follow-up context
Reproduction
- Hover a toolbar control with
.hoverTooltip.
- Before the 300 ms delay expires, click the control or otherwise cause its owner to resign key/open a popover.
- Keep the pointer positioned so the scheduled work remains pending.
- Observe the tooltip being constructed and ordered front after the lifecycle transition.
The MCP Server toolbar button is one reachable trigger:
Sources/RepoPrompt/Infrastructure/UI/Components/MCPServerToggleView.swift:97-108
Expected behavior
Any owner/surface lifecycle transition during the delay invalidates pending tooltip presentation.
Actual behavior
Hover schedules delayed work before lifecycle observers or input monitors exist:
Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:71
Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:129-157
Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:196-218
Owner observers are installed only when the controller is created:
Sources/RepoPrompt/Infrastructure/UI/Tooltip/TooltipOverlayController.swift:200-229
Presentation validates only that the owner remains visible:
Sources/RepoPrompt/Infrastructure/UI/Tooltip/TooltipOverlayController.swift:53-57
An already-emitted didResignKeyNotification is not replayed to observers installed afterward.
Acceptance criteria
- Owner resignation, close, movement, popover/sheet presentation, or relevant click during the delayed-show interval cancels/invalidate the pending tooltip.
- Tooltip presentation validates a captured owner lifecycle generation or equivalent current-owner state.
- Existing behavior for a stable active owner remains unchanged.
- Regression tests cover lifecycle change before the delay expires, not only an already-visible tooltip.
- Geometry and multi-window isolation tests remain green.
Validation status
Confirmed by static lifecycle ordering. No AppKit UI reproduction was run.
Related
Impact
The shared tooltip lifecycle fix dismisses an already-created tooltip when its owner moves, closes, or resigns key. It does not cover lifecycle events that occur during the 300 ms hover delay before the tooltip controller exists.
A tooltip can therefore appear after its owner already opened a popover or lost key-window status, leaving a stale floating tooltip above the new surface.
Regression/follow-up context
a49cdfc1Reproduction
.hoverTooltip.The MCP Server toolbar button is one reachable trigger:
Sources/RepoPrompt/Infrastructure/UI/Components/MCPServerToggleView.swift:97-108Expected behavior
Any owner/surface lifecycle transition during the delay invalidates pending tooltip presentation.
Actual behavior
Hover schedules delayed work before lifecycle observers or input monitors exist:
Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:71Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:129-157Sources/RepoPrompt/Infrastructure/UI/Components/TooltipBubble.swift:196-218Owner observers are installed only when the controller is created:
Sources/RepoPrompt/Infrastructure/UI/Tooltip/TooltipOverlayController.swift:200-229Presentation validates only that the owner remains visible:
Sources/RepoPrompt/Infrastructure/UI/Tooltip/TooltipOverlayController.swift:53-57An already-emitted
didResignKeyNotificationis not replayed to observers installed afterward.Acceptance criteria
Validation status
Confirmed by static lifecycle ordering. No AppKit UI reproduction was run.
Related