oficina / slides Public

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>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e87fc76edf0829e9d36c0a0300afbb1f12799caa parent a95147e
13 files changed, +242 −94
  • core/tests/scene_update.rs +41 −0
  • fixtures/ops.mjs +7 −2
  • fixtures/scene-layer.mjs +6 −5
  • fixtures/scene-layer.test.mjs +16 −4
  • fixtures/scene-places.mjs +14 −17
  • fixtures/scene-update.test.mjs +30 −0
  • internal/slides/credits/assets.json +3 −3
  • internal/slides/static/{editor.df0112d696cc35ea.js => editor.26ad85f3833572c1.js} +19 −19
  • internal/slides/static/fontsgate.e19ff517f8f3aaef.js +5 −0
  • internal/slides/static/fontsgate.fa2160227e5d7324.js +0 −5
  • internal/slides/static/presenter.2cfd034613ea4abf.js +5 −0
  • internal/slides/static/presenter.3dffbc7e34883216.js +0 −5
  • internal/slidestest/scenes_final_browser_test.go +96 −34
core/tests/scene_update.rs

Loading diff…

fixtures/ops.mjs

Loading diff…

fixtures/scene-layer.mjs

Loading diff…

fixtures/scene-layer.test.mjs

Loading diff…

fixtures/scene-places.mjs

Loading diff…

fixtures/scene-update.test.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/static/{editor.df0112d696cc35ea.js => editor.26ad85f3833572c1.js}

Loading diff…

internal/slides/static/fontsgate.e19ff517f8f3aaef.js

Loading diff…

internal/slides/static/fontsgate.fa2160227e5d7324.js

Loading diff…

internal/slides/static/presenter.2cfd034613ea4abf.js

Loading diff…

internal/slides/static/presenter.3dffbc7e34883216.js

Loading diff…

internal/slidestest/scenes_final_browser_test.go

Loading diff…