Skip to content

Hold the answered round until the share card is visible - #14

Open
justadreamer wants to merge 1 commit into
mainfrom
fix/hold-answered-round-until-share-card
Open

justadreamer wants to merge 1 commit into
mainfrom
fix/hold-answered-round-until-share-card

Conversation

@justadreamer

Copy link
Copy Markdown
Contributor

CommonPath_ScriptThenPmp_Chrome failed twice in a row on the cloud release candidate (run): the answered round finished 15 ms after the press, in the same animation frame the share card became visible, so the per-frame count put the round before the card. The timeline can't order two events within one frame.

Change: the timeline script now holds the request carrying id.usage unsent until the share card is visible, or 3 s have passed. A card that doesn't wait on the refresh is then always visible before that round can finish. A card that does wait only appears after the hold gives up, by which time the round has finished, so the assertion still fails. Requests without an answer, and any request after the release, are not touched. Both fetch and XMLHttpRequest are covered, matching the client script's two transports.

Testing: builds. The hold logic was exercised in Node with stand-in fetch/XHR: answered requests are held until release or timeout, other requests pass through, and the path match is case-insensitive. The browser suite runs in cloud CI, where the release candidate's submodule points at this branch to validate it.

The share card ordering check counts finished rounds per animation frame, which cannot order a round and the card that land in the same frame. On a fast run the answered round finished 15 ms after the press, in the frame the card appeared, and failed the check twice in a row. Holding that request unsent until the card is visible, or 3 s have passed, makes a card that does not wait always visible first, while a card that waits still fails.
@justadreamer
justadreamer requested a review from drasmart October 7, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant