Stability: tasks-tick.spec.ts:61 (and the other forced tick clicks) land on the phone's floating bar when the row is below the fold #1165

Closed
opened 2026-11-15 21:16:52 +00:00 by kayg · 3 comments
Owner

apps/web/e2e/tasks-tick.spec.ts:61 ("unticking a ticked task is its own undo") fails now and then on webkit-390; seen in the Tasks Float slice 1 evidence (#1161, Evidence 4: failed on that branch and on dev, :49/:61/:72/:107 in several projects).

Evidence (stability lane, 15 Nov, dev 42c219afd)

  • dev-02 (aarch64), --project=webkit-390 --repeat-each=30 --workers=1 --retries=0, one slot job: 1 failed / 29 passed (repeat 14; the same vault had 14 earlier Untick-… tasks).
  • Failure: expect.poll(() => statusOf(page, id)).toBe('done') at line 66, received todo after 20 s: the first box(page, id).click({ force: true }) did nothing to the task.
  • The failure's page snapshot has the "Search or add" dialog open: the click opened Search instead of ticking.

Cause (test race)

click({ force: true }) scrolls an off-screen row by the least it can, which puts it at the very edge of the viewport; on a phone the floating bar (the Search pill) is over that edge, and a forced click does not check what receives it. As the vault fills with Today tasks (every repeat and every other spec adds some) the new row sits below the fold, and the click lands on the bar. The same pattern is in the other forced tick clicks of this spec.

`apps/web/e2e/tasks-tick.spec.ts:61` ("unticking a ticked task is its own undo") fails now and then on `webkit-390`; seen in the Tasks Float slice 1 evidence (#1161, Evidence 4: failed on that branch and on dev, `:49/:61/:72/:107` in several projects). ## Evidence (stability lane, 15 Nov, dev `42c219afd`) - dev-02 (aarch64), `--project=webkit-390 --repeat-each=30 --workers=1 --retries=0`, one slot job: **1 failed / 29 passed** (repeat 14; the same vault had 14 earlier `Untick-…` tasks). - Failure: `expect.poll(() => statusOf(page, id)).toBe('done')` at line 66, received `todo` after 20 s: the first `box(page, id).click({ force: true })` did nothing to the task. - The failure's page snapshot has the **"Search or add" dialog open**: the click opened Search instead of ticking. ## Cause (test race) `click({ force: true })` scrolls an off-screen row by the least it can, which puts it at the very edge of the viewport; on a phone the floating bar (the Search pill) is over that edge, and a forced click does not check what receives it. As the vault fills with Today tasks (every repeat and every other spec adds some) the new row sits below the fold, and the click lands on the bar. The same pattern is in the other forced tick clicks of this spec.
Author
Owner

Repro, cause, fix (stability lane, 15 Nov)

Repro (dev 42c219afd, dev-02, webkit-390, one slot job, --repeat-each=30): 1 failed / 29 passed (repeat 14), the failure of this issue: the first box(page, id).click({ force: true }) leaves the task todo; the page snapshot has the Search or add dialog open.

Cause. Playwright scrolls a row only when it is not visible at all, and by the least it can. A row whose box is inside the window but at the bottom edge is under the phone's floating Search pill; force: true skips the "receives events" check, so the click lands on the pill and opens Search. The vault gets more Today tasks with every repeat and every other spec, so the new row's place drifts into that band.

Deterministic red. Scratch spec (not committed): makes a task, opens Today, and repeats until the box centre is covered (elementFromPoint = pill field press, row mid at y=819.8 of 844), then does the forced click. Dev tip: fails (expected "done", received "todo"). With tick() (row to the middle first): 3 / 3 pass, same covered position (after 14, after 0, after 0).

Fix: PR #1167 (test only): tick(page, id) in tasks-helpers.ts scrolls the row to the middle, then the same forced click; all six forced tick clicks in tasks-tick.spec.ts use it. Assertions unchanged.

Gates: the whole tasks-tick.spec.ts (8 tests) --repeat-each=30, webkit-390 and webkit-1440 on dev-02: 239 / 240 each; the one failure in each is a different class (a tasks.set-status request that never answered within 20 s while the host was heavily loaded (each 240-test run took ~35 min instead of ~10): Space tick on webkit-390, Undo on webkit-1440); none is the covered-click. Chromium results follow below. Perf: none (test only).

## Repro, cause, fix (stability lane, 15 Nov) **Repro (dev `42c219afd`, dev-02, webkit-390, one slot job, `--repeat-each=30`):** 1 failed / 29 passed (repeat 14), the failure of this issue: the first `box(page, id).click({ force: true })` leaves the task `todo`; the page snapshot has the *Search or add* dialog open. **Cause.** Playwright scrolls a row only when it is not visible at all, and by the least it can. A row whose box is inside the window but at the bottom edge is **under the phone's floating Search pill**; `force: true` skips the "receives events" check, so the click lands on the pill and opens Search. The vault gets more Today tasks with every repeat and every other spec, so the new row's place drifts into that band. **Deterministic red.** Scratch spec (not committed): makes a task, opens Today, and repeats until the box centre is covered (`elementFromPoint` = `pill field press`, row mid at y=819.8 of 844), then does the forced click. Dev tip: **fails** (`expected "done", received "todo"`). With `tick()` (row to the middle first): **3 / 3 pass**, same covered position (`after 14`, `after 0`, `after 0`). **Fix:** PR #1167 (test only): `tick(page, id)` in `tasks-helpers.ts` scrolls the row to the middle, then the same forced click; all six forced tick clicks in `tasks-tick.spec.ts` use it. Assertions unchanged. **Gates:** the whole `tasks-tick.spec.ts` (8 tests) `--repeat-each=30`, webkit-390 and webkit-1440 on dev-02: 239 / 240 each; the one failure in each is a different class (a `tasks.set-status` request that never answered within 20 s while the host was heavily loaded (each 240-test run took ~35 min instead of ~10): `Space` tick on webkit-390, `Undo` on webkit-1440); none is the covered-click. Chromium results follow below. Perf: none (test only).
Author
Owner

Gates for PR #1167 (head a9b3e46b0), stability lane

  • bun run check 0 errors, bun run test 319 pass, bun run lint ok (dev-02).
  • Whole tasks-tick.spec.ts, --workers=1 --repeat-each=30: chromium-1440 (dev-02) 240 / 240; webkit-390 and webkit-1440 239 / 240 each (the failures are the set-status answers of #1179, not the covered click).
  • chromium-390, --repeat-each=30 (one server for all 30 repeats): the run cascades from about repeat 22: every test then fails with set-status sent and never answered in 20 s (trace: tasks.set-status -1). dev-01 (dev + this fix): 156 / 240 pass; dev-02 with #1167 + #1178 + #1179 merged: 263 / 300 pass, 37 fail, all after that point. Before it, 0 failures. I did not find why the server stops answering set-status late in a long run on this project (the vault holds several hundred task notes by then; the server writes every line that links to the task); it is a server-side question, listed in #1182. Not caused by the click (the click happens, the request is sent).
## Gates for PR #1167 (head `a9b3e46b0`), stability lane - `bun run check` 0 errors, `bun run test` 319 pass, `bun run lint` ok (dev-02). - Whole `tasks-tick.spec.ts`, `--workers=1 --repeat-each=30`: **chromium-1440 (dev-02) 240 / 240**; webkit-390 and webkit-1440 239 / 240 each (the failures are the set-status answers of #1179, not the covered click). - chromium-390, `--repeat-each=30` (one server for all 30 repeats): the run **cascades from about repeat 22**: every test then fails with `set-status` sent and never answered in 20 s (trace: `tasks.set-status -1`). dev-01 (dev + this fix): 156 / 240 pass; dev-02 with #1167 + #1178 + #1179 merged: 263 / 300 pass, 37 fail, all after that point. Before it, 0 failures. I did not find why the server stops answering `set-status` late in a long run on this project (the vault holds several hundred task notes by then; the server writes every line that links to the task); it is a server-side question, listed in #1182. Not caused by the click (the click happens, the request is sent).
Author
Owner

Fixed by #1167, now on dev. Closing.

Fixed by #1167, now on dev. Closing.
kayg closed this issue 2026-11-16 00:53:17 +00:00
Sign in to join this conversation.
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#1165
No description provided.