bar-stays: link-chip tap fails on webkit-390 on dev #387

Closed
opened 2026-10-15 00:44:03 +00:00 by kayg · 2 comments
Owner

e2e/bar-stays.spec.ts:77 ("a tap on the link chip in the selected block: its note opens, or the block bar stays") fails 3 of 3 on webkit-390 on plain dev at 63ef0f6, so it isn't from #383. The #287 agent found it while running the #383 checks.

What the test expects: tapping a link chip inside a selected block either opens the linked note (with that note's tools in the bar), or leaves the block bar showing. The bar must never show the tabs.

To do: find out which assertion fails on WebKit, then decide whether it's an app bug (the tap shows the tabs or the wrong bar) or a test race. Fix whichever it is. Related: #325 leftovers.

`e2e/bar-stays.spec.ts:77` ("a tap on the link chip in the selected block: its note opens, or the block bar stays") fails 3 of 3 on **webkit-390** on plain `dev` at 63ef0f6, so it isn't from #383. The #287 agent found it while running the #383 checks. What the test expects: tapping a link chip inside a selected block either opens the linked note (with that note's tools in the bar), or leaves the block bar showing. The bar must never show the tabs. To do: find out which assertion fails on WebKit, then decide whether it's an app bug (the tap shows the tabs or the wrong bar) or a test race. Fix whichever it is. Related: #325 leftovers.
Author
Owner

PR #389.

Findings. On a fresh worktree at 63ef0f6 (train binary, --workers 1), the test did NOT fail on webkit-390: 1 isolated pass, 3/3 repeated whole-spec passes, whole bar-* set 27/27, and 4/4 under a 12-core CPU burn. So no app bug reproduced.

Probe of the tap: on WebKit the tap navigates (#/note/Other-..., bar log empty, so the block bar was never swapped for the tabs); on Chromium the URL stays on the note with ?bar=block. Both are the two outcomes the test allows.

Likely cause (test race). The test slept a fixed 500ms, read page.url() once, then asserted a bar by that snapshot. When the WebKit navigation and the new note's bar load take longer than 500ms (loaded host, load average was ~20), the URL is still the old note's while the bar is mid-swap, so the snapshot and the bar disagree. I could not reproduce the exact failure, so this is inferred from the code, not confirmed.

Fix. The test now polls (toPass, 8s) until the bar is in a good place for the URL it sees (Note tools if the other note opened, block/text bar otherwise) with no tablist, then rechecks for tabs after 300ms.

Results. After the change: spec :77 3/3 on webkit-390 and chromium-390; all bar-* on chromium-390 27/27; on webkit-390 26/27 with bar-focus flaking under host load (passes alone on rerun, and also passed before my change; the spec is untouched). If #387 still fails for you on a quiet host, send the trace, since that would point at an app bug I did not see.

PR #389. **Findings.** On a fresh worktree at 63ef0f6 (train binary, --workers 1), the test did NOT fail on webkit-390: 1 isolated pass, 3/3 repeated whole-spec passes, whole bar-* set 27/27, and 4/4 under a 12-core CPU burn. So no app bug reproduced. Probe of the tap: on WebKit the tap navigates (`#/note/Other-...`, bar log empty, so the block bar was never swapped for the tabs); on Chromium the URL stays on the note with `?bar=block`. Both are the two outcomes the test allows. **Likely cause (test race).** The test slept a fixed 500ms, read `page.url()` once, then asserted a bar by that snapshot. When the WebKit navigation and the new note's bar load take longer than 500ms (loaded host, load average was ~20), the URL is still the old note's while the bar is mid-swap, so the snapshot and the bar disagree. I could not reproduce the exact failure, so this is inferred from the code, not confirmed. **Fix.** The test now polls (`toPass`, 8s) until the bar is in a good place for the URL it sees (Note tools if the other note opened, block/text bar otherwise) with no tablist, then rechecks for tabs after 300ms. **Results.** After the change: spec :77 3/3 on webkit-390 and chromium-390; all bar-* on chromium-390 27/27; on webkit-390 26/27 with bar-focus flaking under host load (passes alone on rerun, and also passed before my change; the spec is untouched). If #387 still fails for you on a quiet host, send the trace, since that would point at an app bug I did not see.
Author
Owner

Closing during the 26 Oct handover cleanup: The bar-stays fix landed in dev (PR #389).

Closing during the 26 Oct handover cleanup: The bar-stays fix landed in dev (PR #389).
kayg closed this issue 2026-10-26 08:46: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#387
No description provided.