Repository navigation
Commit 3b10292
test(desktop): wait for the Buzz chip to take the pointer before hovering
Follow-up to the 10-30 review of #8743 on 13171fd. "composer Buzz chip
labels wrap without orphaning their icons" still failed the PR's Flake
Check: run 41051895661, job 124049928438, 1 of 10 repeats. The centre
poll in positionOverFragment expected < 1 and received 81.3515625. The
caller was :711 of the merge commit, positionOverFragment(0), so this
was the first fragment. The current head (832737e, a rebase) has the
same positionOverFragment.
Evidence: the tooltip is open. data-state matches /open/, and the error
context still marks the chip [active]. The screenshot has the tooltip at
x 333-621, centre 477. That's the centre of the whole two-line chip,
where Radix places the tooltip when focus opens it. The cursor was at
395.6, over the "relay" fragment. In the video the timeline stops moving
before the tooltip fades in at that spot, and the tooltip doesn't move
for the rest of the run.
Cause: useInlineTooltipPosition moves the content only from the
trigger's pointermove. Once a pointermove lands, the hook positions the
content in that frame or the next, and later Radix placements re-apply
the offset. So with the pointer still, the tooltip stays at its focus
placement only if the spec's move never reached the chip. Virtua 0.49.3
causes that. While the list is scrolling, its Virtualizer sets
pointer-events: none on the item container. A 150 ms timer clears it,
and every scroll event restarts the timer. Scrolls Virtua makes itself,
like the bottom settle's scrollToIndex, don't set the flag, but other
scroll writes can. The artifacts don't show which one set it here. The
floor wait only proves scrollTop held for two frames, about 33 ms. A
move inside the window hit-tests past the rows. When the rows take
pointer events again the pointer hasn't moved, so no pointermove
follows, and in this run none did. data-state can't catch this, because
focus already opened the tooltip.
Fix: positionOverFragment measures the fragment and hit-tests its
centre with document.elementFromPoint in one evaluate. It polls until
that point lands on the chip, then moves there. elementFromPoint skips
pointer-events: none, so the poll waits out Virtua's flag. After the ack
and floor waits nothing scrolls, so the move reaches the chip, and the
centre poll then proves the reposition landed. This waits on a
precondition. It doesn't retry the hover: the move, the open check and
the centre poll each still run once per fragment. A fresh hover per
fragment wouldn't fix this alone, because a re-entry inside the window
misses the chip the same way.
Not a product change: a real pointer sends a stream of moves, so the
next one after the window positions the tooltip.
Verification: pnpm typecheck and pnpm check pass, with biome's 3
existing warnings. An ad hoc tsc over navigation.spec.ts with the
desktop tsconfig gives the same 7 pre-existing errors, none in the
changed lines. Playwright wasn't run locally. The Flake Check lane will
repeat the spec.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>1 parent 832737e commit 3b10292
1 file changed
Lines changed: 33 additions & 18 deletions
File tree
- desktop/tests/e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
693 | 708 | | |
694 | 709 | | |
695 | 710 | | |
| |||
0 commit comments