Repository navigation
Description
Problem
CanvasLink's long-press drag cancellation UI test failed in PR #172, while the same CanvasLink code and tests passed in four sibling PRs from the same beta2 base. This makes CI intermittently red across otherwise unrelated fixes. A cancellation-event/assertion timing race is a hypothesis, not an established root cause.
Observed failure
CanvasLink Android → contracts, failed job, step npm run test:canvaslink: 117 passed, 1 failed.
Test: trackpad long-press drag releases once on touchcancel and cannot fire after a second finger.
integrations/canvaslink/tests/gestures-ui.test.cjs:122
Expected: ['down', 'up']
Actual: ['down']
The assertion requires one release after cancelling an active drag. The log establishes that up was absent when the fixture calls were read; it does not establish whether it arrived later or was never produced.
Environment: GitHub-hosted Ubuntu 26.04.1 x64, Node 22.23.4, npm 10.9.9, desktop Chromium through Playwright's touch-enabled UI harness. No Android device/emulator or APK installation is involved in this test. Tested PR head: e379e21085d84081576b1ad9b80a67aec5a60bae; CI merge: e2f5046ac738a209d0deca5353282d354ebaa26f; common beta2 base: df274cfb144b2d46bbc3ab6a3b2d92c12549169e.
Relevant evidence
PR #172 changes Browser tab persistence and its tests/documentation; it does not change CanvasLink, its harness, workflow, or dependencies. The same CanvasLink suite passed in sibling PRs from that base:
Main CI for #172 also passed. These are distinct PR runs, not controlled repetitions of one revision; a failure frequency is not established. The failure has not been reproduced locally.
Suspected boundary
The test at exact beta2 explicitly waits for down, sends touchMove and touchCancel, then reads fixture calls without explicitly waiting for page-side cancellation completion. Its touch helper returns the CDP command promise without an additional page-side observation handshake.
The production release handler sends up for a tracked active drag on pointercancel. Source inspection supports that intended behavior, but does not prove event delivery/order in the failed run. A product-side state loss or Chromium event-delivery issue is not ruled out.
Investigation and acceptance
- Ask a maintainer to Re-run failed jobs on the failed run. A pass supports intermittency, not the precise race mechanism.
- Repeat the affected test on beta2 and fix(browser): preserve saved tabs before lazy restoration #172 under comparable Chromium/Node conditions. Capture
touchCancel → pointercancel → release → sendInput('up') → assertion, including pointer identity and active-drag state. - Distinguish a late event/assertion from missing cancellation delivery or a release suppressed by state/guards. If an observation race is confirmed, use a bounded condition-based wait rather than a fixed sleep. If release is actually lost, fix that path instead.
- Retain the requirement of exactly one
up, the drag-move assertion, and the second-finger cancellation check; do not weaken assertions or skip the test to obtain green CI. Verify the affected test repeatedly and the complete CanvasLink suite, with meaningful timeout diagnostics.
No fix is implemented. Android runtime impact, platform exclusivity, and regression status are not established. Related discussion: PR #172 comment.
Activity