oficina / docs Public

Merge main: the formatting bar, fonts and export

Three conflicts, all of them two additions to one place:

handlers.go — showPage grew the palette's fields on this branch and the
toolbar's, the font faces' and the export links' on the other. Both
kept, in both the struct and its construction.

AGENTS.md — two rules were appended after the same paragraph of the
tools-that-answer-wrongly section: "a new test must be seen to fail" and
"do not pass on somebody else's finding as your own verification". They
were written a few hours apart by the same session for different
reasons, and both belong.

The bundles are rebuilt on top of the merge, both of them.

What needed verifying is not that it merged. views/show.html now carries
the formatting bar and the jump-to palette for the first time, and they
are separate bundles reaching for the same keyboard on the same page —
so both drives were run against the merged tree rather than either side
of it: the committed browser drive at 22/22 (including the three
keyboard checks, which are exactly where a second bundle could have
trodden on the first) and the palette's own 17/17, Control-K still
opening from inside a document that now has a toolbar above it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYB9fUAfxXNzkeC3fsFYzR
Paul Campbell pushed by paul@keymail.dev 1b5cce948ee3e42105ff9f8d0c8669e9463010f7 parent 0bab498parent eefa1a4
49 files changed, +6780 −141
  • AGENTS.md +52 −0
  • core/src/abi.rs +48 −1
  • core/src/fragment.rs +204 −10
  • core/src/lib.rs +16 −3
  • core/tests/fragment.rs +148 −2
  • docs/superpowers/plans/2026-08-31-formatting-and-export.md +253 −0
  • fixtures/browser-drive.mjs +590 −0
  • fixtures/editor-entry.js +71 −14
  • fixtures/generate-fragment.mjs +22 −1
  • fixtures/toolbar-roving.mjs +86 −0
  • fixtures/toolbar.mjs +273 −0
  • fixtures/vectors/fragment/styled.bin binary
  • internal/core/core.go +70 −88
  • internal/core/testdata/docs_core.wasm binary
  • internal/docs/app.go +10 −0
  • internal/docs/assets.go +39 −0
  • internal/docs/export.go +283 −0
  • internal/docs/export_test.go +336 −0
  • internal/docs/handlers.go +20 −0
  • internal/docs/render.go +44 −0
  • internal/docs/static/editor.2acdd85ce9619546.js +0 −14
  • internal/docs/static/editor.3e44c12d757809a4.js +14 −0
  • internal/docs/store.go +23 −0
  • internal/docs/views/show.html +238 −8
  • internal/export/document.go +127 −0
  • internal/export/markdown.go +290 −0
  • internal/export/markdown_test.go +217 −0
  • internal/export/pdf.go +723 −0
  • internal/export/pdf_test.go +365 −0
  • internal/export/pdfread_test.go +270 −0
  • internal/export/sample_pdf_test.go +71 −0
  • internal/fonts/files/LICENSE-OFL-1.1.txt +91 −0
  • internal/fonts/files/LiberationMono-Bold.ttf binary
  • internal/fonts/files/LiberationMono-BoldItalic.ttf binary
  • internal/fonts/files/LiberationMono-Italic.ttf binary
  • internal/fonts/files/LiberationMono-Regular.ttf binary
  • internal/fonts/files/LiberationSans-Bold.ttf binary
  • internal/fonts/files/LiberationSans-BoldItalic.ttf binary
  • internal/fonts/files/LiberationSans-Italic.ttf binary
  • internal/fonts/files/LiberationSans-Regular.ttf binary
  • internal/fonts/files/LiberationSerif-Bold.ttf binary
  • internal/fonts/files/LiberationSerif-BoldItalic.ttf binary
  • internal/fonts/files/LiberationSerif-Italic.ttf binary
  • internal/fonts/files/LiberationSerif-Regular.ttf binary
  • internal/fonts/fonts.go +268 −0
  • internal/fonts/fonts_test.go +277 −0
  • internal/fonts/truetype.go +689 −0
  • internal/pdf/pdf.go +455 −0
  • scripts/browser-drive.sh +97 −0

CI passed — run details

AGENTS.md

Loading diff…

core/src/abi.rs

Loading diff…

core/src/fragment.rs

Loading diff…

core/src/lib.rs

Loading diff…

core/tests/fragment.rs

Loading diff…

docs/superpowers/plans/2026-08-31-formatting-and-export.md

Loading diff…

fixtures/browser-drive.mjs

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/generate-fragment.mjs

Loading diff…

fixtures/toolbar-roving.mjs

Loading diff…

fixtures/toolbar.mjs

Loading diff…

fixtures/vectors/fragment/styled.bin

Loading diff…

internal/core/core.go

Loading diff…

internal/core/testdata/docs_core.wasm

Loading diff…

internal/docs/app.go

Loading diff…

internal/docs/assets.go

Loading diff…

internal/docs/export.go

Loading diff…

internal/docs/export_test.go

Loading diff…

internal/docs/handlers.go

Loading diff…

internal/docs/render.go

Loading diff…

internal/docs/static/editor.2acdd85ce9619546.js

Loading diff…

internal/docs/static/editor.3e44c12d757809a4.js

Loading diff…

internal/docs/store.go

Loading diff…

internal/docs/views/show.html

Loading diff…

internal/export/document.go

Loading diff…

internal/export/markdown.go

Loading diff…

internal/export/markdown_test.go

Loading diff…

internal/export/pdf.go

Loading diff…

internal/export/pdf_test.go

Loading diff…

internal/export/pdfread_test.go

Loading diff…

internal/export/sample_pdf_test.go

Loading diff…

internal/fonts/files/LICENSE-OFL-1.1.txt

Loading diff…

internal/fonts/files/LiberationMono-Bold.ttf

Loading diff…

internal/fonts/files/LiberationMono-BoldItalic.ttf

Loading diff…

internal/fonts/files/LiberationMono-Italic.ttf

Loading diff…

internal/fonts/files/LiberationMono-Regular.ttf

Loading diff…

internal/fonts/files/LiberationSans-Bold.ttf

Loading diff…

internal/fonts/files/LiberationSans-BoldItalic.ttf

Loading diff…

internal/fonts/files/LiberationSans-Italic.ttf

Loading diff…

internal/fonts/files/LiberationSans-Regular.ttf

Loading diff…

internal/fonts/files/LiberationSerif-Bold.ttf

Loading diff…

internal/fonts/files/LiberationSerif-BoldItalic.ttf

Loading diff…

internal/fonts/files/LiberationSerif-Italic.ttf

Loading diff…

internal/fonts/files/LiberationSerif-Regular.ttf

Loading diff…

internal/fonts/fonts.go

Loading diff…

internal/fonts/fonts_test.go

Loading diff…

internal/fonts/truetype.go

Loading diff…

internal/pdf/pdf.go

Loading diff…

scripts/browser-drive.sh

Loading diff…