Slides: exact update preflight; a placement keeps its number while waiting
Two findings from the scoped re-review. The encoded-size preflight (fixtures/ops.mjs) set the copy's client id before importing the deck's state, and Yjs gives a document a new id when an update it applies carries its own, so the copy wrote as another client at another clock: an update of 1,048,577 bytes could pass a 1,048,576-byte cap, and one exactly at the cap could be refused. The id is now set after the import. The core (core/src/ops.rs) builds its copy with the client id fixed and yrs keeps it on import, so it was already exact; the same boundary test now pins it. Placement numbers (scene-places.mjs) were counted after blocks still waiting for their press were left out, so an earlier block of a scene arriving renumbered a running later one and restarted its frame. scenePositions now numbers each block's slot over all of the slide's blocks of that scene, arrived or not; placementSlots is gone. Tests: scene-update.test.mjs and core/tests/scene_update.rs (exactly 1 MiB taken, one byte more refused, on a deck with a long history); scene-layer.test.mjs (a waiting block keeps the next one's number); the browser test TestAnEarlierBlockArrivingLeavesALaterOneRunning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 files changed,
+242
−94
core/tests/scene_update.rs+41 −0fixtures/ops.mjs+7 −2fixtures/scene-layer.mjs+6 −5fixtures/scene-layer.test.mjs+16 −4fixtures/scene-places.mjs+14 −17fixtures/scene-update.test.mjs+30 −0internal/slides/credits/assets.json+3 −3internal/slides/static/{editor.df0112d696cc35ea.js => editor.26ad85f3833572c1.js}+19 −19internal/slides/static/fontsgate.e19ff517f8f3aaef.js+5 −0internal/slides/static/fontsgate.fa2160227e5d7324.js+0 −5internal/slides/static/presenter.2cfd034613ea4abf.js+5 −0internal/slides/static/presenter.3dffbc7e34883216.js+0 −5internal/slidestest/scenes_final_browser_test.go+96 −34
core/tests/scene_update.rsLoading diff…
fixtures/ops.mjsLoading diff…
fixtures/scene-layer.mjsLoading diff…
fixtures/scene-layer.test.mjsLoading diff…
fixtures/scene-places.mjsLoading diff…
fixtures/scene-update.test.mjsLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/static/{editor.df0112d696cc35ea.js => editor.26ad85f3833572c1.js}Loading diff…
internal/slides/static/fontsgate.e19ff517f8f3aaef.jsLoading diff…
internal/slides/static/fontsgate.fa2160227e5d7324.jsLoading diff…
internal/slides/static/presenter.2cfd034613ea4abf.jsLoading diff…
internal/slides/static/presenter.3dffbc7e34883216.jsLoading diff…
internal/slidestest/scenes_final_browser_test.goLoading diff…