mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6730] [MERGED] test(e2e): wait for the page's own fetches before reloading (WebKit sprite flake) #7301
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7301
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6730
Author: @kolacheee
Created: 9/26/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @kolacheee
Base:
staging← Head:fix/expression-sprites-webkit-flake📝 Commits (1)
fc24778test(e2e): wait for the page's own fetches before reloading📊 Changes
4 files changed (+77 additions, -3 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/expression-active-sprites.e2e.ts(+6 -2)➕
e2e/page-fetch-fixture.ts(+66 -0)📝
e2e/roleplay-commands.e2e.ts(+3 -1)📄 Description
Linked issue
Closes #6677
Why this change
/api/chats,message-count,messages?limit=20,game-stateandgenerate/status. WebKit reports a fetch that a reload cuts off this way.page.waitForLoadState("networkidle"). That wait does nothing after a document's first idle moment: it resolves at once for the rest of that document's life. Measured with a local script on Chromium, the first wait took 500 ms, and a second wait with a 2-second fetch still pending returned in 0 ms.main, manual runs and the planned nightly job still do. A red mobile-webkit job there would block a promotion.What changed
e2e/page-fetch-fixture.ts(new):trackPageFetches(page)counts the page's ownfetchcalls from inside the page, in every document it loads.waitForPageFetchesToSettle(page)waits until no fetch is pending and none has started or ended for half a second.request,requestfinishedandrequestfailedevents. It got stuck on 1 local run in 4, because a fetch the app cancels itself does not always report a finished or failed request there.e2e/expression-active-sprites.e2e.ts: registers the tracker before the first navigation. Its reload helper waits for generation to finish, then for the page's fetches to settle.e2e/roleplay-commands.e2e.ts: the whisper test registers the tracker and its reload helper uses the same wait instead ofnetworkidle.CHANGELOG.md: one entry under[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdThe boxes are left for a human to tick. What the agent ran:
pnpm checkandpnpm check:e2e-types: exit 0.coderabbit review --committed --base-commit <merge-base>): one major finding.fetchresolves when the headers arrive, so a slow response body could still be cut off after the quiet window. Fixed: a fetch now counts as settled only when a clone of its response body has finished arriving. The rerun had no new findings.Manual verification notes
mainor a manual run of the Regression Checks workflow, stays green forexpression-active-spritesandroleplay-commands.--repeat-each=3locally sometimes fails in its visual-novel variant. "Previous paragraph" does not appear within 10 s, and the remaining repeats then fail during fixture setup. Fresh runs pass.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Test-only change with one
CHANGELOG.mdentry. No user-facing docs change.UI evidence (if applicable)
Not applicable: no UI change.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.