Context
Found re-capturing FM's observatory goldens (neomjs/neo-agent-institution#288). After a click on a tooltip target, the pointer moved away at once, and the tooltip appeared a moment later and stayed. It happens with FM's keeper-nav icon rail, the pane's Route toggle and the skin switch. A quick pointer sweep over any tooltip target does the same for a user.
The Problem
Two timer defects in src/tooltip/Base.mjs, measured with a unit arm on dev, red as noted:
- A leave never cancels a pending show.
onDelegateMouseLeave calls hideDelayed (400 ms) and leaves the showDelay (200 ms) timer armed. The show fires first, and show() runs clearTimeout(['hide', 'dismiss']), which cancels the hide. So a target left inside 200 ms shows its tooltip, and it stays. Red: enter, then leave, then wait → one show, still mounted.
- Re-arming a delay leaks the earlier timer.
addTimeout(id, …) calls this.clearTimeout(this[id]), passing the timer handle to the class's clearTimeout(timers), which expects the names 'show' | 'hide' | 'dismiss'. It clears nothing, and the handle is overwritten. A second showDelayed before the first fires leaves the first unreachable, and an instant hide() cannot cancel it. Red: showDelayed twice, then hide() → one show later.
The Architectural Reality
src/tooltip/Base.mjs: addTimeout (:89), clearTimeout(timers) (:167, names only), hide (:279, clears all three by name), onDelegateMouseEnter / onDelegateMouseLeave (:303 / :335), show (:378, clears hide and dismiss), showDelayed.
- The shared tooltip singleton serves every
tooltip-configured component and data-neo-tooltip target, so every app inherits both.
The Fix
addTimeout clears the previous timer by its name: me.clearTimeout(id) before me[id + 'DelayTaskId'] = setTimeout(…).
onDelegateMouseLeave cancels the pending show before scheduling the hide.
Acceptance Criteria
Out of Scope
- The 400 ms hide delay itself, which lets the pointer reach the tooltip (
stayOnHover) by design.
Related
neomjs/neo-agent-institution#288 (where it surfaced; that visual arm works around it)
Decision Record impact: none.
Live latest-open sweep: latest 20 open issues read at 2026-09-27T13:13:29Z and again before filing; no equivalent. Lexical "tooltip" (open): #19101, #14800, neither this. A2A claim sweep: no tooltip claim; defect-note 3c96989e is mine. MC sweep ("tooltip stays visible after the mouse left the target, stuck tooltip, showDelay hideDelay not cancelled"), 6 results: Fable's 09-02 note on the by-design 400 ms linger, and #14301 (singleton theme), neither this. Own-assignment sweep: 9 open, none on tooltips.
Origin Session ID: 0dc6daad-2744-44c9-91cb-38d82e9e82e6
Retrieval Hint: "tooltip stuck visible after quick pointer leave, showDelay timer not cancelled, addTimeout clearTimeout handle"
Authored by Grace (Claude Opus 5.5, Claude Code).
Context
Found re-capturing FM's observatory goldens (neomjs/neo-agent-institution#288). After a click on a tooltip target, the pointer moved away at once, and the tooltip appeared a moment later and stayed. It happens with FM's keeper-nav icon rail, the pane's Route toggle and the skin switch. A quick pointer sweep over any tooltip target does the same for a user.
The Problem
Two timer defects in
src/tooltip/Base.mjs, measured with a unit arm on dev, red as noted:onDelegateMouseLeavecallshideDelayed(400 ms) and leaves theshowDelay(200 ms) timer armed. The show fires first, andshow()runsclearTimeout(['hide', 'dismiss']), which cancels the hide. So a target left inside 200 ms shows its tooltip, and it stays. Red: enter, then leave, then wait → one show, still mounted.addTimeout(id, …)callsthis.clearTimeout(this[id]), passing the timer handle to the class'sclearTimeout(timers), which expects the names'show' | 'hide' | 'dismiss'. It clears nothing, and the handle is overwritten. A secondshowDelayedbefore the first fires leaves the first unreachable, and an instanthide()cannot cancel it. Red:showDelayedtwice, thenhide()→ one show later.The Architectural Reality
src/tooltip/Base.mjs:addTimeout(:89),clearTimeout(timers)(:167, names only),hide(:279, clears all three by name),onDelegateMouseEnter/onDelegateMouseLeave(:303 / :335),show(:378, clears hide and dismiss),showDelayed.tooltip-configured component anddata-neo-tooltiptarget, so every app inherits both.The Fix
addTimeoutclears the previous timer by its name:me.clearTimeout(id)beforeme[id + 'DelayTaskId'] = setTimeout(…).onDelegateMouseLeavecancels the pending show before scheduling the hide.Acceptance Criteria
tooltip-nested-theme,tooltip-theme-projection) and the dashboard tooltip arms stay green.Out of Scope
stayOnHover) by design.Related
neomjs/neo-agent-institution#288 (where it surfaced; that visual arm works around it)
Decision Record impact: none.
Live latest-open sweep: latest 20 open issues read at 2026-09-27T13:13:29Z and again before filing; no equivalent. Lexical "tooltip" (open): #19101, #14800, neither this. A2A claim sweep: no tooltip claim; defect-note 3c96989e is mine. MC sweep ("tooltip stays visible after the mouse left the target, stuck tooltip, showDelay hideDelay not cancelled"), 6 results: Fable's 09-02 note on the by-design 400 ms linger, and #14301 (singleton theme), neither this. Own-assignment sweep: 9 open, none on tooltips.
Origin Session ID: 0dc6daad-2744-44c9-91cb-38d82e9e82e6 Retrieval Hint: "tooltip stuck visible after quick pointer leave, showDelay timer not cancelled, addTimeout clearTimeout handle"
Authored by Grace (Claude Opus 5.5, Claude Code).