[GH-ISSUE #5626] Stabilize mobile WebKit fixture startup in transcript-swipe and Game CYOA tests #3115

Closed
opened 2026-10-21 05:59:44 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5626

Originally assigned to: @Romuromylus on GitHub.

Problem

The required mobile-webkit Release Regression Matrix job is intermittently failing because seeded UI state never appears in two unrelated tests. This forced a full ~23-minute job rerun on PR #5625 even though its import regression was desktop-only and every other required check passed.

Failed run: https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/33244659895/job/99079967969

Failures

  1. mobile transcript swipes navigate Conversation and Roleplay alternatives (e2e/core-flows.e2e.ts:5017)
    • The seeded [data-message-id] row never appeared.
    • The initial assertion timed out before swipe behavior was exercised.
  2. mobile Game keeps CYOA usable above four HUD widgets (e2e/core-flows.e2e.ts:19101)
    • GameSurface.MobileChoiceStage never appeared.
    • The initial visibility assertion timed out before the layout behavior was exercised.

Both failures have the same shape: fixture/page initialization did not reach the expected seeded state, while 99 other WebKit tests passed. Neither failure touched the code changed by #5625.

Requested work

  • Reproduce each test repeatedly under mobile-webkit from current staging.
  • Identify and fix the fixture/startup race so the test waits for deterministic application readiness and seeded state, rather than merely increasing timeouts.
  • Verify each affected test across repeated WebKit runs and then run the complete mobile-webkit job.
  • Preserve the assertions and required browser gate; do not silence, skip, or broadly retry the failures.
  • Coordinate with #5618, which tracks two different browser flakes, and #5622, which tracks the cost and granularity of rerunning the full suite.

Acceptance criteria

  • Both tests pass reliably in repeated mobile-webkit runs.
  • The complete mobile WebKit lane passes without fixture-startup timeouts.
  • Any shared readiness helper remains minimal and is used only where the same proven race exists.
Originally created by @SpicyMarinara on GitHub (Aug 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5626 Originally assigned to: @Romuromylus on GitHub. ## Problem The required `mobile-webkit` Release Regression Matrix job is intermittently failing because seeded UI state never appears in two unrelated tests. This forced a full ~23-minute job rerun on PR #5625 even though its import regression was desktop-only and every other required check passed. Failed run: https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/33244659895/job/99079967969 ### Failures 1. `mobile transcript swipes navigate Conversation and Roleplay alternatives` (`e2e/core-flows.e2e.ts:5017`) - The seeded `[data-message-id]` row never appeared. - The initial assertion timed out before swipe behavior was exercised. 2. `mobile Game keeps CYOA usable above four HUD widgets` (`e2e/core-flows.e2e.ts:19101`) - `GameSurface.MobileChoiceStage` never appeared. - The initial visibility assertion timed out before the layout behavior was exercised. Both failures have the same shape: fixture/page initialization did not reach the expected seeded state, while 99 other WebKit tests passed. Neither failure touched the code changed by #5625. ## Requested work - Reproduce each test repeatedly under `mobile-webkit` from current `staging`. - Identify and fix the fixture/startup race so the test waits for deterministic application readiness and seeded state, rather than merely increasing timeouts. - Verify each affected test across repeated WebKit runs and then run the complete `mobile-webkit` job. - Preserve the assertions and required browser gate; do not silence, skip, or broadly retry the failures. - Coordinate with #5618, which tracks two different browser flakes, and #5622, which tracks the cost and granularity of rerunning the full suite. ## Acceptance criteria - Both tests pass reliably in repeated `mobile-webkit` runs. - The complete mobile WebKit lane passes without fixture-startup timeouts. - Any shared readiness helper remains minimal and is used only where the same proven race exists.
bsakaguchi 2026-10-21 05:59:44 +07:00
Author
Owner

@Romuromylus commented on GitHub (Aug 30, 2026):

Both cases are green on staging, fixed by other work while I was investigating this, so I am closing it.

mobile transcript swipes navigate Conversation and Roleplay alternatives was fixed under #5633. My reading of the failure artifacts matched that diagnosis: the test navigated twice per fixture, the reload landed about a second into the first page's on-demand module graph and cancelled the tens of module requests still streaming, and WebKit then intermittently failed the next document's own bootstrap scripts. The trace showed /src/main.tsx, /@vite/client, /@react-refresh and /manifest.json all starting and never completing, with the app crashed into AppRecoveryBoundary and a blank page behind it. The fix that landed uses a fresh page per fixture, which is better than the one I had drafted because it does not rely on init-script evaluation order, which Playwright documents as undefined.

mobile Game keeps CYOA usable above four HUD widgets was never a seeding failure. The accessibility snapshot at failure showed the Game surface rendered in full, with only GameSurface.MobileChoiceStage missing and the widgets in a tray instead of rails, which is the non-compact layout on a phone viewport. The cause was that the compact-HUD effect measures its surface and attaches its ResizeObserver at effect time, while GameSurface also has an early return for its messages-loading branch that mounts no surface at all. When the widget state hydrated during that window the measurement found nothing, no observer was attached, and neither effect dependency changed when the surface mounted, so nothing re-measured. The compactByWidth reset that landed under #5618 leaves the stranded value correct on a phone, which is what makes this case pass now.

That reset fixed the value rather than the mechanism, so the underlying defect survived at widths where the compact decision comes from the overlap estimate instead of the width shortcut. I filed that as #5654 and fixed it in #5628, merged as 7f43d455e.

Verified on the last completed staging matrix run (5c6ac775e): both cases pass in the mobile-webkit lane, at 13.7s and 7.3s respectively.

<!-- gh-comment-id:5465772428 --> @Romuromylus commented on GitHub (Aug 30, 2026): Both cases are green on `staging`, fixed by other work while I was investigating this, so I am closing it. `mobile transcript swipes navigate Conversation and Roleplay alternatives` was fixed under #5633. My reading of the failure artifacts matched that diagnosis: the test navigated twice per fixture, the reload landed about a second into the first page's on-demand module graph and cancelled the tens of module requests still streaming, and WebKit then intermittently failed the next document's own bootstrap scripts. The trace showed `/src/main.tsx`, `/@vite/client`, `/@react-refresh` and `/manifest.json` all starting and never completing, with the app crashed into `AppRecoveryBoundary` and a blank page behind it. The fix that landed uses a fresh page per fixture, which is better than the one I had drafted because it does not rely on init-script evaluation order, which Playwright documents as undefined. `mobile Game keeps CYOA usable above four HUD widgets` was never a seeding failure. The accessibility snapshot at failure showed the Game surface rendered in full, with only `GameSurface.MobileChoiceStage` missing and the widgets in a tray instead of rails, which is the non-compact layout on a phone viewport. The cause was that the compact-HUD effect measures its surface and attaches its `ResizeObserver` at effect time, while `GameSurface` also has an early return for its messages-loading branch that mounts no surface at all. When the widget state hydrated during that window the measurement found nothing, no observer was attached, and neither effect dependency changed when the surface mounted, so nothing re-measured. The `compactByWidth` reset that landed under #5618 leaves the stranded value correct on a phone, which is what makes this case pass now. That reset fixed the value rather than the mechanism, so the underlying defect survived at widths where the compact decision comes from the overlap estimate instead of the width shortcut. I filed that as #5654 and fixed it in #5628, merged as 7f43d455e. Verified on the last completed `staging` matrix run (5c6ac775e): both cases pass in the `mobile-webkit` lane, at 13.7s and 7.3s respectively.
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
Pasta-Devs/Marinara-Engine#3115
No description provided.