Re-derive the rail's hover-peek instead of trusting two events

Fixkamo-internal
Ya
2 Septemba 2026, 15:09 UTC
Mwandishi
Kamo
Ahadi ya
551e970

The collapsed rail's peek state was written by exactly two things, pointerenter and pointerleave on the rail itself, and nothing ever re-derived it from where the pointer actually is. So a boundary crossing that is never delivered desynchronizes it permanently: the rail sits open with the pointer nowhere near it, or sits shut with the pointer on top of it, until the member goes and crosses the edge again. Both reported symptoms are the same defect pointing in opposite directions. Three ways a crossing goes missing, two of them deterministic: - handlePeekEnter read enabled/railMode/hoverPeek at EVENT time, and React synthesizes no enter for a node the pointer is already inside. A reload with flipping true after the first render -- which happens on every single load, because useBreakpoint's useMediaQuery answers false on that pass. - isPeeking survived spells where peeking was impossible at all, a resize below the md breakpoint and back. Nothing cleared it, and the stale true then swallowed the next Collapse, because `expanded` reads it the instant the rail is collapsed again. - No leave lands: the pointer exits the window edge, or dnd-kit's DragOverlay (fixed, z-index 999, and NOT pointer-events:none) takes over the hit test. useNavHoverPeek is not a fourth special case. It re-derives the state from where the pointer is, on any movement anywhere in the document, asking the same question the browser asks when it decides to fire the boundary events. When the events work the reconcile is a no-op; when one goes missing, the next movement case needs no movement at all, a hard clear whenever peeking stops being possible, a clear when the pointer leaves the window, drag suppression so the overlay cannot shut the rail mid-gesture, and a latch so collapsing under a resting pointer still stays collapsed -- which is what the old enter/leave pair already did. The rail's own handlers stay: they are the zero-latency path, and the only path a touch tap takes, since a tap produces no pointermove. The eight new tests were mutation-checked -- disabling the reconcile turns seven of them red.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei