Fix swipe-rows colour test flake #811

Closed
kayg wants to merge 0 commits from fix/swipe-rows-flake into dev
Owner

Train BM4 WebKit first-run failure: swipe-rows.spec.ts:621 (webkit-390) "a swiped plain row keeps its colour (light, photo, Rosewood)": the card never moved.

Cause (test timing, not an app bug): the app claims a swipe only if the claiming move comes within 300 ms of touchstart (QUICK, packages/editor/src/blocks/swipe-start.ts), measured by the events' own timeStamp. The test waited one rAF between touch moves, and the claim needs 2 moves (12 px >= CLAIM 10 px). On a busy host two frames can take over 300 ms, so the app rightly read a hold and never moved the card.

Fix: the claiming move is dispatched right after touchstart; the other moves keep their one-frame spacing. Test-only, 5 lines.

Proof (cua@calternal-dev-02-std, 10 CPU busy loops alongside, --workers=1, -g "a swiped plain row keeps its colour \(light, photo"):

  • webkit-390 --repeat-each=30: 30 passed (2.8m)
  • chromium-390 --repeat-each=10: 10 passed
  • chromium-1440 --repeat-each=10 (wheel path): 10 passed

Note: I did not reproduce the failure on the old code with this load, so reliability is shown by the passing runs plus the root-cause reading above.

Decision: merging into dev myself as the task asked.

🤖 Generated with Claude Code

Train BM4 WebKit first-run failure: `swipe-rows.spec.ts:621` (webkit-390) "a swiped plain row keeps its colour (light, photo, Rosewood)": the card never moved. **Cause (test timing, not an app bug):** the app claims a swipe only if the claiming move comes within 300 ms of touchstart (`QUICK`, `packages/editor/src/blocks/swipe-start.ts`), measured by the events' own `timeStamp`. The test waited one rAF between touch moves, and the claim needs 2 moves (12 px >= `CLAIM` 10 px). On a busy host two frames can take over 300 ms, so the app rightly read a hold and never moved the card. **Fix:** the claiming move is dispatched right after touchstart; the other moves keep their one-frame spacing. Test-only, 5 lines. **Proof** (cua@calternal-dev-02-std, 10 CPU busy loops alongside, `--workers=1`, `-g "a swiped plain row keeps its colour \(light, photo"`): - webkit-390 `--repeat-each=30`: 30 passed (2.8m) - chromium-390 `--repeat-each=10`: 10 passed - chromium-1440 `--repeat-each=10` (wheel path): 10 passed Note: I did not reproduce the failure on the old code with this load, so reliability is shown by the passing runs plus the root-cause reading above. Decision: merging into dev myself as the task asked. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fix swipe-rows colour test flake: claim the swipe inside the 300 ms window
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
baa3130f30
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Merged into dev with git merge --no-ff (gates in the description).

Merged into dev with `git merge --no-ff` (gates in the description).
Author
Owner

Closing: head baa3130f is already in dev (reached via a55521f9); nothing left to merge. Branch kept.

Closing: head baa3130f is already in dev (reached via a55521f9); nothing left to merge. Branch kept.
kayg closed this pull request 2026-11-04 13:04:45 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!811
No description provided.