oficina / slides Public

Fonts: a collaborator's uploaded font loads; no catalog names

The editor checks every change on its scratch copy when its session can
learn uploaded families: a family the changed deck names (a pick here or
a collaborator's) is learned from meta.fontFiles under /d/{sqid}, and the
change waits for it as for any family it brings in, committing it to its
stack's next family past the timeout. One the deck already shows that
the tab never learned is committed where it is, so it never swaps in.
This replaces deck-fonts.mjs's learnPick.

A pick loads before the set_meta that lists it, so /d/{sqid}/fonts/{ref}
serves a recorded ref the deck does not list to the person whose library
holds it; nobody else, and never over a share link.

cssFamilyName treats catalog family names and CSS generic keywords,
compared without case, as taken: an upload called "Liberation Serif"
becomes "Liberation Serif 2" and never joins the built-in Serif.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev dcc278df2ecfcf56322988d7a1ea582ddc45427b parent e19b49d
15 files changed, +429 −134
  • AGENTS.md +11 −5
  • fixtures/deck-fonts.mjs +3 −19
  • fixtures/editor-fonts.mjs +27 −5
  • fixtures/font-session.mjs +3 −3
  • fixtures/font-uploaded.test.mjs +54 −16
  • fixtures/fonts-gate.mjs +2 −2
  • internal/slides/credits/assets.json +1 −1
  • internal/slides/deckfonts.go +22 −10
  • internal/slides/fontgate.go +1 −1
  • internal/slides/library.go +24 −2
  • internal/slides/static/{editor.1f4b001e9578d687.js => editor.55a7407f5108ee76.js} +17 −17
  • internal/slidestest/deckfonts_browser_test.go +16 −11
  • internal/slidestest/deckfonts_test.go +54 −19
  • internal/slidestest/fonts_browser_test.go +141 −17
  • internal/slidestest/library_test.go +53 −6
AGENTS.md

Loading diff…

fixtures/deck-fonts.mjs

Loading diff…

fixtures/editor-fonts.mjs

Loading diff…

fixtures/font-session.mjs

Loading diff…

fixtures/font-uploaded.test.mjs

Loading diff…

fixtures/fonts-gate.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/deckfonts.go

Loading diff…

internal/slides/fontgate.go

Loading diff…

internal/slides/library.go

Loading diff…

internal/slides/static/{editor.1f4b001e9578d687.js => editor.55a7407f5108ee76.js}

Loading diff…

internal/slidestest/deckfonts_browser_test.go

Loading diff…

internal/slidestest/deckfonts_test.go

Loading diff…

internal/slidestest/fonts_browser_test.go

Loading diff…

internal/slidestest/library_test.go

Loading diff…