[PR #7293] [MERGED] test(e2e): update the whisper test for #7196 and steady two flaky WebKit tests #7669

Closed
opened 2026-10-24 04:06:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7293
Author: @SpicyMarinara
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @SpicyMarinara

Base: staging ← Head: test/nightly-stale-and-flaky


📝 Commits (3)

  • 5b5cca4 test(e2e): update the whisper test for #7196 and steady two flaky WebKit tests
  • 8502a18 Merge remote-tracking branch 'origin/staging' into test/nightly-stale-and-flaky
  • ae38078 test(e2e): drop the no-op send-button wait from the illustration test

📊 Changes

4 files changed (+17 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/core-flows.e2e.ts (+3 -0)
📝 e2e/prompt-controls.e2e.ts (+2 -0)
📝 e2e/roleplay-commands.e2e.ts (+11 -1)

📄 Description

Note

Draft until Mari approves: prepared overnight from the nightly e2e triage. Nothing here should be marked ready or merged without her approval.

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

No issue exists yet for these nightly failures. One should be opened before this leaves draft (or this PR can stand as the record if Mari prefers). Related: #7196 (cecaac78b), which changed the whisper behaviour this test still encoded.

Why this change

The nightly Regression Checks run 37563586884 on staging 241ee8f2d (Oct 7) failed. This PR handles the e2e side of the triage. The onnxruntime install timeout that kept mobile-webkit 4/10 from running is a separate change.

  • Stale whisper test (fails every time). e2e/roleplay-commands.e2e.ts:460, both the classic and visual-novel cases, failed in desktop-chromium 9/10, mobile-chromium 7/8 and mobile-webkit 9/10 with expect(locator).toBeDisabled() failed … Received: enabled at line 623. #7196 deliberately made an empty whisper saveable: saving it removes the whisper, as described in the changelog and in docs/roleplay/getting-started.md. The test still encoded the behaviour from before #7196. This PR updates that assertion. The product behaviour stays the same.
  • Flaky Game character sheet Retry test (WebKit, about 1 run in 3). e2e/core-flows.e2e.ts:11411 "Game character sheet Retry remains a draft until Save" failed in runs 37490466160, 37481987272 (attempt 1) and 37592611362 (attempt 1). After Save sheet, the "… sheet updated." success toast covers the mobile top bar. The pointer from the previous click stays over the toast, which pauses its auto-dismiss, so the click on the Character Profiles bubble kept retrying until the 60 s test timeout. The run 37490466160 log shows <li … data-type="success" data-sonner-toast …> intercepts pointer events.
  • Flaky typed illustration test (WebKit, once). e2e/prompt-controls.e2e.ts:7 failed in run 37469221766 at line 109 (Review Image Prompt dialog never appeared). The third /illustrate went out as an empty-composer POST /api/generate with no userMessage, so the review dialog never opened.

What changed

Test-only. No product code changed.

  • e2e/roleplay-commands.e2e.ts
    • After whisperText.fill(" "), the test now expects the placeholder "Leave this empty and save to remove the whisper." (the copy checked against roleplay.commands.whisper.emptyRemoves in en.json) and an enabled Save. Before, it expected Save to be disabled, which was the behaviour before #7196.
    • New case on the message that has only a whisper: check that Bob's prompt preview contains the whisper, edit the whisper to empty and save. Then check that the editor closes, the whisper element and its text are gone from the page, and Bob's prompt preview (/api/generate/dryRun) no longer contains it.
  • e2e/core-flows.e2e.ts: after the stored-card rpgStats expectation and before the Character Profiles bubble click, the test now moves the pointer to (0, 0) and waits for [data-sonner-toast] to reach count 0. This uses the same pattern the test already has a few lines above.
  • e2e/prompt-controls.e2e.ts: after fill, the test checks that the composer still holds /illustrate range=1 cup of tea before clicking send.
  • CHANGELOG.md: one [Unreleased] line for the contributor-check fix, following earlier entries for browser-regression stability.

Note on the illustration change: it is a diagnostic guard, not a fix. The root cause of the cleared composer is still unknown. If the composer is cleared before the check, the test now fails at the composer assertion with a clear message, not 10 s later at the dialog. A clear between the check and the click would still fail at the dialog, so this test can still flake.

Review follow-up (ae380786c): the first version also waited for the send button to be enabled before the third /illustrate. That wait never waited for anything. In a Roleplay chat the send button stays enabled while an agent run is in flight (ChatInput.tsx passes agentsProcessing: false in roleplay, and an empty composer can still continue). Also, the review dialog closes only after retryAgents has resolved and cleared its abort controller (ChatArea.tsx handleContinueIllustratorPromptReview, use-generate.ts finally). So the previous illustration had already finished at expect(dialog).not.toBeVisible(). The wait was removed, and the comment and CHANGELOG.md line no longer claim this test is fixed.

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

Agent-run results (macOS, Playwright 1.63.0, isolated ports 5370/8050/5371/8051). These are not a substitute for the boxes above:

  • pnpm check:e2e-types: passed. Prettier check on the four changed files: passed. Full pnpm check was not run.
  • Baseline, unmodified staging whisper test, --project=desktop-chromium --repeat-each=3 --workers=1: 6/6 failed at roleplay-commands.e2e.ts:623 toBeDisabled(). This reproduces the nightly failure.
  • With this PR, the three changed specs on desktop-chromium, mobile-chromium and mobile-webkit, --repeat-each=3 --workers=1: 31/36 passed.
    • Game character sheet Retry: 9/9. Typed illustration prompts: 9/9.
    • Whisper (classic + visual-novel): mobile-webkit 6/6, desktop-chromium 2/6, mobile-chromium 5/6.
    • All 5 whisper failures were Chromium locator.click timeouts stuck at "performing click action". Each was the first click after a page load or reload (lines 541, 582 and 646), with no assertion failing. Two of them (line 646) came after the updated empty-whisper assertions had already passed. The machine was under heavy load from parallel lanes (load average about 10 on 10 cores). Nightly CI never showed this hang.
  • Rerun of the updated whisper test, --project=desktop-chromium --project=mobile-chromium --repeat-each=3 --workers=1: 12/12 passed, including the new removal case.
  • After the review follow-up (ae380786c, merged with staging 8e4866187 first), the illustration test on desktop-chromium, mobile-chromium and mobile-webkit, --repeat-each=3 --workers=1: 9/9 passed. Prettier and pnpm check:e2e-types passed.
  • GitHub CI and CodeRabbit have not run on this branch yet. Local CodeRabbit was not run.
  • The browser matrix does not run on this PR. In Regression Checks, the e2e shards run only on workflow_dispatch or for PRs into main, so they show as skipped here. To test this branch in CI before merging, dispatch it: gh workflow run playwright.yml --ref test/nightly-stale-and-flaky -f expected_sha=<branch head>. Otherwise, the next nightly after merge is the first CI run of these tests.

Manual verification notes

  • Manually verify in a Roleplay group chat with the Whisper command on: reveal a whisper addressed to another character, choose Edit whisper, clear the text, and confirm the placeholder reads "Leave this empty and save to remove the whisper." and Save is enabled.
  • Manually verify that saving the cleared whisper closes the editor, removes the whisper from the message (classic and visual-novel), keeps it removed after a reload, and drops it from that character's prompt preview.
  • Manually verify on a phone-sized viewport in Game mode: after Save sheet in the character sheet, the "… sheet updated." toast closes by itself once the pointer or finger is away from it, and the Character Profiles bubble can then be tapped.
  • Manually confirm that the next nightly Regression Checks run passes the whisper test on all three projects, and watch the WebKit shards for the two flaky tests.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) 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)

CHANGELOG.md gets one [Unreleased] line. No user-facing docs under docs/ changed, so docs-i18n is unaffected.

UI evidence (if applicable)

Not applicable: test-only change.

Summary by CodeRabbit

  • Tests
    • Expanded end-to-end checks for saving empty whispers, retaining illustration prompts before sending, and retrying character-sheet updates after notices close.
    • Updated the changelog to record these regression-test changes.

🔄 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/7293 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `test/nightly-stale-and-flaky` --- ### 📝 Commits (3) - [`5b5cca4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b5cca45a9ae21c0b02995182d1ea396a147d374) test(e2e): update the whisper test for #7196 and steady two flaky WebKit tests - [`8502a18`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8502a18eecdec48dde058a7da7f89b00d3b56cd6) Merge remote-tracking branch 'origin/staging' into test/nightly-stale-and-flaky - [`ae38078`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ae380786c70b499b8b8386ff07163f774a389cbf) test(e2e): drop the no-op send-button wait from the illustration test ### 📊 Changes **4 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/core-flows.e2e.ts` (+3 -0) 📝 `e2e/prompt-controls.e2e.ts` (+2 -0) 📝 `e2e/roleplay-commands.e2e.ts` (+11 -1) </details> ### 📄 Description > [!NOTE] > **Draft until Mari approves: prepared overnight from the nightly e2e triage.** Nothing here should be marked ready or merged without her approval. > [!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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue No issue exists yet for these nightly failures. One should be opened before this leaves draft (or this PR can stand as the record if Mari prefers). Related: #7196 (cecaac78b), which changed the whisper behaviour this test still encoded. ## Why this change The nightly **Regression Checks** run [37563586884](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37563586884) on `staging` 241ee8f2d (Oct 7) failed. This PR handles the e2e side of the triage. The onnxruntime install timeout that kept `mobile-webkit 4/10` from running is a separate change. - **Stale whisper test (fails every time).** `e2e/roleplay-commands.e2e.ts:460`, both the classic and visual-novel cases, failed in `desktop-chromium 9/10`, `mobile-chromium 7/8` and `mobile-webkit 9/10` with `expect(locator).toBeDisabled() failed … Received: enabled` at line 623. #7196 deliberately made an empty whisper saveable: saving it removes the whisper, as described in the changelog and in `docs/roleplay/getting-started.md`. **The test still encoded the behaviour from before #7196.** This PR updates that assertion. The product behaviour stays the same. - **Flaky Game character sheet Retry test (WebKit, about 1 run in 3).** `e2e/core-flows.e2e.ts:11411` "Game character sheet Retry remains a draft until Save" failed in runs 37490466160, 37481987272 (attempt 1) and 37592611362 (attempt 1). After **Save sheet**, the "… sheet updated." success toast covers the mobile top bar. The pointer from the previous click stays over the toast, which pauses its auto-dismiss, so the click on the Character Profiles bubble kept retrying until the 60 s test timeout. The run 37490466160 log shows `<li … data-type="success" data-sonner-toast …> intercepts pointer events`. - **Flaky typed illustration test (WebKit, once).** `e2e/prompt-controls.e2e.ts:7` failed in run 37469221766 at line 109 (`Review Image Prompt` dialog never appeared). The third `/illustrate` went out as an **empty-composer** `POST /api/generate` with no `userMessage`, so the review dialog never opened. ## What changed Test-only. No product code changed. - `e2e/roleplay-commands.e2e.ts` - After `whisperText.fill(" ")`, the test now expects the placeholder "Leave this empty and save to remove the whisper." (the copy checked against `roleplay.commands.whisper.emptyRemoves` in `en.json`) and an **enabled** Save. Before, it expected Save to be disabled, which was the behaviour before #7196. - New case on the message that has only a whisper: check that Bob's prompt preview contains the whisper, edit the whisper to empty and save. Then check that the editor closes, the whisper element and its text are gone from the page, and Bob's prompt preview (`/api/generate/dryRun`) no longer contains it. - `e2e/core-flows.e2e.ts`: after the stored-card `rpgStats` expectation and before the Character Profiles bubble click, the test now moves the pointer to `(0, 0)` and waits for `[data-sonner-toast]` to reach count 0. This uses the same pattern the test already has a few lines above. - `e2e/prompt-controls.e2e.ts`: after `fill`, the test checks that the composer still holds `/illustrate range=1 cup of tea` before clicking send. - `CHANGELOG.md`: one `[Unreleased]` line for the contributor-check fix, following earlier entries for browser-regression stability. Note on the illustration change: it is a diagnostic guard, **not a fix**. The root cause of the cleared composer is still unknown. If the composer is cleared before the check, the test now fails at the composer assertion with a clear message, not 10 s later at the dialog. A clear between the check and the click would still fail at the dialog, so this test can still flake. Review follow-up (ae380786c): the first version also waited for the send button to be enabled before the third `/illustrate`. That wait never waited for anything. In a Roleplay chat the send button stays enabled while an agent run is in flight (`ChatInput.tsx` passes `agentsProcessing: false` in roleplay, and an empty composer can still continue). Also, the review dialog closes only after `retryAgents` has resolved and cleared its abort controller (`ChatArea.tsx` `handleContinueIllustratorPromptReview`, `use-generate.ts` `finally`). So the previous illustration had already finished at `expect(dialog).not.toBeVisible()`. The wait was removed, and the comment and `CHANGELOG.md` line no longer claim this test is fixed. ## 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` Agent-run results (macOS, Playwright 1.63.0, isolated ports 5370/8050/5371/8051). These are not a substitute for the boxes above: - `pnpm check:e2e-types`: passed. Prettier check on the four changed files: passed. Full `pnpm check` was **not** run. - Baseline, unmodified `staging` whisper test, `--project=desktop-chromium --repeat-each=3 --workers=1`: **6/6 failed** at `roleplay-commands.e2e.ts:623` `toBeDisabled()`. This reproduces the nightly failure. - With this PR, the three changed specs on `desktop-chromium`, `mobile-chromium` and `mobile-webkit`, `--repeat-each=3 --workers=1`: **31/36 passed**. - Game character sheet Retry: 9/9. Typed illustration prompts: 9/9. - Whisper (classic + visual-novel): mobile-webkit 6/6, desktop-chromium 2/6, mobile-chromium 5/6. - All 5 whisper failures were Chromium `locator.click` timeouts stuck at "performing click action". Each was the first click after a page load or reload (lines 541, 582 and 646), with no assertion failing. Two of them (line 646) came after the updated empty-whisper assertions had already passed. The machine was under heavy load from parallel lanes (load average about 10 on 10 cores). Nightly CI never showed this hang. - Rerun of the updated whisper test, `--project=desktop-chromium --project=mobile-chromium --repeat-each=3 --workers=1`: **12/12 passed**, including the new removal case. - After the review follow-up (ae380786c, merged with `staging` 8e4866187 first), the illustration test on `desktop-chromium`, `mobile-chromium` and `mobile-webkit`, `--repeat-each=3 --workers=1`: **9/9 passed**. Prettier and `pnpm check:e2e-types` passed. - GitHub CI and CodeRabbit have not run on this branch yet. Local CodeRabbit was not run. - **The browser matrix does not run on this PR.** In `Regression Checks`, the e2e shards run only on `workflow_dispatch` or for PRs into `main`, so they show as skipped here. To test this branch in CI before merging, dispatch it: `gh workflow run playwright.yml --ref test/nightly-stale-and-flaky -f expected_sha=<branch head>`. Otherwise, the next nightly after merge is the first CI run of these tests. ### Manual verification notes - Manually verify in a Roleplay group chat with the **Whisper** command on: reveal a whisper addressed to another character, choose **Edit whisper**, clear the text, and confirm the placeholder reads "Leave this empty and save to remove the whisper." and **Save** is enabled. - Manually verify that saving the cleared whisper closes the editor, removes the whisper from the message (classic and visual-novel), keeps it removed after a reload, and drops it from that character's prompt preview. - Manually verify on a phone-sized viewport in Game mode: after **Save sheet** in the character sheet, the "… sheet updated." toast closes by itself once the pointer or finger is away from it, and the Character Profiles bubble can then be tapped. - Manually confirm that the next nightly `Regression Checks` run passes the whisper test on all three projects, and watch the WebKit shards for the two flaky tests. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) 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) `CHANGELOG.md` gets one `[Unreleased]` line. No user-facing docs under `docs/` changed, so `docs-i18n` is unaffected. ## UI evidence (if applicable) Not applicable: test-only change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Expanded end-to-end checks for saving empty whispers, retaining illustration prompts before sending, and retrying character-sheet updates after notices close. * Updated the changelog to record these regression-test changes. <!-- 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-24 04:06:21 +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#7669
No description provided.