[PR #5635] [MERGED] fix(e2e): stabilize the four wave-2 smoke flakes #6859

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/5635
Author: @kolacheee
Created: 8/29/2026
Status: ✅ Merged
Merged: 8/29/2026
Merged by: @kolacheee

Base: staging ← Head: fix/5633-smoke-flake-wave2


📝 Commits (2)

  • a74627b fix(e2e): stabilize the four wave-2 smoke flakes
  • 58990d6 test(e2e): isolate each transcript-swipe fixture's init script

📊 Changes

2 files changed (+53 additions, -23 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+48 -22)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+5 -1)

📄 Description

Closes #5633. Four surgical stabilizations, each derived from its CI failure's own evidence — no blanket retries, no timeout bumps.

The fixes

  1. Conversation message actions (mobile-chromium, toHaveCSS opacity): the CI call log shows the reveal opacity climbing 0.16 → 0.83 → 0.97 and then snapping back to 0 — the hover/tap state gets stolen mid-transition by a late reflow moving the row from under the emulated pointer. The gesture and the opacity assert now retry as one unit (expect(...).toPass()), re-applying the gesture after a steal. That matches the mechanism: the app behavior is fine; the test just has to re-assert its gesture after a reflow.
  2. ElevenLabs voice picker (desktop-chromium, toBeFocused after Escape): CI shows the listbox closed (aria-expanded="false") but the trigger unfocused for the entire 10-second poll — the picker's synchronous triggerRef.current?.focus() inside the close handler races the portal unmount and any concurrent re-render of the trigger row, dropping focus to <body>. App fix, not a test fix, because Escape-returns-focus is the accessibility contract this test exists to protect: focus restoration now happens one frame after close, landing on whichever node the ref points at once React settles.
  3. Mobile transcript swipes (mobile-webkit, page.reload: WebKit encountered an internal error): the per-fixture goto → localStorage.setItem → reload dance is replaced by a single navigation using accumulated addInitScripts (they run in registration order, so the latest fixture's chat id wins before the app boots). Behavior-identical, half the navigations, and the reload that WebKit's engine intermittently crashed on is gone entirely — no retry annotation needed.
  4. Echo Chamber size persistence (desktop-chromium, ≤ 1px tolerance, received 1.63px): the saved size round-trips through CSS pixel rounding on both edges across a reload, which legitimately reaches ~1.6px. Tolerance widened to 2px with the rationale in-place — real persistence drift would be far larger than either bound.

An honest false lead, for the record

The issue claimed the message-actions test fails deterministically on a local Windows checkout. It does not: that was a zombie dev-server artifact — leftover half-dead server processes from earlier runs were serving the page and injecting a spurious mid-boot reload, which I chased through HMR traces, CDP navigation initiators, and a probe spec before killing the stragglers and finding the test passes 3/3 clean. (Second environment-contaminated "local repro" in this flake saga; the triage note is going in the team's collective memory: on Windows, clear the Playwright ports and re-baseline before believing a local e2e failure.) The probe hunt did document one previously unexplained behavior — a benign same-URL history.replaceState ~800ms after boot — which is harmless and left alone.

Validation done

  • All four tests pass 3/3 repeat runs on their affected projects locally after the fixes
  • Client typecheck clean (the picker change), prettier clean
  • No regression lane pins any changed line (checked)

Manually verify

  • In Settings → TTS with an ElevenLabs connection, open a voice picker and press Escape — focus should visibly return to the trigger button
  • Hover/tap message actions in a Conversation chat behave as before
  • Watch the matrix over the next several merges for any of the four names reappearing

Summary by CodeRabbit

  • Bug Fixes
    • Improved keyboard focus restoration when closing the text-to-speech voice selection panel.
    • Improved reliability of message-action interactions in end-to-end flows.
    • Restored layouts now tolerate minor pixel-rounding differences.

🔄 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/5635 **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/5633-smoke-flake-wave2` --- ### 📝 Commits (2) - [`a74627b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a74627b64bd93a4b9a7cf087f0b66703c7551fb8) fix(e2e): stabilize the four wave-2 smoke flakes - [`58990d6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/58990d685d5e0b531afeeb469343ce9161102683) test(e2e): isolate each transcript-swipe fixture's init script ### 📊 Changes **2 files changed** (+53 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+48 -22) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+5 -1) </details> ### 📄 Description Closes #5633. Four surgical stabilizations, each derived from its CI failure's own evidence — no blanket retries, no timeout bumps. ## The fixes 1. **Conversation message actions** (mobile-chromium, `toHaveCSS` opacity): the CI call log shows the reveal opacity climbing 0.16 → 0.83 → 0.97 and then snapping back to 0 — the hover/tap state gets *stolen mid-transition* by a late reflow moving the row from under the emulated pointer. The gesture and the opacity assert now retry as one unit (`expect(...).toPass()`), re-applying the gesture after a steal. That matches the mechanism: the app behavior is fine; the test just has to re-assert its gesture after a reflow. 2. **ElevenLabs voice picker** (desktop-chromium, `toBeFocused` after Escape): CI shows the listbox closed (`aria-expanded="false"`) but the trigger unfocused for the entire 10-second poll — the picker's synchronous `triggerRef.current?.focus()` inside the close handler races the portal unmount and any concurrent re-render of the trigger row, dropping focus to `<body>`. **App fix**, not a test fix, because Escape-returns-focus is the accessibility contract this test exists to protect: focus restoration now happens one frame after close, landing on whichever node the ref points at once React settles. 3. **Mobile transcript swipes** (mobile-webkit, `page.reload: WebKit encountered an internal error`): the per-fixture `goto → localStorage.setItem → reload` dance is replaced by a single navigation using accumulated `addInitScript`s (they run in registration order, so the latest fixture's chat id wins before the app boots). Behavior-identical, half the navigations, and the `reload` that WebKit's engine intermittently crashed on is gone entirely — no retry annotation needed. 4. **Echo Chamber size persistence** (desktop-chromium, `≤ 1px` tolerance, received 1.63px): the saved size round-trips through CSS pixel rounding on both edges across a reload, which legitimately reaches ~1.6px. Tolerance widened to 2px with the rationale in-place — real persistence drift would be far larger than either bound. ## An honest false lead, for the record The issue claimed the message-actions test fails deterministically on a local Windows checkout. It does not: that was a **zombie dev-server artifact** — leftover half-dead server processes from earlier runs were serving the page and injecting a spurious mid-boot reload, which I chased through HMR traces, CDP navigation initiators, and a probe spec before killing the stragglers and finding the test passes 3/3 clean. (Second environment-contaminated "local repro" in this flake saga; the triage note is going in the team's collective memory: on Windows, clear the Playwright ports and re-baseline before believing a local e2e failure.) The probe hunt did document one previously unexplained behavior — a benign same-URL `history.replaceState` ~800ms after boot — which is harmless and left alone. ## Validation done - All four tests pass **3/3 repeat runs** on their affected projects locally after the fixes - Client typecheck clean (the picker change), prettier clean - No regression lane pins any changed line (checked) ## Manually verify - [ ] In Settings → TTS with an ElevenLabs connection, open a voice picker and press Escape — focus should visibly return to the trigger button - [ ] Hover/tap message actions in a Conversation chat behave as before - [ ] Watch the matrix over the next several merges for any of the four names reappearing <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved keyboard focus restoration when closing the text-to-speech voice selection panel. * Improved reliability of message-action interactions in end-to-end flows. * Restored layouts now tolerate minor pixel-rounding differences. <!-- 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#6859
No description provided.