Repository navigation
Build 468: no Fix.frame error from water that just woke; HUD layout outside its ResizeObserver - #490
Merged
Merged
Conversation
…ust woke; HUD layout outside its ResizeObserver Flood.open pushed into the queue of a water whose stage said running but whose queue invade had not made yet (P.B null, Anton build 465, four errors in one place): a cell opened before the way starts joins the seeds. tools/flood.test.mjs part 4 reproduces it. The HUD laid itself out inside its ResizeObserver callback (Anton, iPhone build 461: 'ResizeObserver loop' error card); the callback now asks for a layout in the next frame. tools/resize.test.mjs watches every observer callback for DOM writes. Rules in docs/ARCHITECTURE.md (Robustness). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczduV6TP2WJ64QZpo7Dn
Contributor
⏱ Performance: this PR against mainScenarios of src/game/98_perf.js, the two builds by turns on one runner (tools/perf.mjs, CPU side, draws counted not drawn). ✅ No regression against main
Over budget (ms/frame, budget): drive Land.lightTick 12.86 > 1 · drive Land.gen 3.66 > 0 · tunnel Land.lightTick 2.15 > 1 · drive Land.meshChunk 1.61 > 1 · flight Land.gen 0.14 > 0 Generated by Claude Code |
Owner
Author
|
"tests ok" is red only because all 12 test shards were cancelled (run 46950337758: list and bundle passed, every shard cancelled while main is held for #466). No test failed. Locally: flood, floodk, resize and hud pass on this head. CI runs again after this branch is updated on the new main. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two errors from Anton's reports.
Fix.frame: Cannot read properties of null (reading '26') (build 465, desktop, then four times in one place).
Flood.opentook a water whose lake was measured (st = 2) as running and pushed into its queue, butinvademakes that queue only when it first runs, a frame later when the frame's time is used up. A repair crew putting a block back in that frame (Fix.put›Land.set›Flood.near›open) threw. Now a cell opened before the way has started joins the seeds thatinvadetakes first. Test first:tools/flood.test.mjspart 4 threwCannot read properties of null (reading '59')before the fix.ResizeObserver loop completed with undelivered notifications (iPhone, build 461). The HUD laid itself out inside the callback of its ResizeObserver; sizes it changed there were observed again in the same frame. The callback now asks for one layout in the next frame. Test first:
tools/resize.test.mjswraps every ResizeObserver of the page and watches its callbacks with a MutationObserver (before: style writes to #acts inside the callback; after: none), and checks the HUD is still laid out after each change of size.Rules in docs/ARCHITECTURE.md (Robustness): a stage marker never runs ahead of the data it promises; no layout inside a ResizeObserver callback.
Screenshots: tools/shots/468.mjs (release assets).
Generated by Claude Code