Fonts: only a field's newest pick is written; no rows for a gone deck
A pick whose answer arrives after a later choice for the same field
(Theme's, or another family) now commits nothing: each field has its own
generation, bumped on every change. POST /d/{sqid}/fonts looks for the
deck again, in the transaction that writes its DeckFont rows under the
library lock, so a deletion that finished in between leaves no orphan
row holding a font's object; it answers 404.
A deck font not in this person's library (a co-editor's, or one they
deleted) shows in its field as a selected, disabled option named by the
family, instead of a blank field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 files changed,
+252
−31
fixtures/deck-fonts.mjs+50 −14fixtures/deck-fonts.test.mjs+57 −1fixtures/inspector.mjs+3 −3internal/slides/credits/assets.json+1 −1internal/slides/deckfonts.go+26 −5internal/slides/library.go+2 −1internal/slides/static/{editor.60bf02a1fe569bf3.js => editor.7522a28e5aa330ba.js}+6 −6internal/slidestest/deckfonts_browser_test.go+69 −0internal/slidestest/deckfonts_test.go+38 −0
fixtures/deck-fonts.mjsLoading diff…
fixtures/deck-fonts.test.mjsLoading diff…
fixtures/inspector.mjsLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/deckfonts.goLoading diff…
internal/slides/library.goLoading diff…
internal/slides/static/{editor.60bf02a1fe569bf3.js => editor.7522a28e5aa330ba.js}Loading diff…
internal/slidestest/deckfonts_browser_test.goLoading diff…
internal/slidestest/deckfonts_test.goLoading diff…