Skip to content

fix(tooltip): dismiss a preview whose row is gone - #157

Merged
sorenwacker merged 1 commit into
mainfrom
fix/tooltip-outlives-its-trigger
Sep 24, 2026
Merged

sorenwacker merged 1 commit into
mainfrom
fix/tooltip-outlives-its-trigger

Conversation

@sorenwacker

Copy link
Copy Markdown
Owner

From a screenshot of a preview stranded over the timeline, describing a group that was not in that view.

The tooltip is positioned from a single anchor element kept in document.body, not from the row that triggered it, so nothing about that row reaching the end of its life reaches the tooltip. Hover a card, switch view: the card unmounts without ever sending mouseleave, and the preview hangs over whatever comes next until something unrelated happens to dismiss it. TableView and GraphView escape this because they unmount on a view change and their onUnmounted cleanup fires; App owns the instance used by cards and the timeline and never unmounts, so nothing cleaned up after it. watch(viewMode, ...) existed already but only loaded the trash.

Added the exits that do not depend on the trigger still being there:

  • in the composable, so every consumer gets them: the window losing focus, and the pointer leaving the window
  • in App: a view change, and opening a container, which replaces the rows for the same reason

Four tests in useNodeTooltip.test.js, red first, including that a locked preview is dismissed too - a locked one survives mouseleave by design, so it is the one that would stay longest - and that the listeners come off on cleanup rather than leaking per instance.

2241 unit tests and 30 e2e pass.

@sorenwacker
sorenwacker merged commit 5bdaa4a into main Sep 24, 2026
7 checks passed
@sorenwacker
sorenwacker deleted the fix/tooltip-outlives-its-trigger branch September 24, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant