Slides fonts, review round 1: waits always let go, nothing is lost or moved, slides change in place, left pages let go of their streams
Astra's four P1s on #27, each with a test that fails on a50ab2c: - A refused font wait threw (an out-of-scope `inspector`) before it released the collaborators' updates queued behind it. wait() now releases every waiter, in order, in a finally, however it ends, and calls onRefused; the probe fails on any unhandled rejection. - A stage refresh already on its way replaced the view a waiting paste belonged to. Stage installs and resyncs now wait for a local font wait to end; nothing is deferred onto a new view or replayed. - A late editor moved headings with trailing empty paragraphs. The editor's stage is now served in ProseMirror's own markup (render.Options.Editing), with editor.css giving it what the editable node gets; the empty presence overlay is not drawn. Markup, layout and pixels are equal across a 6 s late mount on generated decks carrying every empty and trailing-empty shape in every bound type. - Moving between slides by link showed an empty stage. The viewer, ?present=1 and the projector change slides in place (fetch, families ready, pictures decoded, one swap, pushState); links stay ordinary without a script. Chromium and WebKit pixel checks show no blank frame. And Docs #86 (dadf9c1): Chrome and WebKit kept left Slides pages in the back/forward cache with their EventSource open. live-updates.mjs takes Docs' pageLifecycle; present.js closes and reopens its stream the same way; prefetches stop while away. Checked on the editor, projector, follow view, presenter and remote in Chromium with bfcache and in WKWebView. Also: saveQueue.flush() waits for a save already on the wire (the stage fetched a just-made slide before it was saved), and a local change moves the stage only once saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 files changed,
+2,205
−157
AGENTS.md+58 −12fixtures/editor-entry.js+39 −3fixtures/editor-fonts.mjs+71 −28fixtures/editor-fonts.test.mjs+153 −0fixtures/engines/first-reveal.mjs+13 −1fixtures/engines/leaving-webkit.swift+119 −0fixtures/engines/leaving.mjs+77 −0fixtures/engines/navigate.mjs+159 −0fixtures/engines/wait-keys.mjs+6 −1fixtures/fonts-gate.mjs+21 −0fixtures/generate-random-decks.mjs+87 −7fixtures/live-updates.mjs+68 −1fixtures/live-updates.test.mjs+43 −1fixtures/save-queue.mjs+23 −2fixtures/save-queue.test.mjs+24 −0fixtures/stage.mjs+9 −6fixtures/viewer-nav.mjs+164 −0internal/slides/credits/assets.json+3 −3internal/slides/editor.go+7 −2internal/slides/fontgate.go+5 −2internal/slides/locales/en.toml+1 −0internal/slides/render/editing.go+131 −0internal/slides/render/editing_test.go+70 −0internal/slides/render/render.go+29 −3internal/slides/static/{editor.56bb3ac7c44f47ed.js => editor.32cedc10927dae66.js}+14 −14internal/slides/static/editor.css+33 −23internal/slides/static/fontsgate.358bdc2e9398e6da.js+1 −0internal/slides/static/fontsgate.d9d3bf6a4e76d8ed.js+0 −1internal/slides/static/present.js+102 −3internal/slides/templates/editor.html+1 −1internal/slidestest/fonts_browser_test.go+397 −42internal/slidestest/fonts_engines_browser_test.go+31 −1internal/slidestest/leaving_browser_test.go+246 −0
CI passed — run details
AGENTS.mdLoading diff…
fixtures/editor-entry.jsLoading diff…
fixtures/editor-fonts.mjsLoading diff…
fixtures/editor-fonts.test.mjsLoading diff…
fixtures/engines/first-reveal.mjsLoading diff…
fixtures/engines/leaving-webkit.swiftLoading diff…
fixtures/engines/leaving.mjsLoading diff…
fixtures/engines/navigate.mjsLoading diff…
fixtures/engines/wait-keys.mjsLoading diff…
fixtures/fonts-gate.mjsLoading diff…
fixtures/generate-random-decks.mjsLoading diff…
fixtures/live-updates.mjsLoading diff…
fixtures/live-updates.test.mjsLoading diff…
fixtures/save-queue.mjsLoading diff…
fixtures/save-queue.test.mjsLoading diff…
fixtures/stage.mjsLoading diff…
fixtures/viewer-nav.mjsLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/editor.goLoading diff…
internal/slides/fontgate.goLoading diff…
internal/slides/locales/en.tomlLoading diff…
internal/slides/render/editing.goLoading diff…
internal/slides/render/editing_test.goLoading diff…
internal/slides/render/render.goLoading diff…
internal/slides/static/{editor.56bb3ac7c44f47ed.js => editor.32cedc10927dae66.js}Loading diff…
internal/slides/static/editor.cssLoading diff…
internal/slides/static/fontsgate.358bdc2e9398e6da.jsLoading diff…
internal/slides/static/fontsgate.d9d3bf6a4e76d8ed.jsLoading diff…
internal/slides/static/present.jsLoading diff…
internal/slides/templates/editor.htmlLoading diff…
internal/slidestest/fonts_browser_test.goLoading diff…
internal/slidestest/fonts_engines_browser_test.goLoading diff…
internal/slidestest/leaving_browser_test.goLoading diff…