oficina / docs Public

Serif becomes a mark of its own

Serif has always been what a document is when nobody said otherwise, so
it was spelled as the absence of a mark and there was nothing to select.
That is fine while serif is the default and impossible the moment it is
not, so `font_serif` joins the closed set first, on its own, before
anything moves.

Five places hold that set and they have to agree: core/src/fragment.rs's
MARKS table, fixtures/editor-entry.js's schema, views/show.html's
stylesheet, internal/export/pdf.go and the toolbar. Four of them are
here; the exporter's is in the commit that moves the default, because
until then a serif-marked run and an unmarked one resolve to the same
face and a test could not tell the two apart.

fixtures/fonts.mjs is new: the faces, their marks, which of them is the
default, and the mapping in both directions. The toolbar had that
vocabulary inline with 'serif' written into two expressions, which is
exactly the shape that goes quietly wrong when the default moves — the
control keeps naming a face the text is not in, and choosing it does
nothing. It is a module so a Node test can pin it with no DOM, the same
arrangement align.mjs has.

fixtures/vectors/fragment/fonts.bin is a NEW vector, not a change to
styled.bin. These are the wire contract rather than an output of it:
regenerating styled.bin would have moved bytes a dozen assertions
already compare against, so serif's fixture is its own file and every
existing assertion keeps asserting what it did.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 13c8189b44b44bb5a50fa03abc6b5ab6b098d54b parent f4bc155
13 files changed, +375 −29
  • .amadan/ci.d/10-gate +14 −0
  • core/src/fragment.rs +15 −5
  • core/tests/fragment.rs +47 −0
  • fixtures/editor-entry.js +8 −0
  • fixtures/fonts.mjs +106 −0
  • fixtures/fonts.test.mjs +83 −0
  • fixtures/generate-fragment.mjs +25 −1
  • fixtures/toolbar.mjs +47 −4
  • fixtures/vectors/fragment/fonts.bin binary
  • internal/core/testdata/docs_core.wasm binary
  • internal/docs/export_test.go +5 −5
  • internal/docs/static/{editor.98a16ab4d0c731c1.js => editor.24c1880485a21f1b.js} +13 −13
  • internal/docs/views/show.html +12 −1

Intent

Human

<task-notification> <task-id>af85bd42b61858e34</task-id> <tool-use-id>toolu_01XUYPXtXx4R4DnviZbGmjFM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-oficina-docs/4a30c557-129a-4e57-8aa3-0c7518c36cf1/tasks/af85bd42b61858e34.output</output-file> <status>failed</status> <summary>Agent "Branch 3: sans-serif default" failed: Agent terminated early due to an API error: API Error: Server error mid-response. The response above may be incomplete. (error type server_error)</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Now the toolbar mark list test — watch it fail before adding the schema mark.</result> </task-notification>

.amadan/ci.d/10-gate

Loading diff…

core/src/fragment.rs

Loading diff…

core/tests/fragment.rs

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/fonts.mjs

Loading diff…

fixtures/fonts.test.mjs

Loading diff…

fixtures/generate-fragment.mjs

Loading diff…

fixtures/toolbar.mjs

Loading diff…

fixtures/vectors/fragment/fonts.bin

Loading diff…

internal/core/testdata/docs_core.wasm

Loading diff…

internal/docs/export_test.go

Loading diff…

internal/docs/static/{editor.98a16ab4d0c731c1.js => editor.24c1880485a21f1b.js}

Loading diff…

internal/docs/views/show.html

Loading diff…