oficina / slides Public

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>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 10ee880f681240d58d8fb7ddb037dd86104a939b parent 0794075
9 files changed, +252 −31
  • fixtures/deck-fonts.mjs +50 −14
  • fixtures/deck-fonts.test.mjs +57 −1
  • fixtures/inspector.mjs +3 −3
  • internal/slides/credits/assets.json +1 −1
  • internal/slides/deckfonts.go +26 −5
  • internal/slides/library.go +2 −1
  • internal/slides/static/{editor.60bf02a1fe569bf3.js => editor.7522a28e5aa330ba.js} +6 −6
  • internal/slidestest/deckfonts_browser_test.go +69 −0
  • internal/slidestest/deckfonts_test.go +38 −0
fixtures/deck-fonts.mjs

Loading diff…

fixtures/deck-fonts.test.mjs

Loading diff…

fixtures/inspector.mjs

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/deckfonts.go

Loading diff…

internal/slides/library.go

Loading diff…

internal/slides/static/{editor.60bf02a1fe569bf3.js => editor.7522a28e5aa330ba.js}

Loading diff…

internal/slidestest/deckfonts_browser_test.go

Loading diff…

internal/slidestest/deckfonts_test.go

Loading diff…