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>
15 files changed,
+429
−134
AGENTS.md+11 −5fixtures/deck-fonts.mjs+3 −19fixtures/editor-fonts.mjs+27 −5fixtures/font-session.mjs+3 −3fixtures/font-uploaded.test.mjs+54 −16fixtures/fonts-gate.mjs+2 −2internal/slides/credits/assets.json+1 −1internal/slides/deckfonts.go+22 −10internal/slides/fontgate.go+1 −1internal/slides/library.go+24 −2internal/slides/static/{editor.1f4b001e9578d687.js => editor.55a7407f5108ee76.js}+17 −17internal/slidestest/deckfonts_browser_test.go+16 −11internal/slidestest/deckfonts_test.go+54 −19internal/slidestest/fonts_browser_test.go+141 −17internal/slidestest/library_test.go+53 −6
AGENTS.mdLoading diff…
fixtures/deck-fonts.mjsLoading diff…
fixtures/editor-fonts.mjsLoading diff…
fixtures/font-session.mjsLoading diff…
fixtures/font-uploaded.test.mjsLoading diff…
fixtures/fonts-gate.mjsLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/deckfonts.goLoading diff…
internal/slides/fontgate.goLoading diff…
internal/slides/library.goLoading diff…
internal/slides/static/{editor.1f4b001e9578d687.js => editor.55a7407f5108ee76.js}Loading diff…
internal/slidestest/deckfonts_browser_test.goLoading diff…
internal/slidestest/deckfonts_test.goLoading diff…
internal/slidestest/fonts_browser_test.goLoading diff…
internal/slidestest/library_test.goLoading diff…