Repository navigation
fix(studio): a held edit answered too late never blanks a page already shown - #9087
miguel-heygen wants to merge 2 commits into
Conversation
Edit accuracy: accurate 275 (base branch 273), smooth 62 of thoseThe gate passes. Newly passing (2)
Not banked yet, reported and not gated (bank a full-grid run's baseline.json) (2)
Quarantined, measured but not gated (0) |
jrusso1020
left a comment
There was a problem hiding this comment.
Requesting changes on the PR text and one check, not on the code. Reviewed at fa5ad84.
To clear:
- The body has no
fails without the fix:line. It says "Red on main: 3 of the new core tests and 2 in Studio" but names none. Please add the line with a test name, for example "changes nothing on the page and answers late" (stageAct.test.ts). Commentsis red from this change:stageAct.tscomment share goes from 4.2% to 4.4% (two comment lines added). Cut two lines or move the explanation into a name.Studio and player capturesis red from this change: the body needs## Before/## After, or## No visible changesince no .tsx/.css/.html file changes.
The code itself I would approve as it stands:
stageAct.ts: the expiry is checked when the frame runs the hold, and a late one answers{ op: "late" }without callingstart, so nothing on the page is touched and an open session is left alone.expiresAtis optional and refused unless a finite number, so an older parent keeps working.previewStageAct.ts:replyOfalready drops a reply whose op differs from the request, solatereads as null ("not held") with no new branch, and the existing restore is still queued behind it.- The parent sets
Date.now() + timeoutMsfrom the same timeout it waits on, so the two cannot drift apart.
stageAct.ts and previewStageAct.ts changes read as hunks, plus replyOf / readHeld whole; both test hunks read. Nothing was run. Test (support) is also red; its packages are not the ones changed here and I could not read its log, so I did not count it.
Need: yes · Size: small · Reuse: yes, rides the existing reply check and restore · Simpler: no · Structure: fine
Risk: low. A frame whose clock differs from the parent's would misjudge; the body names that as not covered.
— Rames
…on, not a comment
|
Answering the review. Code is unchanged in what it does; the two added comment lines are cut at fails without the fix: The browser run the body says was not done: headless Chrome 155 on Linux, the runtime built from each side (this PR's from
BeforeThe page as shown, then when its thread is free, then a frame later: AfterNot run: macOS, Windows, or through Desktop. |
jrusso1020
left a comment
There was a problem hiding this comment.
Approve. Reviewed at 02477ab. This clears my earlier change request.
The three points:
fails without the fix:now names five tests, in the author's comment rather than the body. I am taking the comment as meeting it, since the captures check counts an author comment the same way; say so if the body is the only place that counts.Commentspasses: the two added comment lines are gone and the meaning moved into the function name (startUnlessParentGaveUp).Studio and player capturespasses on the Before/After in the same comment.
Delta from fa5ad84, byte-compared: one rename and two comment lines removed in stageAct.ts, nothing else. The behaviour I read at the earlier head is unchanged.
Nothing was run by me; the red-on-main claim for the five tests and the 60-run browser table are the author's. No check is red at this head; the rest were pending when I read and I did not wait.
Need: yes · Size: small · Reuse: yes · Simpler: no · Structure: fine
Risk: low, as before. Not run on macOS, Windows or through the desktop app, per the author.
— Rames


What
A
stage-acthold now says when its parent stops waiting (expiresAt, set byholdPreviewStagefrom its own timeout). A sealed frame that reads it at or after that time holds nothing and answerslate.Why
holdPreviewStagegives up after its timeout and queues a restore behind the hold, but the hold itself stays in the frame's queue. A frame whose thread was blocked ran it once unblocked, after the host had already shown the page. A title the person could see went blank, then came back.Related work
Refs #9042, the host step (
beforePreviewShown), which gives a host 250 ms to hold a page before it is shown.How
hold, so the parent reads null ("not held") and never "held, nothing to hold". It leaves a session already open alone.expiresAtis wall-clock time, which a page and its sandboxed frame share. It is optional: a hold without it behaves as before.Test plan
Not covered: a frame whose own page replaces
Date.now.