oficina / mapa Public

Mapa page icons and banners (columns and icons spec, phase 1)

The spec (docs/superpowers/specs/2026-11-22-mapa-columns-icons.md,
approved: Fable APPROVE on revision 3, Paul's go 2026-11-22 with the
recommended answers) and its first phase. A team page's icon (one RGI
emoji or a small Mapa image) and banner (a fixed-height band at a stored
position) live in its sealed record and change through a styled
revision holding the same body, drafts carried. Icons are drawn
wherever a title is: the title row, the sidebar, chips (Go and the
editor, held by L4), the Links panel, search, cmd-K, All pages and the
tab. A record's references are its body's and its look's images, so the
attach and retention rules cover them; Remove from Mapa takes an image
out of a look. File gains Icon and banner…, a page-on-screen verb. The
look page works with script off; look.js adds the picker, uploads and
Reposition. Small images are cached after the read rule. Gates
LOOK1-LOOK12, three mutations, gate 8 drives the route; Luna's copy
applied; Fable's build review answered and approved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from feat/icons-banners into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 5276962d2b330167f8c7f940ebb6365b3fb1a85d parent ad9cf5a
71 files changed, +9,434 −96
  • AGENTS.md +13 −0
  • copy-review/looks/result.json +294 −0
  • copy-review/looks/strings.json +434 −0
  • docs/superpowers/specs/2026-11-22-mapa-columns-icons.md +760 −0
  • editor/chips.mjs +19 −3
  • editor/resolutions.mjs +1 −1
  • internal/mapa/aliases.go +1 −2
  • internal/mapa/around.go +8 −1
  • internal/mapa/bodies.go +5 −3
  • internal/mapa/credits/assets.json +1 −1
  • internal/mapa/emoji/LICENSE-UNICODE +41 −0
  • internal/mapa/emoji/emoji-test.txt +5,331 −0
  • internal/mapa/emoji/emoji.go +117 −0
  • internal/mapa/emoji/emoji_test.go +42 −0
  • internal/mapa/emoji_route.go +32 −0
  • internal/mapa/funcs.go +4 −0
  • internal/mapa/graph.go +2 −1
  • internal/mapa/handlers_history.go +6 −0
  • internal/mapa/handlers_look.go +203 −0
  • internal/mapa/handlers_pages.go +5 −3
  • internal/mapa/history_view.go +14 −1
  • internal/mapa/images.go +2 −0
  • internal/mapa/images_attach.go +8 −9
  • internal/mapa/images_cache.go +85 −0
  • internal/mapa/images_list.go +35 −0
  • internal/mapa/images_read.go +10 −1
  • internal/mapa/images_remove.go +8 −0
  • internal/mapa/images_sweep.go +1 −0
  • internal/mapa/looks.go +165 −0
  • internal/mapa/looks_history.go +90 −0
  • internal/mapa/looks_images.go +124 −0
  • internal/mapa/looks_render.go +107 −0
  • internal/mapa/looks_test.go +298 −0
  • internal/mapa/markup/chips.go +20 −4
  • internal/mapa/markup/golden_test.go +18 −1
  • internal/mapa/markup/render.go +11 −0
  • internal/mapa/markup/testdata/golden.json +7 −7
  • internal/mapa/mentions.go +1 −1
  • internal/mapa/menus.go +2 −0
  • internal/mapa/menus_test.go +4 −4
  • internal/mapa/pages.go +1 −1
  • internal/mapa/rank.go +1 −1
  • internal/mapa/recent.go +1 −1
  • internal/mapa/render.go +2 −2
  • internal/mapa/search.go +7 −5
  • internal/mapa/side.go +3 −0
  • internal/mapa/static/{editor.f090d9073767ee52.js => editor.3c106a8d6eac2ca9.js} +19 −19
  • internal/mapa/static/frame.css +147 −0
  • internal/mapa/static/look.js +394 −0
  • internal/mapa/static/mapa.js +17 −4
  • internal/mapa/static/prose.css +22 −0
  • internal/mapa/store.go +7 −0
  • internal/mapa/templates/frame.html +3 −3
  • internal/mapa/templates/look.html +48 −0
  • internal/mapa/templates/page.html +2 −1
  • internal/mapa/templates/pages.html +1 −1
  • internal/mapa/templates/partials.html +20 −3
  • internal/mapa/templates/revision.html +2 −1
  • internal/mapa/templates/search.html +2 −2
  • internal/mapa/templates/shell.html +2 −0
  • internal/mapa/today.go +1 −0
  • internal/mapa/verbs.go +6 −4
  • internal/mapa/versions.go +2 −0
  • internal/mapa/views.go +8 −2
  • internal/mapatest/filemenu_test.go +6 −3
  • internal/mapatest/gate8_test.go +4 −0
  • internal/mapatest/looks_browser_test.go +172 −0
  • internal/mapatest/looks_test.go +154 −0
  • internal/mapatest/plaintext_scan_test.go +6 −0
  • scripts/mutate/looks.go +44 −0
  • scripts/mutate/main.go +1 −0

CI passed — run details

CI log
=== editor ===
cd editor && npm ci --no-audit --no-fund --loglevel=error

added 16 packages in 316ms
cd editor && node build-bundles.mjs
wrote internal/mapa/static/editor.3c106a8d6eac2ca9.js (354648 bytes, 111.4KB gzipped; L12 budget 120KB)
cd editor && node --test
✔ a badge is named for what it does, starting with its visible word (2.632426ms)
✔ first words stop at five words or forty characters (0.208156ms)
✔ the field keeps one trimmed line, without brackets (0.28021ms)
✔ the field holds at most MaxAlt bytes, cut at a character (1.164056ms)
✔ days and weeks move across months and years (1.484851ms)
✔ a month keeps the day, or takes the month's last (0.293644ms)
✔ the grid is six weeks from Monday, as the month calendar draws it (1.0741ms)
✔ the grid starts the week where the locale does (0.848722ms)
✔ the keys move a day, a week, a month and a year (0.353174ms)
✔ the picked day is the chip [[ makes for a date (18.043875ms)
✔ Insert → Today's date still puts today in at once (2.444048ms)
✔ / offers Date, the picker, and Today's date beside it (0.334309ms)
✔ after a ! the chip goes in after a space, never as an embed (3.871301ms)
✔ where the Markdown would read the chip differently, it is refused (3.62784ms)
✔ over a selection the chip goes after it and the words stay (3.419876ms)
✔ today is the day in the viewer's zone (18.718074ms)
✔ every offered locale has cases (1.150691ms)
✔ dates.mjs writes every date Go writes, byte for byte (5.174276ms)
✔ a chip, the month and the week, in three locales (0.524151ms)
✔ dates.json is what ICU gives, byte for byte (529.010101ms)
✔ L1: mounting then serialising gives cleanBody(body), byte for byte (80.89224ms)
ℹ 871 bodies
✔ L1: mounting a stored body adds nothing, and saving it writes nothing new (101.299904ms)
✔ L2: one edited block changes only that block's bytes; undo gives the body back (130.584533ms)
ℹ 858 single-block edits
✔ L2: inserting or deleting a block changes bytes only at the new seams, by Join (137.396331ms)
ℹ 866 inserts, 817 deletes
✔ L3: seeded edits keep the document and its Markdown saying the same thing (4319.667219ms)
ℹ 20904 edits over 871 bodies
✔ L3: Link to a page makes exactly one chip, and changes nothing else (1107.032051ms)
ℹ 4532 links over 871 bodies; refused: {"A page link can’t hold another link or a line break. Select plain words.":918,"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 (1111.062643ms)
ℹ over 871 bodies: {"inserted":5158,"spaced":23,"refused":45,"unstable":9}
✔ linear: trailing spaces (29.670323ms)
✔ linear: trailing whitespace (20.745942ms)
✔ linear: unclosed web links (41.375266ms)
✔ linear: web links with no address (48.575575ms)
✔ linear: unclosed wiki links (36.887733ms)
✔ linear: unclosed embeds (28.843472ms)
✔ linear: closes only (10.053254ms)
✔ the selected words become the chip's shown text (14.68298ms)
✔ words that are the title make a plain [[Title]] (5.390035ms)
✔ spaces at the selection's edges stay outside the chip (1.681334ms)
✔ a date makes a date link, in a heading, an item and a quote (9.577653ms)
✔ bold words lose their bold: a chip carries no marks in Mapa's Markdown (1.898466ms)
✔ only the linked block's bytes change, and undo gives the body back (2.615705ms)
✔ a selection across blocks, over a chip or a break, or of brackets is refused (2.133743ms)
✔ a target the words cannot be linked to as typed is refused (0.312559ms)
✔ ⌘L: over a selection it opens Page link; with none it types [[; in code it does nothing (2.642916ms)
✔ web-linked words are refused: the address would be lost (review M4) (1.037883ms)
✔ words whose Markdown would read otherwise are refused (review M3) (3.58438ms)
✔ ⌘A then ⌘L says why, instead of doing nothing (review low 1) (0.513061ms)
✔ linkCheck says why it refuses (review low 2) (1.867581ms)
✔ golden file has bodies (1.154228ms)
✔ markup.mjs parses every body into Go's blocks, byte offsets and all (34.980401ms)
✔ markup.mjs strips and spans every block as Go does (66.535515ms)
✔ the schema's toDOM draws every body as Go renders it (79.039618ms)
✔ emphasis draws the four pinned outputs (16.378912ms)
✔ a body ends in the editor's empty paragraph (0.347073ms)
✔ the editor labels date chips as Go does, in every locale L4 holds (9.834769ms)
✔ a POST that never answers is aborted after the timeout (23.017028ms)
✔ a keepalive POST carries no signal, and an answer clears the timer (1.230239ms)
✔ autosave sends only what differs, and the tab owns the draft it wrote (14.579898ms)
✔ an offered draft never commits by itself; Save commits it (2.184016ms)
✔ reload, then close: sessionStorage says the draft is this tab's own (1.071285ms)
✔ closing carries text not yet sent, and the cap leaves it out (45.156362ms)
✔ clean rebase: applied, the caret survives, the base moves by the rebase POST (4.979092ms)
✔ the block under the caret is the teammate's too, and undo brings back yours (8.336424ms)
✔ typing mid-flight: the merge is not applied and the base does not move (8.884328ms)
✔ a merge the editor cannot represent stops after three tries (8.121235ms)
✔ a conflict is shown, locks the editor's own commits, and Resolve settles it (3.3419ms)
✔ leaving: a conflict stays with the choice; a failed flush offers Leave anyway; a stored draft leaves (9.056758ms)
✔ a stale tab shows the newer draft, offered, and never overwrites it (1.887977ms)
✔ the first scratch commit: empty creates nothing, then one page, then drafts on it (2.242334ms)
✔ noBase and gone lead to the existing choices (7.00651ms)
✔ a commit that merged is applied when nothing was typed since (1.248433ms)
✔ back from the cache: nothing unsaved reloads, unsaved text autosaves at once (6.647475ms)
✔ an own draft committed meanwhile goes on as a new draft (1.460976ms)
✔ a reload keeps a stored draft; unsent text still commits (0.494566ms)
✔ a page deleted mid-edit: what is typed is still stored as the draft, and nothing commits (H1) (0.909885ms)
✔ an offered draft committed in another tab: typing goes on as a new draft (H1) (2.288729ms)
✔ a commit reply without a revision is not a commit; an emptied day starts afresh (H2) (1.050526ms)
✔ Resolve stores what was typed first, and takes no typing until its answer is applied (M1) (3.545738ms)
✔ closing with a choice open, or commits held, still writes the text, never commits (M2) (1.529043ms)
✔ closing inside the settling window sends the loaded version with settling=1 (M3) (0.408798ms)
✔ a clean merge not applied because of typing still ends the choice on show (M4) (1.058661ms)
✔ settling finds the draft committed with a teammate's text: a close still writes (M-A) (0.641609ms)
✔ settling finds another tab's newer draft: the tab shows it before any typing (0.90119ms)
✔ a page deleted before the first autosave: the text is offered as a scratch page, and a close makes one (M-B) (0.783662ms)
✔ an autosave that never answered but landed: its 409 keeps the typing since (L3) (0.979514ms)
✔ marks: em outside strong, bold reopened around italics, edges outside (8.346963ms)
✔ marks close before code, links and atoms, and reopen after (0.591145ms)
✔ untouched blocks and atoms re-emit their source; edited atoms are written from attributes (14.042614ms)
✔ empty blocks are written as nothing (3.781786ms)
✔ an unclosed fence that is no longer last gets its closing fence (2.185358ms)
✔ the structure check puts Join's seam where a kept one would merge two blocks (2.729747ms)
✔ prepareSave adopts the parse when no seam or rewrite can save the document (8.209609ms)
✔ reparse: typed emphasis becomes a mark, "- " after a break becomes an item (3.00643ms)
✔ a trailing hard break stays on screen and is written as nothing (0.626029ms)
✔ the reparse waits while an IME is composing (1.123071ms)
✔ copied blocks paste with their bytes and seams; a cut and paste gives the body back (3.328836ms)
✔ a forged x-mapa slice is refused, and text from outside is read as Markdown (0.852799ms)
✔ rebuild changes origins only, outside undo history (1.471876ms)
✔ applyBody takes a teammate's block, keeps the caret, and ends untouched (1.620582ms)
✔ a block whose context changed is written again: a task toggled, a bullet, a quote (1.888118ms)
✔ a duplicate ^id typed above its holder never takes the id from it (1.826414ms)
✔ a copy-dragged block is reparsed, and says what its Markdown says (1.139471ms)
✔ a history command that throws is refused, never thrown (6.726369ms)
✔ an image re-emits its source, and an edited alt changes only its span (1.426473ms)
✔ a paste whose image copy is refused says why and pastes nothing (17.579475ms)
✔ a line of image openers reads in linear time (90.133478ms)
✔ a line of shared link address reads in linear time (16.117567ms)
✔ a line of shared web address reads in linear time (83.288218ms)
✔ one rename at a time, from either field (1.961253ms)
✔ an empty or unchanged title sends nothing (0.164675ms)
✔ a refusal keeps what was typed, and the title (0.178531ms)
✔ the pending state holds for the busy rule (6.122531ms)
✔ a failed POST says so and keeps the title (0.503132ms)
✔ Update links posts the confirm page's POST (0.366168ms)
✔ clean is CleanTitle's whitespace rule (0.176977ms)
✔ the saver's base follows a rename made over it, and only that (0.412604ms)
✔ closing sends the rename as one keepalive POST (2.054286ms)
✔ the port answers every shared case as typeddate.go does (8.522909ms)
✔ numbers follow the locale: 12/11 is November in en-IE, December in en-US (0.317999ms)
✔ M6: several files land in the order they were chosen (40.521834ms)
✔ M5: one Backspace before the box keeps the image where the box is (11.569352ms)
✔ M5: undoing text typed just before the box keeps the upload (11.941332ms)
✔ L12: a failed upload an undo takes away does not stall the next (14.561855ms)
✔ M4: Replace… keeps the old image until the new one is in, and its alt (16.459822ms)
✔ M3 and N1: text wins, except over a picture copied from a page (2.275434ms)
✔ N2: a JPEG over 10 MB is scaled before its size is checked (13.913634ms)
✔ a drag whose anchor the document no longer reaches selects to its end (6.625012ms)
ℹ tests 126
ℹ suites 0
ℹ pass 126
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7171.453316
=== 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.741s
ok  	amadan.net/oficina/mapa/internal/mapa/emoji	0.007s
?   	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.125s
ok  	amadan.net/oficina/mapa/internal/mapa/notionmd	0.327s
ok  	amadan.net/oficina/mapa/internal/mapa/seal	(cached)
ok  	amadan.net/oficina/mapa/internal/mapatest	13.599s
?   	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.md

Loading diff…

copy-review/looks/result.json

Loading diff…

copy-review/looks/strings.json

Loading diff…

docs/superpowers/specs/2026-11-22-mapa-columns-icons.md

Loading diff…

editor/chips.mjs

Loading diff…

editor/resolutions.mjs

Loading diff…

internal/mapa/aliases.go

Loading diff…

internal/mapa/around.go

Loading diff…

internal/mapa/bodies.go

Loading diff…

internal/mapa/credits/assets.json

Loading diff…

internal/mapa/emoji/LICENSE-UNICODE

Loading diff…

internal/mapa/emoji/emoji-test.txt

Loading diff…

internal/mapa/emoji/emoji.go

Loading diff…

internal/mapa/emoji/emoji_test.go

Loading diff…

internal/mapa/emoji_route.go

Loading diff…

internal/mapa/funcs.go

Loading diff…

internal/mapa/graph.go

Loading diff…

internal/mapa/handlers_history.go

Loading diff…

internal/mapa/handlers_look.go

Loading diff…

internal/mapa/handlers_pages.go

Loading diff…

internal/mapa/history_view.go

Loading diff…

internal/mapa/images.go

Loading diff…

internal/mapa/images_attach.go

Loading diff…

internal/mapa/images_cache.go

Loading diff…

internal/mapa/images_list.go

Loading diff…

internal/mapa/images_read.go

Loading diff…

internal/mapa/images_remove.go

Loading diff…

internal/mapa/images_sweep.go

Loading diff…

internal/mapa/looks.go

Loading diff…

internal/mapa/looks_history.go

Loading diff…

internal/mapa/looks_images.go

Loading diff…

internal/mapa/looks_render.go

Loading diff…

internal/mapa/looks_test.go

Loading diff…

internal/mapa/markup/chips.go

Loading diff…

internal/mapa/markup/golden_test.go

Loading diff…

internal/mapa/markup/render.go

Loading diff…

internal/mapa/markup/testdata/golden.json

Loading diff…

internal/mapa/mentions.go

Loading diff…

internal/mapa/menus.go

Loading diff…

internal/mapa/menus_test.go

Loading diff…

internal/mapa/pages.go

Loading diff…

internal/mapa/rank.go

Loading diff…

internal/mapa/recent.go

Loading diff…

internal/mapa/render.go

Loading diff…

internal/mapa/search.go

Loading diff…

internal/mapa/side.go

Loading diff…

internal/mapa/static/{editor.f090d9073767ee52.js => editor.3c106a8d6eac2ca9.js}

Loading diff…

internal/mapa/static/frame.css

Loading diff…

internal/mapa/static/look.js

Loading diff…

internal/mapa/static/mapa.js

Loading diff…

internal/mapa/static/prose.css

Loading diff…

internal/mapa/store.go

Loading diff…

internal/mapa/templates/frame.html

Loading diff…

internal/mapa/templates/look.html

Loading diff…

internal/mapa/templates/page.html

Loading diff…

internal/mapa/templates/pages.html

Loading diff…

internal/mapa/templates/partials.html

Loading diff…

internal/mapa/templates/revision.html

Loading diff…

internal/mapa/templates/search.html

Loading diff…

internal/mapa/templates/shell.html

Loading diff…

internal/mapa/today.go

Loading diff…

internal/mapa/verbs.go

Loading diff…

internal/mapa/versions.go

Loading diff…

internal/mapa/views.go

Loading diff…

internal/mapatest/filemenu_test.go

Loading diff…

internal/mapatest/gate8_test.go

Loading diff…

internal/mapatest/looks_browser_test.go

Loading diff…

internal/mapatest/looks_test.go

Loading diff…

internal/mapatest/plaintext_scan_test.go

Loading diff…

scripts/mutate/looks.go

Loading diff…

scripts/mutate/main.go

Loading diff…