fix(web): restore vertical touch scrolling during selection (axis-locked sweep) #1432

Merged
chris merged 2 commits from fix/mobile-scroll-in-selection into main 2026-10-29 11:11:27 +01:00
Owner

Problem

On mobile, once a selection was active on a media wall (person page/Score wall, day wall, album detail, homepage timeline), every tile ran touch-action: none (MediaGrid.svelte, class:touch-none={sweepAvailable}). The browser therefore never scrolled from a touch on the grid: vertical drags fed the sweep machinery instead of the page, so users could not scroll to look at more photos while selecting.

Fix

Standard photo-app gesture arbitration on touch:

  • Tiles now run touch-action: pan-y while a sweep is available — the browser owns vertical drags and the page scrolls normally.
  • Axis lock in the un-armed phase (touch/pen only): at the 10px slop boundary, vertical-dominant movement latches sweepAxisRejected and never arms; horizontal-dominant arms the sweep as before. The latch holds for the whole contact (no re-arm if the finger later drifts horizontal).
  • The browser claiming the pan surfaces as pointercancel, which the existing cancelled-sweep path already handles (flush, no click suppression).
  • Mouse sweeps unchanged (movement past slop arms in any direction; the armed move preventDefault — touch preventDefault was a no-op under pan-y and is now documented as such).

Tap-to-toggle and long-press-to-enter-selection are untouched; the selection/tap contract tests keep passing.

Validation

  • npm run check: 0 errors (warnings pre-existing, outside the change)
  • npm run test:unit: 45 files, 370 tests passed
  • Playwright gesture specs (timeline, albums, instance-remove-mode, person-score-sort) × desktop+mobile: 167 passed, 16 skipped (platform-specific), 1 failed — timeline scroll stability › keeps the viewport pinned to the jumped day while hydration settles (mobile). Verified pre-existing: reproduces identically on a clean origin/main checkout without this change (flaky scroll-stability family, cf. ISSUE-148 pattern).
  • New CDP-real-touch E2E test pins the contract: vertical drag in selection mode scrolls the page, sweeps nothing (still "1 selected"), leaves the next tap functional, and a subsequent horizontal sweep still selects.
## Problem On mobile, once a selection was active on a media wall (person page/Score wall, day wall, album detail, homepage timeline), every tile ran `touch-action: none` (`MediaGrid.svelte`, `class:touch-none={sweepAvailable}`). The browser therefore never scrolled from a touch on the grid: vertical drags fed the sweep machinery instead of the page, so users could not scroll to look at more photos while selecting. ## Fix Standard photo-app gesture arbitration on touch: - Tiles now run `touch-action: pan-y` while a sweep is available — the browser owns vertical drags and the page scrolls normally. - Axis lock in the un-armed phase (touch/pen only): at the 10px slop boundary, vertical-dominant movement latches `sweepAxisRejected` and never arms; horizontal-dominant arms the sweep as before. The latch holds for the whole contact (no re-arm if the finger later drifts horizontal). - The browser claiming the pan surfaces as `pointercancel`, which the existing cancelled-sweep path already handles (flush, no click suppression). - Mouse sweeps unchanged (movement past slop arms in any direction; the armed move preventDefault — touch preventDefault was a no-op under pan-y and is now documented as such). Tap-to-toggle and long-press-to-enter-selection are untouched; the selection/tap contract tests keep passing. ## Validation - `npm run check`: 0 errors (warnings pre-existing, outside the change) - `npm run test:unit`: 45 files, 370 tests passed - Playwright gesture specs (timeline, albums, instance-remove-mode, person-score-sort) × desktop+mobile: **167 passed**, 16 skipped (platform-specific), 1 failed — `timeline scroll stability › keeps the viewport pinned to the jumped day while hydration settles` (mobile). Verified pre-existing: reproduces identically on a clean `origin/main` checkout without this change (flaky scroll-stability family, cf. ISSUE-148 pattern). - New CDP-real-touch E2E test pins the contract: vertical drag in selection mode scrolls the page, sweeps nothing (still "1 selected"), leaves the next tap functional, and a subsequent horizontal sweep still selects.
fix(web): restore vertical touch scrolling during selection via axis-locked sweep
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 4s
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 15m43s
0ce8be1017
chore: release 1.21.92
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 4s
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 10m31s
adddefa276
chris merged commit 4a17219922 into main 2026-10-29 11:11:27 +01:00
Sign in to join this conversation.
No reviewers
No labels
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
chris/memories!1432
No description provided.