Review L4, L5, L10, L12 and L1's wording: build notes and gate wording corrected; task boxes get a plain content fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Fable's Phase 1 review (6e3aa6b): note 2 no longer claims only mis-nested emphasis changed (430 of 215k fuzzed *** spans changed meaning); note 12 says pins are fixed-length; notes 21-23 record the Colophon, which paths use the scoped accessor, and the glass/sidebar tint waiting for estilo's [estilo-float]; L5 allows prosemirror-view's separator img; L6's wording matches the code; prose.css gives task boxes content:"" before the alt-text form.
2 files changed,
+10
−6
docs/superpowers/specs/2026-11-14-mapa-level-up.md+8 −6internal/mapa/static/prose.css+2 −0
CI cancelled — superseded by a newer push — run details
CI log
=== editor === cd editor && npm ci --no-audit --no-fund --loglevel=error added 16 packages in 911ms cd editor && node build-bundles.mjs wrote internal/mapa/static/editor.9c9edc5536b1d844.js (36245 bytes, 11.3KB gzipped; L12 budget 120KB) cd editor && node --test ✔ golden file has bodies (1.167843ms) ✔ markup.mjs parses every body into Go's blocks, byte offsets and all (51.256695ms) ✔ markup.mjs strips and spans every block as Go does (104.62811ms) ✔ the schema's toDOM draws every body as Go renders it (104.605378ms) ✔ emphasis draws the four pinned outputs (22.927425ms) ✔ a body ends in the editor's empty paragraph (0.440313ms) ℹ tests 6 ℹ suites 0 ℹ pass 6 ℹ fail 0 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 ℹ duration_ms 489.745434 === 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 0.986s ? amadan.net/oficina/mapa/internal/mapa/icons [no test files] ok amadan.net/oficina/mapa/internal/mapa/markup (cached) ok amadan.net/oficina/mapa/internal/mapa/seal (cached) ok amadan.net/oficina/mapa/internal/mapatest 17.408s ? 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 amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/specs/2026-11-14-mapa-level-up.md b/docs/superpowers/specs/2026-11-14-mapa-level-up.md| index be4ad28..60f3d14 100644 |
| --- a/docs/superpowers/specs/2026-11-14-mapa-level-up.md |
| +++ b/docs/superpowers/specs/2026-11-14-mapa-level-up.md |
| @@ -757,7 +757,7 @@ Each quirk gets a WebKit case in `make browser` where possible, and a check by h |
| ### The page |
| -- **L5, no shift (browser).** Runs in Chromium and WebKit, light and dark, at 1440px, 1000px and 390px. It covers a page **with and without a draft**. |
| +- **L5, no shift (browser).** Runs in Chromium and WebKit, light and dark, at 1440px, 1000px and 390px. It covers a page **with and without a draft**. It allows for prosemirror-view's `<img class="ProseMirror-separator">`, which the view inserts before the trailing break after a non-editable atom such as a chip, and which the server does not draw (review L5). |
| - Every block's box is identical before and after mount. |
| - No `layout-shift` entry is recorded from first paint through mount. |
| - Cookies are honoured at first paint. |
| @@ -769,7 +769,7 @@ Each quirk gets a WebKit case in `make browser` where possible, and a check by h |
| - ⌘K's groups and its date row; |
| - `[[` suggestions, `/links/resolve`, and the editor's data island; |
| - history summaries. |
| - Every one of those read paths goes through **one scoped accessor** on the index. `make mutate` gains a mutation that removes the scope from that accessor, and the gate must catch it. |
| + The level-up's new read paths (the panel, the map, the dots, the sidebar's lists, `/links/resolve`, the island) go through **one scoped accessor** on the index. ⌘K, `[[` suggestions, backlinks and mentions keep the index's own scoped partitions, which gate 1's existing mutations already cover (build note 22). `make mutate` gains two mutations: one strips the accessor's scope, and one drops only its guard. Each must be caught. |
| - **L7, nothing written without a write.** This extends gate 10. A dump of every table's rows is hashed before and after; the file's bytes are not compared, because the WAL and checkpoints move them. The hash must be unchanged for: |
| - every new GET: panel and history fragments, the calendar month, `/search/suggest`'s date row; |
| - `POST /links/resolve`, which writes nothing; |
| @@ -842,7 +842,7 @@ Each quirk gets a WebKit case in `make browser` where possible, and a check by h |
| - Well-formed emphasis HTML. |
| - The empty-body placeholder. |
| -**The scoped accessor.** One function on the index returns what the viewer may see: team pages plus the viewer's own pages. Every new read path uses it: |
| +**The scoped accessor.** One function on the index returns what the viewer may see: team pages plus the viewer's own pages. Its own guard counts: a test asks it for another person's page by id, and a mutation that drops the guard must fail it (review L1). Every *new* read path uses it: |
| - the Links panel and the map; |
| - the week and month dots; |
| - Recently edited; |
| @@ -1038,7 +1038,7 @@ Each phase ends in review on its branch. Nothing is merged or deployed from here |
| Phase 1's choices where this spec was silent, or where the build chose differently. Each is the smallest reasonable choice. A reviewer who disagrees changes the code and this list together. |
| 1. **Step 0 came with the renderer.** The parity spike and §5's renderer changes landed together, because L4 is what says the HTML is final. 758 corpus bodies agree byte for byte across Go's `Render`, `markup.mjs` and `toDOM`. `make corpus-local DIR=…/oficina` checked 5,537 Markdown files from the Oficina repos in place, and all agree. The bundle is 11.3KB gzipped against L12's 120KB; no template loads it until Phase 2. |
| -2. **Emphasis is drawn the way the editor stores it.** Besides pinning `***x***`, Go now draws emphasis as marks turning on and off, so it nests as ProseMirror would. Every well-formed output in the corpus is unchanged. What changes are cases that came out mis-nested before: `*a **b***`, strong inside strong, and adjacent code spans or same-address links, which now merge. The golden file records every case. |
| +2. **Emphasis is drawn the way the editor stores it.** Besides pinning `***x***`, Go now draws emphasis as marks turning on and off, so it nests as ProseMirror would. Every well-formed output in the corpus is unchanged. The changed cases include `*a **b***`, strong inside strong, and adjacent code spans or same-address links, which now merge. Not every change only repairs bad markup, though (review L4): fuzzing 215,000 `***` spans changed what 430 of them mean, for example which words read as bold. The golden file records every corpus case. |
| 3. **The view's trailing break is drawn by the server.** ProseMirror adds `<br class="ProseMirror-trailingBreak">` to a textblock that is empty or ends in a chip, a hard break or a newline. The server does the same, so mounting adds nothing. |
| 4. **A list item may hold more than one nested list.** §6.3 says one, but a change of kind at a nested depth makes two. |
| 5. **Task boxes are an attribute**, `mapa-task="open|done"`, drawn by CSS, not an `<input>`. A `toDOM` content hole cannot sit beside an input. |
| @@ -1048,7 +1048,7 @@ Phase 1's choices where this spec was silent, or where the build chose different |
| 9. **The shell is estilo's bar plus Mapa's own sidebar,** not rastrillo's `rst-shell-sidebar`. Places are the bar's `Nav`, which estilo shows only in its Menu sheet below 800px; Mapa's CSS hides the bar's own copy from 800px. |
| 10. **The fold is two submit buttons,** one per state, and CSS shows the one that fits the screen. So it works with scripts off and with no cookie. `POST /view/sidebar` and `/view/links` set cookies, write no row and log no event; gate 8 drives them as view-only routes. Their `return` must be a local path. |
| 11. **Recently edited leaves out bulk edits by transaction:** any transaction whose events share one actor and one `at` and hold more than one `edited` (§3.2). It reads at most the person's last 200 qualifying events. |
| -12. **Pins** are a sealed JSON list of page ids in `members.sealed_pins` (migration 0003), at most 12, newest first. The event is `pins` on the member. |
| +12. **Pins** are sealed in `members.sealed_pins` (migration 0003): at most 12 page ids, newest first. The plaintext is always 12 eight-byte slots, empty ones zero (review L11), so the ciphertext's length does not say how many pages anyone pinned. The event is `pins` on the member. |
| 13. **Rename still lands on the existing Update links confirm page** (`/p/{id}/links`), not an in-page notice. It was already a confirm page with the honest count, and gate 1 compares it as one. |
| 14. **The kicker's "Edited by"** reads the current revision's plaintext row, and names a teammate by their address's local part. History and presence do the same. |
| 15. **The Links panel's foot fallback stays on phones,** beside the sheet. The sheet is a script enhancement (`links.js`), not a modal `<dialog>`, so the lists are reachable with scripts off. |
| @@ -1066,7 +1066,9 @@ Phase 1's choices where this spec was silent, or where the build chose different |
| - The date row comes first, and that day's note is not repeated in Your notes. |
| 19. **estilo's stacked title was measured short in Chromium,** clipping a title's last letters ("Onboardin"). It was fixed in estilo (main `4d5b935`), and Mapa is re-pinned to it. In the Chromium preview, Onboarding, Brightwater Labs and Halden Robotics now fit: each field's clientWidth equals its scrollWidth. |
| 20. **The gate-7 walk had a race,** which the level-up's slower pages exposed: ⌘K could show the answer to "Acm" before "Acme". The walk now waits for the whole word's Create row, and so does the new palette test. |
| -21. **Help has no Colophon yet.** Paul's rule asks every app for one; it waits for Phase 2, when the bundle is loaded and its packages are what the page runs. |
| +21. **Help has a Colophon** (`/help/open-source`, "Colophon"), built from estilo's `credits` package: 26 components today, regenerated by `make credits` and checked in `make ci`. It lists each project and its licence. It does not yet have the per-package notes from estilo's newer `colophon` catalog, which Docs uses: that catalog lacks three of Mapa's packages (`tdewolff/minify`, `tdewolff/parse`, `rastrillo/fiesta`), so moving to it needs estilo entries first. That is a follow-up. |
| +22. **⌘K, backlinks, mentions and the daily notes' search hits keep the index's own scoped partitions** (base §6.2), and do not go through the accessor. Gate 1 and its existing mutations cover them, and L6 is worded to match (review L1). |
| +23. **The glass recipe and the sidebar's tint** stay in Mapa's CSS until estilo's `[estilo-float]` exists. The panel's recipe, in `links.css`, is then the second adopter's to move (review L12). |
| **Phase 2, the server's half** (steps 2 to 5 and 7's server changes, §8): |
diff --git a/internal/mapa/static/prose.css b/internal/mapa/static/prose.css| index 54d1dd7..2bcf3c9 100644 |
| --- a/internal/mapa/static/prose.css |
| +++ b/internal/mapa/static/prose.css |
| @@ -61,6 +61,7 @@ |
| * technology by the generated content's alternative text. */ |
| :is([mapa-body], [mapa-prose]) li[mapa-task] { list-style: none; } |
| :is([mapa-body], [mapa-prose]) li[mapa-task] > p::before { |
| + content: ""; /* engines without alternative text */ |
| content: "" / "Not done: "; |
| display: inline-block; |
| box-sizing: border-box; |
| @@ -72,6 +73,7 @@ |
| border-radius: 4px; |
| } |
| :is([mapa-body], [mapa-prose]) li[mapa-task="done"] > p::before { |
| + content: ""; /* engines without alternative text */ |
| content: "" / "Done: "; |
| border-color: var(--rst-accent); |
| background: |