fix(web): resolve 24 pre-existing main E2E failures (not i18n regressions) #1182

Merged
chris merged 5 commits from fix/main-e2e-preexisting-failures into main 2026-10-13 03:17:20 +02:00
Owner

Why

CI run 4506 (job 55974) on main showed 24 failed + 6 flaky E2E tests. All 24 reproduce on an unmodified main checkout (38f56115) with no i18n work in the tree — they are pre-existing main failures, not regressions from the Paraglide wave-1 i18n PR (#1178). This PR fixes them.

Root causes (per failure group)

Group Verdict Root cause
manual-face-bbox (desktop+mobile, also the CI flake) Real bug The loading skeleton used transition:fade on an in-flow min-h-screen div, so during the 300 ms outro the skeleton and the loaded viewer coexisted in flow and the image surface jumped ~407 px. Pointer coords for a bbox drawn during that window were normalized against the post-jump rect → persisted y 0.806 instead of 0.2 (data corruption for a real user, not just a test artifact). Measured: surface top 521 → 114 px. Fixed by making the outgoing skeleton an absolute inset-0 pointer-events-none overlay. Coordinate math in FaceMarker*/mediaUtils verified correct — untouched.
discovery-domain-instance-detail ×5 (both projects) Expectation drift Titles intentionally use domainLabels.singularLabel since 75621b6c ("Plant - Rose", "Plant", …); back link now renders the intentionally capitalized plural (Plants vs the old lowercased domainKey-derived plants). Test expectations updated. DiscoveryInstanceDetail.svelte and DomainSuggestionsCarousel.svelte untouched.
library-stats:60 Expectation drift (locale) Page copy is still hardcoded Danish but Intl.NumberFormat(getLocale()) resolves to English base locale → 12,345 vs expected 12.345. Pinned locale=da cookie to preserve the spec's intent.
profile-tabs ×4 (both projects) Expectation drift (locale) Tab labels come from profileTab* messages (Konto, …) while page headings stay hardcoded English. Pinned locale=da.
storage-paths ×2 (both projects) Expectation drift (locale) Setup/maintenance chrome (Speicherpfade einrichten, Wartung) is localized; with no cookie the app rendered English. Pinned locale=de.

Additionally fixed the timeline:2171 mobile flake: getByRole('button', { name: 'Add' }) substring-matches Close add to album, so while the album list was still loading .last() resolved to the close button — dialog dismissed, no toast. Now requires the exact name.

Not fixed (tracked)

  • ISSUE-148 backup-export:5 and ISSUE-149 discovery merge menu flake: load-dependent click-swallow races that pass on retry; need a load repro first.

Verification (all from this worktree)

  • Affected specs, desktop + mobile: 88/88 passed
  • Full npx playwright test: 995 passed, 23 skipped, 0 failed, 0 flaky (exit 0)
  • npm run check: 0 errors (18 pre-existing warnings, unchanged)
  • manual-face-bbox extra soak: 30/30 consecutive passes after the timeline fix
## Why CI run 4506 (job 55974) on `main` showed **24 failed + 6 flaky** E2E tests. All 24 reproduce on an unmodified `main` checkout (`38f56115`) with no i18n work in the tree — they are **pre-existing main failures, not regressions from the Paraglide wave-1 i18n PR (#1178)**. This PR fixes them. ## Root causes (per failure group) | Group | Verdict | Root cause | |---|---|---| | `manual-face-bbox` (desktop+mobile, also the CI flake) | **Real bug** | The loading skeleton used `transition:fade` on an *in-flow* `min-h-screen` div, so during the 300 ms outro the skeleton and the loaded viewer coexisted in flow and the image surface jumped ~407 px. Pointer coords for a bbox drawn during that window were normalized against the post-jump rect → persisted `y` 0.806 instead of 0.2 (data corruption for a real user, not just a test artifact). Measured: surface top 521 → 114 px. Fixed by making the outgoing skeleton an `absolute inset-0 pointer-events-none` overlay. Coordinate math in `FaceMarker*`/`mediaUtils` verified correct — untouched. | | `discovery-domain-instance-detail` ×5 (both projects) | Expectation drift | Titles intentionally use `domainLabels.singularLabel` since 75621b6c ("Plant - Rose", "Plant", …); back link now renders the intentionally capitalized plural (`Plants` vs the old lowercased `domainKey`-derived `plants`). Test expectations updated. `DiscoveryInstanceDetail.svelte` and `DomainSuggestionsCarousel.svelte` untouched. | | `library-stats:60` | Expectation drift (locale) | Page copy is still hardcoded Danish but `Intl.NumberFormat(getLocale())` resolves to English base locale → `12,345` vs expected `12.345`. Pinned `locale=da` cookie to preserve the spec's intent. | | `profile-tabs` ×4 (both projects) | Expectation drift (locale) | Tab labels come from `profileTab*` messages (`Konto`, …) while page headings stay hardcoded English. Pinned `locale=da`. | | `storage-paths` ×2 (both projects) | Expectation drift (locale) | Setup/maintenance chrome (`Speicherpfade einrichten`, `Wartung`) is localized; with no cookie the app rendered English. Pinned `locale=de`. | Additionally fixed the `timeline:2171` mobile flake: `getByRole('button', { name: 'Add' })` substring-matches `Close add to album`, so while the album list was still loading `.last()` resolved to the **close button** — dialog dismissed, no toast. Now requires the exact name. ## Not fixed (tracked) - ISSUE-148 `backup-export:5` and ISSUE-149 discovery merge menu flake: load-dependent click-swallow races that pass on retry; need a load repro first. ## Verification (all from this worktree) - Affected specs, desktop + mobile: **88/88 passed** - Full `npx playwright test`: **995 passed, 23 skipped, 0 failed, 0 flaky** (exit 0) - `npm run check`: **0 errors** (18 pre-existing warnings, unchanged) - `manual-face-bbox` extra soak: 30/30 consecutive passes after the timeline fix
The loading skeleton branch used transition:fade on an in-flow min-h-screen
div, so for the 300ms outro Svelte kept it in the DOM *and* in normal flow.
Skeleton + loaded viewer then stacked vertically inside the fixed section and
the image surface jumped ~407px when the fade ended.
Page titles use domainLabels.singularLabel (75621b6c: 'Plant - Rose'), and
the back link now renders the intentionally capitalized plural label
('Plants' instead of the old lowercased domainKey-derived 'plants').
Wave-1 i18n resolves the locale from the 'locale' cookie falling back to the
English base locale, so tests that never set a cookie rendered English chrome
against still-hardcoded DA/DE page copy. Pin da for library-stats/profile-tabs
and de for storage-paths to preserve the specs' original intent.
'Add' as a substring also matches 'Close add to album'/'Add image to album',
so while the album list was still loading (dialog Add button not yet rendered)
.last() resolved to the close button, dismissed the dialog and no toast ever
appeared. Exact-name matching makes the locator wait for the real button.
docs: track remaining load-dependent E2E flakes (ISSUE-148, ISSUE-149)
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 2s
Build and Deploy / Android unit tests and debug APK (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 plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Build media 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 ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (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 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 / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5m50s
fbbd828cc4
chris merged commit 87b74bdf6c into main 2026-10-13 03:17:20 +02: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!1182
No description provided.