Skip to content

test(island): the pass's aim is read once the band stands at it - #1148

Merged
ExtraToast merged 1 commit into
mainfrom
fix/band-height-race
Sep 5, 2026
Merged

test(island): the pass's aim is read once the band stands at it#1148
ExtraToast merged 1 commit into
mainfrom
fix/band-height-race

Conversation

@ExtraToast

@ExtraToast ExtraToast commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why

aimedAt reads the height a pass is aiming at off the band's inline style, and takes the first
non-null figure it sees. That figure is not always the one the pass is aiming at.

carry() in BandSwipe.vue pins the height it is leaving a tick before it can measure the one
it is arriving at, so for a moment the inline height is the departing stop's. A stop arriving
without a gesture is read in exactly that moment.

What this achieves

The helper reads the figure the pass aims at, rather than whichever figure happens to be pinned
when it looks. Measured on the board page: from=556 swiped=914 hit=914 stands=681 — that hit
should have been 681, and the assertion comparing them passed only because both were wrong the
same way.

How

The reader is told the height the band already stood at, and waits past it. Deterministic: no
timeout raised, no bare wait, and the assertions themselves are untouched.

Not in scope

The Playwright upgrade for #852, which is the pull request that follows this one and needs this
one merged first — without it, the upgraded Chromium reads the departing height and the case
fails with Received: 0.

Worth a reviewer's attention

This is a pre-existing race, not something a newer browser introduced. It reproduces on the
Playwright this repository pins today: the case it fixes was green in 5 of 5 full-file runs on
1.60.0, and the fix holds there too, so this stands on its own rather than as preparation.

Verification

yarn typecheck, yarn lint and yarn test:unit (1540 tests over 179 files) clean, all exit 0.

boards-swipe.motion.spec.ts in the motion project, five full-file runs on the current
Playwright: 9/9, 8/9, 9/9, 9/9, 9/9. The single failure was travels the line to a board a finger arrived at, which this change does not touch and which never calls aimedAt — it passed 6 of 6
when re-run alone, and reproduces on unmodified main. The known starvation flake, 8 workers on 4
vCPUs.


Diff breakdown added removed, scaled to the largest row.

frontend                                           +12     -6    2
  e2e tests          █████████████████░░░░░░░░░    +12     -6    2

──────────────────────────────────────────────────────────────────
production                                          +0     -0
tests                                              +12     -6
total (hand-written)                               +12     -6  2 files

`aimedAt` took the first inline height it found on the swipe element and
called that the figure the pass is aiming at. `carry()` in `BandSwipe.vue`
pins the height it is leaving before it can measure the one it is arriving
at, so on a stop arriving without a gesture the first height there is
where the band was rather than where it is going.

The helper now takes the height stood at and waits past it, which tells
the two apart. Measured on the failing read: from=556 swiped=914 hit=914
stands=681, where `hit` should have been 681 and instead repeated the
height the swipe had left behind.

The race is in the helper rather than in the band, and it has always been
there: which of the two heights is read depends on when the poll lands
between the pin and the measure.
@ExtraToast
ExtraToast merged commit 0b4fbb1 into main Sep 5, 2026
25 checks passed
@ExtraToast
ExtraToast deleted the fix/band-height-race branch September 5, 2026 21:31
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