[PR #8888] [MERGED] fix: a speaker picked after Add voice stays picked; two test races #8862

Closed
opened 2026-11-07 17:40:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8888
Author: @SpicyMarinara
Created: 11/5/2026
Status: ✅ Merged
Merged: 11/5/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/v252-matrix-flakes


📝 Commits (2)

  • 8882940 fix: a speaker picked after Add voice stays picked; two test races on slow runners
  • 3ffa80f Merge branch 'staging' into fix/v252-matrix-flakes

📊 Changes

4 files changed (+28 additions, -4 deletions)

View changed files

📝 e2e/language-picker.e2e.ts (+3 -0)
📝 e2e/persona-tts.e2e.ts (+12 -1)
📝 e2e/sprite-library.e2e.ts (+2 -0)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+11 -3)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Refs #8887. This is the first set of fixes; the last PR for the matrix closes the issue.

Why this change

The full browser matrix on the v2.5.2 promotion (#8878) failed these three tests, though each passed in earlier full runs. Each failure was traced to a timing race. One of them is in the app, and users can hit it.

What changed

  • Text to Speech, app fix: a speaker picked right after Add voice could be taken back.
    • Add voice saves its new row after a 600 ms debounce. On a slow machine that save landed before the speaker was picked, and its refetch then overwrote the draft, so the voice went to whichever character sorted first.
    • The CI trace shows it: the first PUT carries another spec's "Peek Current Fixture" row with voice alloy, and the next PUT puts the voice on that row.
    • TTSConfigCard now applies a server config to the draft only when no edit is waiting on the debounce and no save is unanswered, the pattern CharacterVoicePicker already uses. After the last save lands, its own refetch still syncs the draft.
  • persona-tts :48: the test holds the refetch after Add voice's save until the persona is picked. The race then happens on every run, and the test fails without the app fix. All assertions are unchanged.
  • sprite-library :34: the catalog request retries once before failing. The error alert that appears then pushed Select all sprites down about 60 px between mousedown and mouseup, so the click was lost. The test now waits for the library's existing aria-busy to read false before clicking.
  • language-picker :25 and the onboarding picker test: the search takes focus on the next frame. A Shift+Tab sent before that started from the trigger and never reached the picker, so it stayed open. Both Shift+Tab steps now wait for the search to be focused, as the first open in the test already did.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify in Settings → Text to Speech (per-character voices) that pressing Add voice, then quickly picking a persona and typing a voice, keeps that persona's row after the save.

Agent-run checks:

  • persona-tts :48 with the held refetch, without the app fix: failed 3 of 3 runs at this head, and at 9698d32211, so the race predates this release. With the fix it passed on mobile-chromium, desktop-chromium and mobile-webkit.
  • sprite-library :34: a probe that holds the retry's 503 until mousedown reproduces the CI failure (0 of 2 checked) and passes with the wait. The CI trace's retry lands at 814639 ms, inside the click at 814237–814683 ms.
  • language-picker: the CI trace shows Shift+Tab 8 ms after the click, with frames at about 150 ms. With the focus wait, it passed under a Linux-WebKit emulation (buttons tabbable, frames delayed 150 ms) that fails 3 of 3 without it.
  • On this branch: mobile-chromium and mobile-webkit, persona-tts :48 and sprite-library :34 with --repeat-each=2: 8/8 passed. desktop-chromium, the whole language-picker spec and persona-tts :48 with --repeat-each=2: 10/10 passed.
  • Client tsc --noEmit, check:e2e-types and Prettier on the four files: pass.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🤖 Generated with Claude Code


🔄 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/8888 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/5/2026 **Status:** ✅ Merged **Merged:** 11/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/v252-matrix-flakes` --- ### 📝 Commits (2) - [`8882940`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8882940fbe86c6f74b61b27e771c941b59f04308) fix: a speaker picked after Add voice stays picked; two test races on slow runners - [`3ffa80f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3ffa80fa1abf5b8f6ab729b360b0e60f288d22ec) Merge branch 'staging' into fix/v252-matrix-flakes ### 📊 Changes **4 files changed** (+28 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `e2e/language-picker.e2e.ts` (+3 -0) 📝 `e2e/persona-tts.e2e.ts` (+12 -1) 📝 `e2e/sprite-library.e2e.ts` (+2 -0) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+11 -3) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Refs #8887. This is the first set of fixes; the last PR for the matrix closes the issue. ## Why this change The full browser matrix on the v2.5.2 promotion (#8878) failed these three tests, though each passed in earlier full runs. Each failure was traced to a timing race. One of them is in the app, and users can hit it. ## What changed - **Text to Speech, app fix:** a speaker picked right after **Add voice** could be taken back. - **Add voice** saves its new row after a 600 ms debounce. On a slow machine that save landed before the speaker was picked, and its refetch then overwrote the draft, so the voice went to whichever character sorted first. - The CI trace shows it: the first PUT carries another spec's "Peek Current Fixture" row with voice `alloy`, and the next PUT puts the voice on that row. - `TTSConfigCard` now applies a server config to the draft only when no edit is waiting on the debounce and no save is unanswered, the pattern `CharacterVoicePicker` already uses. After the last save lands, its own refetch still syncs the draft. - **persona-tts :48:** the test holds the refetch after **Add voice**'s save until the persona is picked. The race then happens on every run, and the test fails without the app fix. All assertions are unchanged. - **sprite-library :34:** the catalog request retries once before failing. The error alert that appears then pushed **Select all sprites** down about 60 px between mousedown and mouseup, so the click was lost. The test now waits for the library's existing `aria-busy` to read `false` before clicking. - **language-picker :25 and the onboarding picker test:** the search takes focus on the next frame. A Shift+Tab sent before that started from the trigger and never reached the picker, so it stayed open. Both Shift+Tab steps now wait for the search to be focused, as the first open in the test already did. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify in Settings → Text to Speech (per-character voices) that pressing **Add voice**, then quickly picking a persona and typing a voice, keeps that persona's row after the save. Agent-run checks: - persona-tts :48 with the held refetch, without the app fix: failed 3 of 3 runs at this head, and at `9698d32211`, so the race predates this release. With the fix it passed on mobile-chromium, desktop-chromium and mobile-webkit. - sprite-library :34: a probe that holds the retry's 503 until mousedown reproduces the CI failure (0 of 2 checked) and passes with the wait. The CI trace's retry lands at 814639 ms, inside the click at 814237–814683 ms. - language-picker: the CI trace shows Shift+Tab 8 ms after the click, with frames at about 150 ms. With the focus wait, it passed under a Linux-WebKit emulation (buttons tabbable, frames delayed 150 ms) that fails 3 of 3 without it. - On this branch: mobile-chromium and mobile-webkit, persona-tts :48 and sprite-library :34 with `--repeat-each=2`: 8/8 passed. desktop-chromium, the whole language-picker spec and persona-tts :48 with `--repeat-each=2`: 10/10 passed. - Client `tsc --noEmit`, `check:e2e-types` and Prettier on the four files: pass. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:40:18 +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#8862
No description provided.