Mapa: column layouts (columns and icons spec, phase 2)
Pandoc fenced divs (:::: columns / ::: column), two to four columns, as blocks in Go and in the editor's port, held together by the goldens; the editor's commands, keys, paste and cut; the merge keeps layouts whole; History's words; the grammar version on every counted post; the Notion importer writes two to four columns as a layout. Gates COL1 to COL13. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from feat/columns into main.
AGENTS.md+12 −0Makefile+7 −1copy-review/columns/result.json+89 −0copy-review/columns/strings.json+122 −0docs/superpowers/specs/2026-11-22-mapa-columns-icons.md+24 −0editor/clipboard.mjs+22 −4editor/columns.mjs+281 −0editor/columns.test.mjs+244 −0editor/commands.mjs+3 −1editor/fidelity.mjs+118 −12editor/fidelity.test.mjs+15 −7editor/fromMarkdown.mjs+50 −10editor/keys.mjs+7 −1editor/maketeam.mjs+4 −2editor/markup.mjs+147 −5editor/page.mjs+2 −1editor/parity.test.mjs+4 −2editor/saver.mjs+2 −2editor/saver.test.mjs+1 −1editor/schema.mjs+37 −7editor/serialize.mjs+62 −3editor/slash.mjs+2 −1internal/mapa/credits/assets.json+1 −1internal/mapa/diff.go+4 −0internal/mapa/funcs.go+4 −0internal/mapa/grammar.go+44 −0internal/mapa/handlers_edit.go+2 −2internal/mapa/handlers_history.go+1 −1internal/mapa/markers.go+2 −1internal/mapa/markup/blocks.go+45 −9internal/mapa/markup/columns.go+222 −0internal/mapa/markup/columns_test.go+142 −0internal/mapa/markup/golden_test.go+16 −11internal/mapa/markup/merge.go+36 −11internal/mapa/markup/merge_columns.go+242 −0internal/mapa/markup/merge_columns_test.go+195 −0internal/mapa/markup/pandoc_test.go+163 −0internal/mapa/markup/render.go+10 −0internal/mapa/markup/settle.go+5 −5internal/mapa/markup/testdata/corpus/columns.json+102 −0internal/mapa/markup/testdata/corpus/import.json+6 −1internal/mapa/markup/testdata/editor.json+32 −2internal/mapa/markup/testdata/golden.json+31 −1internal/mapa/markup/testdata/pandoc.json+252 −0internal/mapa/mentions.go+3 −2internal/mapa/menus.go+21 −0internal/mapa/notionmd/blocks.go+26 −2internal/mapa/notionmd/fixtures_blocks_test.go+24 −0internal/mapa/notionmd/mapper.go+13 −1internal/mapa/notionmd/neutral.go+3 −1internal/mapa/notionmd/parts.go+5 −0internal/mapa/notionmd/testdata/fixtures/columns-empty.json+39 −0internal/mapa/notionmd/testdata/fixtures/columns-fence-text.json+52 −0internal/mapa/notionmd/testdata/fixtures/columns-five.json+106 −0internal/mapa/notionmd/testdata/fixtures/columns-nested.json+84 −0internal/mapa/notionmd/testdata/fixtures/columns-one.json+34 −0internal/mapa/notionmd/testdata/golden/columns-empty.json+5 −0internal/mapa/notionmd/testdata/golden/columns-empty.md+11 −0internal/mapa/notionmd/testdata/golden/columns-fence-text.json+6 −0internal/mapa/notionmd/testdata/golden/columns-fence-text.md+13 −0internal/mapa/notionmd/testdata/golden/columns-five.json+8 −0internal/mapa/notionmd/testdata/golden/columns-five.md+9 −0internal/mapa/notionmd/testdata/golden/columns-nested.json+8 −0internal/mapa/notionmd/testdata/golden/columns-nested.md+15 −0internal/mapa/notionmd/testdata/golden/columns-one.json+5 −0internal/mapa/notionmd/testdata/golden/columns-one.md+1 −0internal/mapa/notionmd/testdata/golden/columns.json+1 −4internal/mapa/notionmd/testdata/golden/columns.md+10 −0internal/mapa/private.go+2 −2internal/mapa/share.go+26 −0internal/mapa/static/editor.3c106a8d6eac2ca9.js+0 −42internal/mapa/static/editor.bad1b29c273b6a86.js+44 −0internal/mapa/static/prose.css+30 −0internal/mapa/templates/blocks.html+1 −1internal/mapa/templates/conflict.html+1 −1internal/mapa/templates/frame.html+2 −1internal/mapa/templates/partials.html+1 −1internal/mapa/templates/share.html+1 −1internal/mapa/testdata/notion/every-block.md+10 −0internal/mapa/versions.go+4 −0internal/mapa/versions_columns.go+45 −0internal/mapa/views.go+22 −4internal/mapatest/columns_browser_test.go+113 −0internal/mapatest/columns_test.go+140 −0internal/mapatest/gate8_test.go+1 −0internal/mapatest/harness_test.go+23 −0internal/mapatest/saving_test.go+1 −0scripts/mutate/columns.go+45 −0scripts/mutate/main.go+1 −0scripts/mutate/mutations_mapper.go+2 −1
CI passed — run details
CI log
=== editor ===
cd editor && npm ci --no-audit --no-fund --loglevel=error
added 16 packages in 319ms
cd editor && node build-bundles.mjs
wrote internal/mapa/static/editor.bad1b29c273b6a86.js (364471 bytes, 114.4KB gzipped; L12 budget 120KB)
cd editor && node --test
✔ a badge is named for what it does, starting with its visible word (1.356596ms)
✔ first words stop at five words or forty characters (0.193709ms)
✔ the field keeps one trimmed line, without brackets (0.283696ms)
✔ the field holds at most MaxAlt bytes, cut at a character (0.453021ms)
✔ a block becomes column 1 of two, and undo gives it back (11.327863ms)
✔ a selection over blocks moves them all into column 1 (2.159486ms)
✔ no layout is made inside a layout (0.483928ms)
✔ Add a column, Remove this column and Undo columns (4.227584ms)
✔ Undo columns puts the blocks in reading order (0.587069ms)
✔ Backspace in an empty column takes the column away (0.855658ms)
✔ ⌥⌘→ and ⌥⌘← move between columns (0.472666ms)
✔ typing a fence line in a column never closes it (D16) (12.948962ms)
✔ a selection holding a layout makes no nested layout (H1) (1.929439ms)
✔ a fence typed after a break in a column stays in the column (H2) (3.667754ms)
✔ code holding a fence line and ::: stays code in its column (H2) (1.386812ms)
✔ Backspace after a layout and Delete before one join nothing (M4) (0.624769ms)
✔ deleting across columns keeps every column (M3) (2.082844ms)
✔ a layout pasted into a column arrives as its blocks (M1) (3.520621ms)
✔ copying inside one column puts no fence on the clipboard (M2) (0.299515ms)
✔ typing goes on in the column after a structural reparse (round 2) (5.279084ms)
✔ a structural reparse in a column leaves code as it was (round 2) (4.656718ms)
✔ days and weeks move across months and years (1.706876ms)
✔ a month keeps the day, or takes the month's last (0.253501ms)
✔ the grid is six weeks from Monday, as the month calendar draws it (0.428454ms)
✔ the grid starts the week where the locale does (0.481804ms)
✔ the keys move a day, a week, a month and a year (0.217493ms)
✔ the picked day is the chip [[ makes for a date (16.967546ms)
✔ Insert → Today's date still puts today in at once (2.088294ms)
✔ / offers Date, the picker, and Today's date beside it (0.311929ms)
✔ after a ! the chip goes in after a space, never as an embed (4.666487ms)
✔ where the Markdown would read the chip differently, it is refused (2.232341ms)
✔ over a selection the chip goes after it and the words stay (1.943786ms)
✔ today is the day in the viewer's zone (20.881006ms)
✔ every offered locale has cases (1.141247ms)
✔ dates.mjs writes every date Go writes, byte for byte (5.456511ms)
✔ a chip, the month and the week, in three locales (0.546704ms)
✔ dates.json is what ICU gives, byte for byte (513.349719ms)
✔ L1: mounting then serialising gives cleanBody(body), byte for byte (107.423533ms)
ℹ 901 bodies
✔ L1: mounting a stored body adds nothing, and saving it writes nothing new (131.946985ms)
✔ L2: one edited block changes only that block's bytes; undo gives the body back (145.144369ms)
ℹ 888 single-block edits
✔ L2: inserting or deleting a block changes bytes only at the new seams, by Join (172.617664ms)
ℹ 896 inserts, 837 deletes
✔ L3: seeded edits keep the document and its Markdown saying the same thing (5434.726244ms)
ℹ 21624 edits over 901 bodies
✔ L3: Link to a page makes exactly one chip, and changes nothing else (1295.215261ms)
ℹ 4710 links over 901 bodies; refused: {"A page link can’t hold another link or a line break. Select plain words.":945,"A page link can’t show [ or ]]. Select words without them.":404,"Select some words to link them to a page.":174,"Linked here, the Markdown around these words would read differently: a ! before them makes an embed, and a stray ` or * pairs up. Select other words.":18}
✔ L3: a picked date is one more date chip, or refused where a letter would be too (1471.535145ms)
ℹ over 901 bodies: {"inserted":5338,"spaced":23,"refused":45,"unstable":9}
✔ linear: trailing spaces (40.803474ms)
✔ linear: trailing whitespace (36.82723ms)
✔ linear: unclosed web links (26.605776ms)
✔ linear: web links with no address (28.444538ms)
✔ linear: unclosed wiki links (40.168146ms)
✔ linear: unclosed embeds (27.883617ms)
✔ linear: closes only (12.220109ms)
✔ the selected words become the chip's shown text (11.310022ms)
✔ words that are the title make a plain [[Title]] (3.829664ms)
✔ spaces at the selection's edges stay outside the chip (1.227036ms)
✔ a date makes a date link, in a heading, an item and a quote (8.44149ms)
✔ bold words lose their bold: a chip carries no marks in Mapa's Markdown (1.652926ms)
✔ only the linked block's bytes change, and undo gives the body back (3.465769ms)
✔ a selection across blocks, over a chip or a break, or of brackets is refused (2.014657ms)
✔ a target the words cannot be linked to as typed is refused (0.408899ms)
✔ ⌘L: over a selection it opens Page link; with none it types [[; in code it does nothing (2.893317ms)
✔ web-linked words are refused: the address would be lost (review M4) (1.905695ms)
✔ words whose Markdown would read otherwise are refused (review M3) (2.29648ms)
✔ ⌘A then ⌘L says why, instead of doing nothing (review low 1) (1.776746ms)
✔ linkCheck says why it refuses (review low 2) (0.64695ms)
✔ golden file has bodies (0.767113ms)
✔ markup.mjs parses every body into Go's blocks, byte offsets and all (24.318083ms)
✔ markup.mjs strips and spans every block as Go does (60.844844ms)
✔ the schema's toDOM draws every body as Go renders it (85.00874ms)
✔ emphasis draws the four pinned outputs (22.003077ms)
✔ a body ends in the editor's empty paragraph (0.30227ms)
✔ the editor labels date chips as Go does, in every locale L4 holds (14.288838ms)
✔ a POST that never answers is aborted after the timeout (22.836966ms)
✔ a keepalive POST carries no signal, and an answer clears the timer (1.156886ms)
✔ autosave sends only what differs, and the tab owns the draft it wrote (11.837158ms)
✔ an offered draft never commits by itself; Save commits it (1.508999ms)
✔ reload, then close: sessionStorage says the draft is this tab's own (0.607517ms)
✔ closing carries text not yet sent, and the cap leaves it out (43.722649ms)
✔ clean rebase: applied, the caret survives, the base moves by the rebase POST (4.423987ms)
✔ the block under the caret is the teammate's too, and undo brings back yours (3.231386ms)
✔ typing mid-flight: the merge is not applied and the base does not move (1.316362ms)
✔ a merge the editor cannot represent stops after three tries (5.159481ms)
✔ a conflict is shown, locks the editor's own commits, and Resolve settles it (1.693381ms)
✔ leaving: a conflict stays with the choice; a failed flush offers Leave anyway; a stored draft leaves (2.109052ms)
✔ a stale tab shows the newer draft, offered, and never overwrites it (1.318776ms)
✔ the first scratch commit: empty creates nothing, then one page, then drafts on it (1.048124ms)
✔ noBase and gone lead to the existing choices (0.991078ms)
✔ a commit that merged is applied when nothing was typed since (1.190128ms)
✔ back from the cache: nothing unsaved reloads, unsaved text autosaves at once (8.237433ms)
✔ an own draft committed meanwhile goes on as a new draft (1.859349ms)
✔ a reload keeps a stored draft; unsent text still commits (0.793572ms)
✔ a page deleted mid-edit: what is typed is still stored as the draft, and nothing commits (H1) (1.271429ms)
✔ an offered draft committed in another tab: typing goes on as a new draft (H1) (9.167658ms)
✔ a commit reply without a revision is not a commit; an emptied day starts afresh (H2) (1.100712ms)
✔ Resolve stores what was typed first, and takes no typing until its answer is applied (M1) (9.508719ms)
✔ closing with a choice open, or commits held, still writes the text, never commits (M2) (1.553963ms)
✔ closing inside the settling window sends the loaded version with settling=1 (M3) (0.360589ms)
✔ a clean merge not applied because of typing still ends the choice on show (M4) (0.993112ms)
✔ settling finds the draft committed with a teammate's text: a close still writes (M-A) (0.473057ms)
✔ settling finds another tab's newer draft: the tab shows it before any typing (0.87835ms)
✔ a page deleted before the first autosave: the text is offered as a scratch page, and a close makes one (M-B) (0.656337ms)
✔ an autosave that never answered but landed: its 409 keeps the typing since (L3) (0.664854ms)
✔ marks: em outside strong, bold reopened around italics, edges outside (6.023143ms)
✔ marks close before code, links and atoms, and reopen after (0.457529ms)
✔ untouched blocks and atoms re-emit their source; edited atoms are written from attributes (6.901334ms)
✔ empty blocks are written as nothing (2.863992ms)
✔ an unclosed fence that is no longer last gets its closing fence (1.560715ms)
✔ the structure check puts Join's seam where a kept one would merge two blocks (2.518883ms)
✔ prepareSave adopts the parse when no seam or rewrite can save the document (2.911201ms)
✔ reparse: typed emphasis becomes a mark, "- " after a break becomes an item (3.402683ms)
✔ a trailing hard break stays on screen and is written as nothing (0.983596ms)
✔ the reparse waits while an IME is composing (1.445432ms)
✔ copied blocks paste with their bytes and seams; a cut and paste gives the body back (5.64981ms)
✔ a forged x-mapa slice is refused, and text from outside is read as Markdown (0.640999ms)
✔ rebuild changes origins only, outside undo history (3.419944ms)
✔ applyBody takes a teammate's block, keeps the caret, and ends untouched (2.634747ms)
✔ a block whose context changed is written again: a task toggled, a bullet, a quote (1.933908ms)
✔ a duplicate ^id typed above its holder never takes the id from it (0.778425ms)
✔ a copy-dragged block is reparsed, and says what its Markdown says (2.626362ms)
✔ a history command that throws is refused, never thrown (4.342505ms)
✔ an image re-emits its source, and an edited alt changes only its span (1.121451ms)
✔ a paste whose image copy is refused says why and pastes nothing (16.871769ms)
✔ a line of image openers reads in linear time (132.066017ms)
✔ a line of shared link address reads in linear time (12.838878ms)
✔ a line of shared web address reads in linear time (57.878921ms)
✔ one rename at a time, from either field (4.893708ms)
✔ an empty or unchanged title sends nothing (0.255644ms)
✔ a refusal keeps what was typed, and the title (1.751168ms)
✔ the pending state holds for the busy rule (8.425341ms)
✔ a failed POST says so and keeps the title (2.550752ms)
✔ Update links posts the confirm page's POST (0.336404ms)
✔ clean is CleanTitle's whitespace rule (0.149698ms)
✔ the saver's base follows a rename made over it, and only that (0.34499ms)
✔ closing sends the rename as one keepalive POST (13.943026ms)
✔ the port answers every shared case as typeddate.go does (5.192023ms)
✔ numbers follow the locale: 12/11 is November in en-IE, December in en-US (0.296711ms)
✔ M6: several files land in the order they were chosen (50.334957ms)
✔ M5: one Backspace before the box keeps the image where the box is (12.859086ms)
✔ M5: undoing text typed just before the box keeps the upload (13.461541ms)
✔ L12: a failed upload an undo takes away does not stall the next (13.723229ms)
✔ M4: Replace… keeps the old image until the new one is in, and its alt (14.964401ms)
✔ M3 and N1: text wins, except over a picture copied from a page (1.74658ms)
✔ N2: a JPEG over 10 MB is scaled before its size is checked (4.065893ms)
✔ a drag whose anchor the document no longer reaches selects to its end (5.950428ms)
ℹ tests 143
ℹ suites 0
ℹ pass 143
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 8889.74416
=== vet ===
go vet ./...
go vet -tags browser ./internal/mapatest/
=== fmt ===
=== code ===
go tool rastrillo budget code
The base has no .rastrillo/code.txt: skipping the check that records only go down.
budget code: within the limits.
=== test ===
CGO_ENABLED=0 go test ./...
? amadan.net/oficina/mapa/cmd/mapa [no test files]
ok amadan.net/oficina/mapa/internal/mapa 3.529s
ok amadan.net/oficina/mapa/internal/mapa/emoji (cached)
? amadan.net/oficina/mapa/internal/mapa/icons [no test files]
ok amadan.net/oficina/mapa/internal/mapa/imagefile (cached)
ok amadan.net/oficina/mapa/internal/mapa/locale (cached)
ok amadan.net/oficina/mapa/internal/mapa/markup 0.131s
ok amadan.net/oficina/mapa/internal/mapa/notionmd 0.340s
ok amadan.net/oficina/mapa/internal/mapa/seal (cached)
ok amadan.net/oficina/mapa/internal/mapatest 13.897s
? amadan.net/oficina/mapa/scripts/mutate [no test files]
? amadan.net/oficina/mapa/scripts/preview [no test files]
=== migration-check ===
go tool rastrillo migration check
rastrillo migration check: models and migrations agree
=== credits-check ===
python3 scripts/credits.py --check
credits: checked
AGENTS.mdLoading diff…
MakefileLoading diff…
copy-review/columns/result.jsonLoading diff…
copy-review/columns/strings.jsonLoading diff…
docs/superpowers/specs/2026-11-22-mapa-columns-icons.mdLoading diff…
editor/clipboard.mjsLoading diff…
editor/columns.mjsLoading diff…
editor/columns.test.mjsLoading diff…
editor/commands.mjsLoading diff…
editor/fidelity.mjsLoading diff…
editor/fidelity.test.mjsLoading diff…
editor/fromMarkdown.mjsLoading diff…
editor/keys.mjsLoading diff…
editor/maketeam.mjsLoading diff…
editor/markup.mjsLoading diff…
editor/page.mjsLoading diff…
editor/parity.test.mjsLoading diff…
editor/saver.mjsLoading diff…
editor/saver.test.mjsLoading diff…
editor/schema.mjsLoading diff…
editor/serialize.mjsLoading diff…
editor/slash.mjsLoading diff…
internal/mapa/credits/assets.jsonLoading diff…
internal/mapa/diff.goLoading diff…
internal/mapa/funcs.goLoading diff…
internal/mapa/grammar.goLoading diff…
internal/mapa/handlers_edit.goLoading diff…
internal/mapa/handlers_history.goLoading diff…
internal/mapa/markers.goLoading diff…
internal/mapa/markup/blocks.goLoading diff…
internal/mapa/markup/columns.goLoading diff…
internal/mapa/markup/columns_test.goLoading diff…
internal/mapa/markup/golden_test.goLoading diff…
internal/mapa/markup/merge.goLoading diff…
internal/mapa/markup/merge_columns.goLoading diff…
internal/mapa/markup/merge_columns_test.goLoading diff…
internal/mapa/markup/pandoc_test.goLoading diff…
internal/mapa/markup/render.goLoading diff…
internal/mapa/markup/settle.goLoading diff…
internal/mapa/markup/testdata/corpus/columns.jsonLoading diff…
internal/mapa/markup/testdata/corpus/import.jsonLoading diff…
internal/mapa/markup/testdata/editor.jsonLoading diff…
internal/mapa/markup/testdata/golden.jsonLoading diff…
internal/mapa/markup/testdata/pandoc.jsonLoading diff…
internal/mapa/mentions.goLoading diff…
internal/mapa/menus.goLoading diff…
internal/mapa/notionmd/blocks.goLoading diff…
internal/mapa/notionmd/fixtures_blocks_test.goLoading diff…
internal/mapa/notionmd/mapper.goLoading diff…
internal/mapa/notionmd/neutral.goLoading diff…
internal/mapa/notionmd/parts.goLoading diff…
internal/mapa/notionmd/testdata/fixtures/columns-empty.jsonLoading diff…
internal/mapa/notionmd/testdata/fixtures/columns-fence-text.jsonLoading diff…
internal/mapa/notionmd/testdata/fixtures/columns-five.jsonLoading diff…
internal/mapa/notionmd/testdata/fixtures/columns-nested.jsonLoading diff…
internal/mapa/notionmd/testdata/fixtures/columns-one.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-empty.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-empty.mdLoading diff…
internal/mapa/notionmd/testdata/golden/columns-fence-text.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-fence-text.mdLoading diff…
internal/mapa/notionmd/testdata/golden/columns-five.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-five.mdLoading diff…
internal/mapa/notionmd/testdata/golden/columns-nested.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-nested.mdLoading diff…
internal/mapa/notionmd/testdata/golden/columns-one.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns-one.mdLoading diff…
internal/mapa/notionmd/testdata/golden/columns.jsonLoading diff…
internal/mapa/notionmd/testdata/golden/columns.mdLoading diff…
internal/mapa/private.goLoading diff…
internal/mapa/share.goLoading diff…
internal/mapa/static/editor.3c106a8d6eac2ca9.jsLoading diff…
internal/mapa/static/editor.bad1b29c273b6a86.jsLoading diff…
internal/mapa/static/prose.cssLoading diff…
internal/mapa/templates/blocks.htmlLoading diff…
internal/mapa/templates/conflict.htmlLoading diff…
internal/mapa/templates/frame.htmlLoading diff…
internal/mapa/templates/partials.htmlLoading diff…
internal/mapa/templates/share.htmlLoading diff…
internal/mapa/testdata/notion/every-block.mdLoading diff…
internal/mapa/versions.goLoading diff…
internal/mapa/versions_columns.goLoading diff…
internal/mapa/views.goLoading diff…
internal/mapatest/columns_browser_test.goLoading diff…
internal/mapatest/columns_test.goLoading diff…
internal/mapatest/gate8_test.goLoading diff…
internal/mapatest/harness_test.goLoading diff…
internal/mapatest/saving_test.goLoading diff…
scripts/mutate/columns.goLoading diff…
scripts/mutate/main.goLoading diff…
scripts/mutate/mutations_mapper.goLoading diff…