oficina / slides Public

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>
Paul Campbell pushed by paul@keymail.dev c1d2f4d1e34cc6737ca224d57d5c630c7217d0d1 parent a50ab2c
33 files changed, +2,205 −157
  • AGENTS.md +58 −12
  • fixtures/editor-entry.js +39 −3
  • fixtures/editor-fonts.mjs +71 −28
  • fixtures/editor-fonts.test.mjs +153 −0
  • fixtures/engines/first-reveal.mjs +13 −1
  • fixtures/engines/leaving-webkit.swift +119 −0
  • fixtures/engines/leaving.mjs +77 −0
  • fixtures/engines/navigate.mjs +159 −0
  • fixtures/engines/wait-keys.mjs +6 −1
  • fixtures/fonts-gate.mjs +21 −0
  • fixtures/generate-random-decks.mjs +87 −7
  • fixtures/live-updates.mjs +68 −1
  • fixtures/live-updates.test.mjs +43 −1
  • fixtures/save-queue.mjs +23 −2
  • fixtures/save-queue.test.mjs +24 −0
  • fixtures/stage.mjs +9 −6
  • fixtures/viewer-nav.mjs +164 −0
  • internal/slides/credits/assets.json +3 −3
  • internal/slides/editor.go +7 −2
  • internal/slides/fontgate.go +5 −2
  • internal/slides/locales/en.toml +1 −0
  • internal/slides/render/editing.go +131 −0
  • internal/slides/render/editing_test.go +70 −0
  • internal/slides/render/render.go +29 −3
  • internal/slides/static/{editor.56bb3ac7c44f47ed.js => editor.32cedc10927dae66.js} +14 −14
  • internal/slides/static/editor.css +33 −23
  • internal/slides/static/fontsgate.358bdc2e9398e6da.js +1 −0
  • internal/slides/static/fontsgate.d9d3bf6a4e76d8ed.js +0 −1
  • internal/slides/static/present.js +102 −3
  • internal/slides/templates/editor.html +1 −1
  • internal/slidestest/fonts_browser_test.go +397 −42
  • internal/slidestest/fonts_engines_browser_test.go +31 −1
  • internal/slidestest/leaving_browser_test.go +246 −0

CI passed — run details

AGENTS.md

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/editor-fonts.mjs

Loading diff…

fixtures/editor-fonts.test.mjs

Loading diff…

fixtures/engines/first-reveal.mjs

Loading diff…

fixtures/engines/leaving-webkit.swift

Loading diff…

fixtures/engines/leaving.mjs

Loading diff…

fixtures/engines/navigate.mjs

Loading diff…

fixtures/engines/wait-keys.mjs

Loading diff…

fixtures/fonts-gate.mjs

Loading diff…

fixtures/generate-random-decks.mjs

Loading diff…

fixtures/live-updates.mjs

Loading diff…

fixtures/live-updates.test.mjs

Loading diff…

fixtures/save-queue.mjs

Loading diff…

fixtures/save-queue.test.mjs

Loading diff…

fixtures/stage.mjs

Loading diff…

fixtures/viewer-nav.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/editor.go

Loading diff…

internal/slides/fontgate.go

Loading diff…

internal/slides/locales/en.toml

Loading diff…

internal/slides/render/editing.go

Loading diff…

internal/slides/render/editing_test.go

Loading diff…

internal/slides/render/render.go

Loading diff…

internal/slides/static/{editor.56bb3ac7c44f47ed.js => editor.32cedc10927dae66.js}

Loading diff…

internal/slides/static/editor.css

Loading diff…

internal/slides/static/fontsgate.358bdc2e9398e6da.js

Loading diff…

internal/slides/static/fontsgate.d9d3bf6a4e76d8ed.js

Loading diff…

internal/slides/static/present.js

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slidestest/fonts_browser_test.go

Loading diff…

internal/slidestest/fonts_engines_browser_test.go

Loading diff…

internal/slidestest/leaving_browser_test.go

Loading diff…