[PR #5629] [MERGED] fix(e2e): stabilize the two remaining smoke flakes #6860

Closed
opened 2026-10-23 04:14:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5629
Author: @kolacheee
Created: 8/29/2026
Status: ✅ Merged
Merged: 8/29/2026
Merged by: @kolacheee

Base: staging ← Head: fix/5618-smoke-flakes


📝 Commits (1)

  • 36a1b9e fix(e2e): stabilize the two remaining smoke flakes

📊 Changes

2 files changed (+43 additions, -13 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+34 -11)
📝 packages/client/src/components/game/GameSurface.tsx (+9 -2)

📄 Description

Closes #5618. Root causes taken from the failed CI run's own artifacts (error context, trace, page snapshot) rather than guessed — and neither is a "slow runner needs longer timeouts" story, so no timeouts were touched.

core-flows.e2e.ts:398 — Art scale sliders (mobile-chromium)

The CI error shows the slider value stuck at 1.9 while the poll waited for < 1.625 — the low click never registered. The test read each slider's bounding box once, then fired three raw page.mouse.clicks at absolute coordinates. page.mouse bypasses every actionability/stability wait, and changing a scale slider resizes live content around it, so on a slow runner the second click lands on a stale position and silently misses. Fix: element-relative locator.click({ position }) with a fresh bounding box per click — Playwright now waits for the element to be stable and positions against its box at dispatch time.

core-flows.e2e.ts:8608 — Game widget Chroma (mobile-webkit)

Not a timing flake — a strict-mode violation: getByTitle('Edit Chroma clock') resolved to two buttons. The CI page snapshot shows only one visible button, which pins the second as a CSS-hidden duplicate: GameSurface resets compactHudWidgets to a flat false whenever the widget list is empty (i.e. during initial load, before the queries resolve), and false mounts the desktop widget rail — hidden md:flex, so invisible on mobile but in the DOM — until the layout effect re-measures and flips compact back on. On a slow WebKit runner the test's tap lands inside that window, and both the mobile expanded row and the hidden desktop WidgetCard carry the same title. This also explains the observed retry storms: the window is load-timing dependent, so a slow run can hit it on every attempt.

Two fixes, root cause first:

  • App: the empty-list reset now uses the same window.innerWidth < 768 heuristic the state initializes with, so the desktop rail never mounts on a mobile viewport, even transiently. (Desktop behavior unchanged — the heuristic evaluates to the old false there.)
  • Test: the locator additionally filters to visible elements, as defense in depth for the hidden md:* responsive pattern generally — a hidden duplicate still trips strict mode even though only one copy can ever be interacted with.

Correction for the record

The issue claimed both tests reproduce on a plain local staging checkout — that turned out to be contaminated evidence (a Playwright browser-binary version mismatch makes every test "fail" instantly). With browsers properly installed, both tests pass locally pre-fix; the flake is CI-timing-dependent, exactly as the run history suggested. Noted on the issue.

Validation done

  • Both tests pass 6/6 repeat runs on their affected project locally after the fix (--retries=0 --repeat-each=6)
  • Client typecheck clean; prettier clean
  • The two regression lanes that pin these source files (tracker-gallery-ui, open-issues) pass

Manually verify

  • On a phone-sized window, open a Game chat with HUD widgets and confirm widgets render/expand normally during initial load
  • On desktop, confirm the widget rail still appears and the compact fallback still engages when the window narrows
  • Watch a few CI runs after merge for either test name reappearing in a failed lane

Summary by CodeRabbit

  • Bug Fixes
    • Improved slider interactions for more reliable end-to-end behavior.
    • Ensured clock editing targets the visible control.
    • Fixed widget layout resets to correctly preserve compact mode on smaller screens, including during combat or when widgets are unavailable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5629 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/29/2026 **Status:** ✅ Merged **Merged:** 8/29/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/5618-smoke-flakes` --- ### 📝 Commits (1) - [`36a1b9e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/36a1b9ebfc5ebe5f5d605be54ad68ef2225a2a9a) fix(e2e): stabilize the two remaining smoke flakes ### 📊 Changes **2 files changed** (+43 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+34 -11) 📝 `packages/client/src/components/game/GameSurface.tsx` (+9 -2) </details> ### 📄 Description Closes #5618. Root causes taken from the failed CI run's own artifacts (error context, trace, page snapshot) rather than guessed — and neither is a "slow runner needs longer timeouts" story, so no timeouts were touched. ## `core-flows.e2e.ts:398` — Art scale sliders (mobile-chromium) The CI error shows the slider value stuck at 1.9 while the poll waited for < 1.625 — the *low* click never registered. The test read each slider's bounding box **once**, then fired three raw `page.mouse.click`s at absolute coordinates. `page.mouse` bypasses every actionability/stability wait, and changing a scale slider resizes live content around it, so on a slow runner the second click lands on a stale position and silently misses. Fix: element-relative `locator.click({ position })` with a **fresh bounding box per click** — Playwright now waits for the element to be stable and positions against its box at dispatch time. ## `core-flows.e2e.ts:8608` — Game widget Chroma (mobile-webkit) Not a timing flake — a **strict-mode violation**: `getByTitle('Edit Chroma clock')` resolved to two buttons. The CI page snapshot shows only *one visible* button, which pins the second as a CSS-hidden duplicate: `GameSurface` resets `compactHudWidgets` to a flat `false` whenever the widget list is empty (i.e. during initial load, before the queries resolve), and `false` mounts the desktop widget rail — `hidden md:flex`, so invisible on mobile but **in the DOM** — until the layout effect re-measures and flips compact back on. On a slow WebKit runner the test's tap lands inside that window, and both the mobile expanded row and the hidden desktop `WidgetCard` carry the same title. This also explains the observed retry storms: the window is load-timing dependent, so a slow run can hit it on every attempt. Two fixes, root cause first: - **App**: the empty-list reset now uses the same `window.innerWidth < 768` heuristic the state initializes with, so the desktop rail never mounts on a mobile viewport, even transiently. (Desktop behavior unchanged — the heuristic evaluates to the old `false` there.) - **Test**: the locator additionally filters to visible elements, as defense in depth for the `hidden md:*` responsive pattern generally — a hidden duplicate still trips strict mode even though only one copy can ever be interacted with. ## Correction for the record The issue claimed both tests reproduce on a plain local staging checkout — that turned out to be contaminated evidence (a Playwright browser-binary version mismatch makes every test "fail" instantly). With browsers properly installed, both tests pass locally pre-fix; the flake is CI-timing-dependent, exactly as the run history suggested. Noted on the issue. ## Validation done - Both tests pass **6/6 repeat runs** on their affected project locally after the fix (`--retries=0 --repeat-each=6`) - Client typecheck clean; prettier clean - The two regression lanes that pin these source files (`tracker-gallery-ui`, `open-issues`) pass ## Manually verify - [ ] On a phone-sized window, open a Game chat with HUD widgets and confirm widgets render/expand normally during initial load - [ ] On desktop, confirm the widget rail still appears and the compact fallback still engages when the window narrows - [ ] Watch a few CI runs after merge for either test name reappearing in a failed lane <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved slider interactions for more reliable end-to-end behavior. - Ensured clock editing targets the visible control. - Fixed widget layout resets to correctly preserve compact mode on smaller screens, including during combat or when widgets are unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:14:22 +07: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
Pasta-Devs/Marinara-Engine#6860
No description provided.