oficina / mapa Public
Mapa level-up: Contexto with Página's rail, and a page you write on
Status: revision 3, 2026-11-14. APPROVED (Fable approved revision 2 on N1–N5; revision 3 applies them). Phase 1 and Phase 2 are built on design/level-up, for the final review: not merged, not deployed. §13 records the choices (notes 1–76). Fable's final review of 58fd476 (CHANGES REQUIRED, 2 high) is answered on level-up/review-fixes (§14, round 3); its re-review of 14ab6a6 (APPROVE) is answered on level-up/review-fixes-2 (§14, round 4).
- Round 1. Claude Fable 5.2 reviewed revision 1 (
4027e10) and found CHANGES REQUIRED: 4 high, 10 medium and 11 low findings. Revision 2 (ad06a4e) answered them. - Round 2. Fable approved revision 2 on condition that N1–N5 and its lows go in. This revision makes those changes.
- §14 maps every finding from both rounds to what changed.
- §11's questions to Paul are still open. The proposed answers are written in and marked "awaiting Paul".
Branch: design/level-up (Mapa). Later, an estilo branch for the floating panel (§9).
Base spec: 2026-11-12-mapa-design.md, approved. It still binds.
- This spec changes the surface (base §6), the editor, and a few store rules that make existing promises stricter.
- It changes no trust property.
- §10 lists every departure from the base spec and from the mock-ups.
Mock-ups: oficina/polish-audit/mapa-ux/ (c.html, a.html, README.md, shots/).
- They are the reference for look and measurement.
- They move things with script and fake their data. The build renders everything on the server.
1. Why
Paul, 2026-11-14, after using the slice 1 preview: "it needs some serious levelling up. It should have WYSIWYG. Let's not copy Notion outright, but the page should be full-screen, the sidebar icons should line up etc. etc. It needs a serious UX pass."
He was shown three directions: Página, Estante and Contexto. He ruled: "Let's do it Contexto, with Página's rail." He accepted the small map that comes with Contexto.
2. What was chosen
- Header: Docs' and Slides' I2 stacked header, from estilo
39792ae. - It usesBar.MenubarandBar.Lead. - It shows Mapa's mark, the title with rename in place, and the File, Edit, Insert, View and Help menus (File was Page until build note 87). - Sidebar: Today, Search ⌘K, All pages and Scratch; then Pinned and Recently edited; then "New team page" at the foot. - Every row is one grid: a 16px icon column and a label, centred on one axis. - ⌘\ folds it to Página's 56px icon rail, and back.
- The page is the window: full-width white, a 42rem measure, a large title, and WYSIWYG writing. - There is no form, no label and no Save button. - Autosave goes through the existing drafts (base §5).
- Links panel: Docs' floating glass inspector, toggled from the header. It holds: - "Around this page", the map; - Linked from, with each sentence; - Mentioned without a link, with Link it; - Links out. On a daily note, it is the week.
- Day navigation: ‹ Today › and a month calendar.
- History: a side panel. A chosen version shows its diff, with Restore.
- ⌘K: one box over titles, aliases, text and dates.
- Phone: the Links panel becomes a sheet with a peek line.
Two phases:
- Phase 1 builds the chrome around today's editor. It also makes the server's HTML match what the editor will draw.
- Phase 2 replaces the textarea with a ProseMirror editor that stores Markdown (§6).
3. The shell
3.1 Header
- estilo's stacked
Bar, exactly as Docs uses it: - Menubar:Bar.Menubarholds File, Edit, Insert, View and Help (§3.4). - Lead:Bar.Leadholds, in order: - presence, "Ana is editing", on team pages only (base §5); - estilo'ssavestatus; - the day pill, on daily notes (§4.4). - Actions: History and Links. (Search ⌘K was the first; build note 86 took it out.) - Links is aWideOnlytoggle action, witharia-expandedandaria-controls, like Docs' Format. - Account: last, after estilo's divider. - Mark and hue: - Mapa gets its own mark at hue 125, from estilo
f724edb. -render.go'sthemeSlugfallback goes. - So does the AGENTS.md follow-up about it. - Title row: - A team page's title is estilo's sized title field, renamed in place. - It posts the existing
POST /p/{id}/rename. - The old title becomes an alias (base §3.4). - A daily note shows its long date ("Saturday 14 November") as plain text. - A scratch page shows its first line as plain text. - Daily notes and scratch pages have no title in the namespace (base §3.3), so neither can be renamed. - Below 800px: estilo's second row, untouched (estilo review #34).
3.2 Sidebar and rail
- Rows: - Places: Today, Search ⌘K, All pages, Scratch. - Pinned: the viewer's own pins (§11, Q1). - Recently edited: the six team pages the viewer last committed a revision to. - Team pages only (Paul, 2026-11-16, on Fable's recommendation; build note 80). No daily note and no scratch page is listed, so no scratch page's first line is anywhere in the sidebar: not in this list, not in the rail's tooltips, not in estilo's Menu sheet below 800px. Pages that are deleted or out of scope are not listed either. - Today already covers days, so Scratch covers scratch pages the same way: its screen lists them, last edited first, labelled "Only you see these". - ⌘K already keeps them apart, in "Your notes" (§4.6). - The list has only six slots. - On a shared screen, private first lines would show on every page. - A note of your own that you pinned stays in Pinned, as an explicit choice, with a lock. - It is drawn from the event log, with verbs
created,editedandreverted. - Bulk edits do not count (§8, "Event verbs"): - On team pages, "Update links" and "Link it" logrelinked, and "Link to this block" logsmarked. Neither verb counts. - On private pages these edits still logedited, so that the plaintext log says nothing about a private link graph. They are left out by their write instead. An "Update links" write commits several pages in one transaction, and its events share one actor and oneat(tx.at). Any transaction that logs more than oneeditedevent is bulk, and does not count. Make team page logs onecreatedand oneedited, so both of its pages count. - "Link it" on a private note edits one page, so it counts. It is an edit the person made to that note. - At the foot: New team page. - A ⋯ on each page row (Pinned, Recently edited; not the places), shown on hover, on focus, and on a touch screen on the page on screen's row. It opens the page's verbs, in File's order: Rename…, Make team page…, History, Pin / Unpin, Delete… (build note 88). - One full highlight (Paul, 2026-11-16; build note 80): exactly one row the person can see carries
aria-current, the most specific row that is the page on screen. When the page has no row of its own, its place has it. There are no secondary markers. - A scratch page: Scratch. A daily note, today's or a past day's: Today. - A team page in Pinned or Recently edited: that row only (the first, if it is in both), and All pages stays unlit. A team page in neither: All pages. - The rail hides the page rows, so there the page's place has it. Below 800px estilo's Menu sheet holds the places only, and the place has it. - Alignment: each row is
display: grid; grid-template-columns: 16px 1fr; align-items: center. - Today's misalignment comes from rastrillo's[rst-shell-nav] a. It is not a flex row, so the icon sits on the text's baseline, about 3px high. - Mapa stops usingrst-shell-sidebar. The estilo bar sits on top, and Mapa's own[mapa-side]sits below it. - The rastrillo bug is reported upstream, because Fichas still has it. - The rail: - 56px wide. Rows are icons only, with 40×38px targets. - Labels stay in the accessibility tree, visually hidden. They show as a tooltip on hover and on focus. - The current place has a 3px accent bar at the inline start. - Pinned and Recently edited are hidden. - A fold button sits at the rail's foot.
- Folding: - ⌘\ (Ctrl+\ elsewhere) folds and unfolds the sidebar. So do View → Sidebar and the fold button. - The state is the cookie
mapa-sidebar, set toopenorrail. The server renders it, so first paint is already right. - With no cookie, CSS decides: open from 80rem, the rail below that (§11, Q4). - Without script, the fold button is aPOST /view/sidebarform. - It carries areturnpath, which is checked to be a local path. Anything else falls back to/. - It sets the cookie and redirects back. - It is a view preference: it writes no row and logs no event.
3.3 Breakpoints
These follow estilo's breakpoints (I2 revision 2, P1.3).
| Width | Sidebar | Links | Day pill | |---|---|---|---| | 64rem and wider | open or rail (cookie) | a floating panel, toggled. Cookie mapa-links, open by default | lead slot | | 800px to 64rem | rail by default; the cookie may open it | at the page's foot. The toggle is hidden (WideOnly) | lead slot | | Below 800px | none. Its places are rows in estilo's Menu sheet | a bottom sheet with a peek line | the page's kicker line |
When the panel is off, at any width, the same lists render at the page's foot.
3.4 Menus
The menus are estilo's menubar, with their keyboard shortcuts shown. An entry that does not apply is not drawn.
- File (build note 87; it was Page), first as in Docs and Slides, ordered the Mac way: - New team page and New scratch page. - Import from Notion…, for
MAPA_IMPORTERSonly (Notion import spec §7). - Rename… and Link to a block… (team), Make team page… (private notes), History, and Pin / Unpin. - Deleted pages. - Delete…, last and set apart. - A sidebar row's ⋯ offers the same verbs from the same source, less Link to a block…, which needs the page on screen (build note 88). - Edit: Undo, Redo and Select all.
- Insert: the
/menu's blocks (§6.6), with their Markdown shortcuts shown. - View: - Sidebar ⌘\. - Links. - Edit as Markdown: the scriptless textarea, kept as the floor (§6.10).
- Help: - Keyboard shortcuts. - "Markdown in Mapa": the subset. - Colophon, with ProseMirror once Phase 2 ships.
4. The screens
4.1 A page
- Kicker line: muted, above the title. One of: - "Team page · Edited by Ana at 11:40 · Also called Brightwater"; - "Your note. Only you can open it."; - "Scratch. Only you can open it."
- Title: an H1 at 2.5rem, or 1.875rem on a phone. - A team page's in-page title edits through the same rename POST as the header, with one pending state shared by both. That way nobody renames twice (mock-up risk 9). - After a rename, "Update links to the new title" becomes a notice on the page, with its own POST. The count it reports is unchanged (base §3.4).
- Body: the rendered Markdown in Phase 1, and the editor in Phase 2. - An empty body shows a placeholder: "Write, or type / for blocks and [[ to link". - The placeholder is CSS on the server's own empty paragraph, so it causes no shift.
- A person with a draft on the page sees their draft's text (§6.8).
- "Make team page": - Phase 1 keeps today's form, restyled. - Phase 2 starts it from a selection (§6.7).
- Layout: the page column is centred. It moves left only when the open panel needs the room. - This is Docs' sheet-centring rule. - It is measured on the container, not on
100vw.
4.2 Chips
The server renders chips from Phase 1. The editor draws the same markup (§6.9).
| Kind | Look | Accessible name | |---|---|---| | Team page | A pill. The page glyph is in Mapa's accent and the text is ink | "Halden Robotics, team page" | | Through an alias | As a team page. The title shows as typed, with a tooltip: "Now called Halden Robotics" | "Halden Automation, now called Halden Robotics" | | Pending | No fill, a dashed rim, a "page +" glyph, and muted text. That is three cues | "Pricing 2027, page not written yet" | | Date | A calendar glyph and "Thursday 12 November", never the ISO date | "Thursday 12 November, your note" | | Block link | A team chip with a ¶ glyph. Shows "block removed" when the block has gone (base §3.2) | "…, a block in Acme" | | Broken date ([[2026-02-30]]) | Plain text, as today | | | Embed (slice 1) | A quiet chip showing the reference (fichas:…) | "Embedded item, not shown yet" |
Slice 2's estilo card partial replaces the embed chip (§10, D7).
4.3 The Links panel
- Panel: - 312px of glass, 12px under the header and 12px in from the inline end. - It follows Docs' inspector recipe: a 14px radius, the rim and the shadow, and much fainter in dark. - It is
<aside aria-label="Links">. - The cookiemapa-linksholds its state. It is open by default and closed only for an exactclosed. The server renders it. - Sections, in order: 1. Around this page: the map (below). 2. Linked from N: grouped by source page, with each block that links here and the link marked inside it. - The viewer's own private notes carry "Only you" and a lock glyph. 3. Mentioned without a link N: each with its sentence and a Link it button, which uses the existing POST. 4. Links out N: chips in body order, without duplicates. Pending links are included.
- On a daily note: - This week comes first: Monday to Sunday, in the viewer's zone, with ‹ › to move a week. - A dot marks a day the viewer wrote a note. Today is ringed, and the day on screen is filled. - A key under the strip says so: "Day shown", "Today", "A note you wrote" (build note 82). - A "November" button opens the month (§4.4). - Then Linked from ("Nothing links to this day yet."), then Links out ("No links out yet."), in a team page's order (build note 82).
- The map: - An SVG the server draws. There is no simulation. - This page is at the centre, and its neighbours sit on a ring. - Neighbours: Linked from, Links out (pending links as dashed circles) and Mentioned. - Linked pages come first, in a stable order (by public id). - At most 12 are drawn. There is no "more" node and no count; the lists below are complete. - Edges: - solid for a link; - dashed for a link to a page not written yet; - dotted for a mention. - An edge between two neighbours is drawn when one links to the other in the viewer's scope. - Only "here" carries the accent (Calma). - Accessibility: the SVG is
role="img", with a label that names the counts and the neighbours. - Its nodes are pointer shortcuts to links that are also in the lists, so they take no tab stop (tabindex="-1"). - A key below the map reads "Linked", "Not written" and "Mentioned". - Scope: every list, count, node and edge is read through one scoped accessor (§8). Gate L6 covers it.
- Phone: a bottom sheet with a grabber and a peek line. - The peek line reads "Linked from 3, mentioned in 1", or "This week, and links out" on a daily note. Its counts are scoped like the lists. - A tap or a drag opens it to 74% of the screen. While open it is a modal
<dialog>. - Esc or a drag down closes it. It hides while the keyboard is up.
4.4 Day navigation and the calendar
- The day pill: ‹ Today › on daily notes. On any other day, "Today" shows that day's date. - It sits in the lead slot from 800px, and in the kicker line on phones. - ‹ and › are links to
/d/<date>. - The pill stays when the panel's week strip is open, because the strip leaves when Links is off (§10, D5). - The month calendar: the pill's middle and the strip's "November" both open it. Weeks start on Monday. - Dots, the ring and the fill mean what they mean in the week strip. - Its foot holds "• A note you wrote" and Today. - It is a server-rendered
<details>popover: a grid of links, with ‹ › month links (?month=2026-10). - With script, it gains a roving tabindex, arrow keys and Esc. Without script it still works. - It is styled like rastrillo'scalendar.jsmonth grid, but it is navigation, not a date field. - Dots are the viewer's own daily notes only, from their own partition of the index.
4.5 History
- The panel: History in the header opens a 360px side panel, full height under the header. - It replaces the Links panel while open. - Without script, the same panel is the page
/p/{id}/history, laid out beside the page. - With script, it is fetched as a fragment (?panel=1) under Docs' rule: a request withSec-Fetch-Dest: document, or with noSec-Fetch-*, gets the full page. - The list: versions grouped by day. Each shows the author ("You" for the viewer), the time and a one-line summary.
- Summaries: the verb comes from that revision's event row. Only an
editedrevision is diffed.
| Event verb | Summary | |---|---| | created | "Created this page" (§10, D8) | | renamed | "Renamed from <the old title>". If the revision before has aged out, "Renamed to <the new title>" | | reverted | "Restored the version from <date>" | | restored | "Brought back after it was deleted" | | relinked (team pages only) | "Updated links" | | marked (team pages only) | "Made a block linkable" | | edited | "Edited <the nearest heading above the first changed block>", or "Added <n> blocks", or "Removed …", from a diff against the revision before |
- The first 30 versions are summarised. "Show older" pages through the rest. - If the 90-day window has dropped earlier revisions, the list ends with "Earlier history has aged out". Nothing is ever diffed against a revision past the window.
- Choosing a version: - The page shows that version, under a banner: "Bo's version, Friday 13 November at 16:15. Marked: what changed from the version before". The banner has Back to current. - The diff: block by block (the merge's alignment), then word by word inside a changed block. - Insertions are
<ins>, underlined and tinted. Deletions are<del>, struck through and tinted. - A chip is diffed as one word. - The panel's foot holds Back to current and Restore this version. - Restore is the existing POST: a new revision, held for 650ms. - The editor is read-only while an old version is on screen.
4.6 ⌘K
- The box: ⌘K (Ctrl+K) opens a modal
<dialog>. Results are in groups: - Pages: titles and aliases. Alias hits read "Old title of …". - In the text: the block, with the match marked. - Your notes: daily and scratch, labelled "Only you see these". - The last row is "Create '<query>'". It appears only when nothing in scope has exactly that title (base §6.3).
- Keyboard: ↑ ↓, ↵ to open, ⌘↵ to create. The hint foot is hidden on phones.
- Typed dates: "today", "yesterday" and "tomorrow"; a weekday ("friday" is the most recent Friday, today included; "next friday" is the coming one); "12 nov"; and ISO dates. - They resolve in the viewer's zone, on the server. - They add one row: "Friday 13 November, your note".
- Without script:
GET /search?q=, a page in the new shell. - Endpoint: the existing
/search/suggest, which gains the groups and the date row.
4.7 The other screens
- Restyled into the new shell: All pages, Scratch, Search, Settings, Deleted pages, and every confirm page (delete, free alias, restore deleted, conflict, the textarea editor).
- New team page: a popover with one title field, from the sidebar foot or the File menu. - It posts the existing
POST /pages, held for 650ms. - It then opens the new page with the caret in its body. - The page exists before its first keystroke, so its text autosaves from the start (§10, D4). - Without script, it is/new. - New scratch page: opens the empty editor. The page is created by a commit, under §6.5's rules (§10, D12).
5. Phase 1 on the existing editor
The chrome: everything in §3 and §4, around today's textarea.
/p/{id}/editand the daily note's edit state move into the full-window layout.- The textarea is borderless, at the page's measure, in the body's face and size, with no "Text" label.
- Insert puts Markdown in at the caret.
- Autosave, the commit after two minutes idle, ⌘S and Save work as now.
- Save shows in the lead slot without script. The status is estilo's
savestatus.
The renderer becomes the editor's DOM. These changes are behind gate L4 (§7):
- The spike comes first (Phase 1, step 0).
editor/schema.mjs, itstoDOMand the parts ofmarkup.mjsthattoDOMneeds are written before the renderer changes. - L4's HTML half runs over the corpus. - The HTML is called final only once L4 passes. - Chips, as in §4.2. Date links in their long form.
- The trailing paragraph: a body whose last block is not a paragraph ends with the editor's empty paragraph (§6.2).
- Lists: - Markup: items render as
<li><p>. - Mixed kinds:renderListopens a new list when the item kind (bullet or ordered) changes at the same depth. Today the first item's tag wins. - Level skips clamp as today. - Whitespace: -
white-space: pre-wrapis set on textblocks only:p,h2–h6,li > p,blockquote pandpre. - No whitespace text is emitted between blocks. - A continuation line's leading spaces or tabs (- item\n more) are not shown, just as normal white-space hides them today. The renderer emits<br>and then the line without its indent. The indent is kept in the source (§6.3). - Emphasis. One fix, and the rest pinned as they render today: - The fix: today
***x***renders as the mis-nested<strong><em>x</strong></em>. A triple-star pass runs before the strong and em passes and pins it to<em><strong>x</strong></em>. That is the nesting the schema holds (§6.3). - Every other emphasis case keeps its exact HTML. There is a golden test over the corpus. - Emphasis never crosses a link, an atom or code, as now. - The corpus pins these four outputs. L4 compares Go,markup.mjsand the editor'stoDOMagainst them:
| Source | HTML | |---|---| | *a **b** c* | <p><em>a <strong>b</strong> c</em></p> (unchanged) | | ***x*** | <p><em><strong>x</strong></em></p> (fixed) | | **a** ***b*** **c** | <p><strong>a</strong> <em><strong>b</strong></em> <strong>c</strong></p>, the form the editor writes for "a b c" in bold with "b" also in italics | | **a *b* c** | <p>**a <em>b</em> c**</p> (unchanged). Go cannot render bold around a partial italic, so the editor never writes it. A stored one keeps its source and reads as it does today |
So Phase 2 changes no reader's view, and moves nothing when the editor mounts.
6. The editor (Phase 2)
6.1 The rule
Markdown is the stored format. Drafts, revisions, the block merge, S3 and export see Markdown, exactly as now. The editor reads Markdown when it mounts and writes Markdown when it saves.
The grammar is Mapa's own subset, not CommonMark (base build note 10; markup/blocks.go and spans.go).
- A list item is its own block, and a paragraph's line breaks are hard breaks.
- There is no indented code, no
_emphasis and no escapes.
The editor carries a JavaScript port of those two Go files, markup.mjs. A corpus gate holds it to Go (L4). The editor uses no Markdown library.
6.2 Build and bundle
The bundle is built the way Docs builds its bundles (Slides copied it).
- Where it lives:
editor/at the repo root holds: -package.json,package-lock.json,bundles.mjsandbuild-bundles.mjs; - the sources:markup.mjs,schema.mjs,serialize.mjs,fidelity.mjs,editor-entry.jsand the plugins. - The output: esbuild writes
internal/mapa/static/editor.<hash>.js, minified and content-hashed. It is committed and embedded. The app runs no build step. - Dependencies: -
prosemirror-model,-state,-view,-transform,-commands,-keymap,-inputrulesand-schema-list, at the versions Docs pins. -prosemirror-history,-gapcursorand-dropcursor, pinned exactly in the lockfile. Docs does not use these; it undoes through Yjs. - Noprosemirror-markdown, no markdown-it and no Yjs. - Gap cursor and trailing paragraph: the gap cursor lets the caret sit before or after a code block or rule. - The document always ends in a paragraph, so there is somewhere to type. - An empty trailing paragraph serialises as nothing (§6.4). - The server renders that trailing paragraph too. When a body's last block is not a paragraph, the server emits the editor's own empty paragraph after it, so mounting adds nothing. Its exact markup is pinned in L4.
- Size: measured and recorded, not promised. Expect 60–80KB gzipped.
- Loading: the bundle loads
defer, only on pages the viewer may edit. -mapa.jsstays a small classic script for the chrome: ⌘K, the fold, the panels, the calendar and the time zone offer. - CI: CI runs
npm ci, rebuilds, and fails on any byte of drift (Docs'10-gate). Then it runsnode --test. - Mapa's CI gains Node. -.amadan/ciand the Makefile change with it:make editoris added, andmake cicalls it. - Colophon: the ProseMirror packages (MIT) are added through estilo's catalog.
6.3 The schema
Blocks. The editor holds only the subset Mapa renders. Each Mapa block is exactly one textblock, or one rule.
| Mapa block | Node | Kept for fidelity | |---|---|---| | paragraph | paragraph. Inline content, with hard_break for each \n | the hard_break's indent: the next line's leading whitespace, which is not shown | | heading #…###### | heading, drawn as h2–h6. The page title is the H1 | level, source | | list item | list_item > paragraph, with an optional nested list (below) | on list_item: indent (exact), bullet (- * +), number, delim (. or )), task, checked ([ ], [x], [X]) | | quote | blockquote > paragraph. One Mapa quote block is one blockquote | prefix for each line (> or > ) | | code fence | code_block | fence (the characters and their length), info, closed | | rule | horizontal_rule | source (---, * * *…) |
Lists:
- A run of consecutive items of the same kind (bullet or ordered) at the same depth is one
bullet_listorordered_list. A change of kind starts a new list, matching Phase 1'srenderList. list_item's content isparagraph (bullet_list | ordered_list)?. An item never holds a second paragraph or a code block, because Mapa's item is one block.- Depth: the depth Go computes,
min(level, open lists), gives the nesting. - The item's exactindentis an attribute. A level skip keeps its source even though it nests one deep. - Moving an item: sinking or lifting an item (Tab and ⇧Tab) rewrites its
indentas two spaces per depth. - That makes the item edited. - Fidelity is keyed on the item's paragraph (§6.4). - Its context is the
list_itemattributes, the depth and the list kind. - A nested list changing never touches its parent item's paragraph.
Marks:
strongandemare always written**and*, the only forms the subset has.- They may overlap wherever Go draws well-formed HTML (N5). That replaces revision 2's rule that they excluded each other, which contradicted §5 on
*a **b** c*. -emcomes beforestrongin the schema's mark order, sotoDOMalways nestsemoutsidestrong. That is the nesting Go draws for*a **b** c*, and the nesting Phase 1 pins for***x***(§5). - Serialisation: wherever both marks apply, the*goes outside the**. - Bold that is only partly italic is closed and reopened around the italic part:**a** ***b*** **c**. Go cannot draw**a *b* c**, so the editor never writes it. - Whitespace at a mark's edge is moved outside its delimiters, because a closing*needs a non-space before it. - The reparse rule (§6.4, step 6) settles anything else the editor's document cannot round-trip. The block takes the shape Go draws before it is saved. codeexcludes every mark.link([text](url), orbarefor an autolink) excludesstrongandem, because Go escapes a web link's text and draws no emphasis inside it.- Atoms take no marks.
- So a mark never spans a link, an atom or code: Go's
words()marks only inside one text span. The serialiser closes marks before those, and reopens them after. - §5's table is the mark corpus that L4 holds Go, the port and
toDOMto.
Mapa's inline atoms:
wikilink {target, anchor, shown, source, origin}→[[target#^anchor|shown]].datelink {date, source, origin}→[[2026-11-12]].embed {ref, source, origin}→![[app:item]].- Untouched atoms re-emit their
source.
Block anchors:
^idis amarkerattribute on every block that may carry one (not code, not rule). It serialises as^idat the end of the block's last line.- It shows as a ¶ handle on hover: "Copy link to this block".
- It is minted only by "Link to this block" on a team page, as an attributed edit to that page. That edit logs
marked(base §3.2, §8).
Outside the subset:
- The schema has no node for anything the subset can't say.
- Paste maps it onto the nearest thing the subset can say.
- Text outside the subset (tables, raw HTML, footnotes) is already a paragraph to Mapa's parser, and stays one (§10, D10).
6.4 Markdown fidelity
The danger. A serialiser that normalises things would rewrite blocks nobody touched on every save. Things it might normalise: list markers, numbering, indents, blank lines, fences, trailing spaces. That rewriting causes noise in history, false merge conflicts and churn in S3.
Untouched blocks are re-emitted from their source, byte for byte:
- Origins. On mount,
markup.mjsparses the body into the same blocks that Go'sParsegives, withStartandEndin UTF-8 bytes. - Each textblock, and each rule, gets anoriginattribute. The attribute is never serialised. - Origins are opaque, monotonic and never reused. A counter in the editor's state issues them, starting at 1 for each page load, and every new origin is fresh. - Revision 2 used block indices, which a rebuild reuses. Undo after a rebase could then pair an old node with another block's source (N2). - The side table never forgets. It records each origin once and keeps the entry for the life of the page load. An entry holds: - the original node and its exact source; - its context: kind, level, list attributes, depth and list kind; - its neighbours: the origins of the blocks before and after it; - its seams: the exact bytes between it and each neighbour, and the leading or trailing bytes for the first and last block. - Because no entry is ever overwritten, a node that undo brings back still finds the entry it came from. - Attributes survive text edits. - The first holder keeps the origin. When a split or a copy-drag gives a second node the same origin, the first holder in document order keeps it. Every later holder is treated as new and gets a fresh origin, with no source. - Only the first holder keeps a marker. A later block whose^idis already in the document loses it. - Pasted blocks get fresh origins. Paste from Mapa's own clipboard (§6.6) brings each block's source, and the seams between the pasted blocks. Those enter the table under new origins. - Table updates stay out of undo. Assigning origins at mount, after paste, or after a rebase (§6.5) is done in a transaction markedaddToHistory: false. It changes onlyoriginattributes, which are never serialised. Undo therefore never replays a table update. - "Untouched" means three things: - the node is the first holder of its origin; -
node === original || node.eq(original)for that origin's entry; - the context is unchanged. -eq, not identity, so undo, Enter then Backspace, and a no-opsetNodeMarkupall count as untouched again. - Chip state (team, alias, pending) lives in a plugin and a NodeView, never in attributes. - Seams. Two adjacent blocks keep the seam bytes recorded between them, whether or not either block was edited, when: - the table records them as each other's neighbours, under their current origins. - Anywhere else,
markup.Join's rule applies: one blank line, or one newline between two list items. - The recorded leading and trailing bytes are kept while the blocks that carried them are still first and last. - The result goes throughcleanBody's rule. - Edited blocks are serialised from their node: - the block syntax comes from the kept attributes (the same bullet, number, indent, fence and quote prefix); - the inline text is rewritten; - untouched atoms re-emit their
source. - Empty blocks have no Markdown form, so they serialise as nothing. That covers an empty paragraph, list item or heading, and a heading of only#s. - OtherwisecleanBody's trim turns a trailing-into-, whichitemLinereads as part of the paragraph above it. - The editor keeps empty blocks on screen while you are there. The corpus has these cases. - The structure check, before every autosave.
parse(serialise(doc))must give the document's blocks in the same kind, level and order, and the same number of them. - Empty blocks, which serialise as nothing (step 4), are left out of the count. So is the trailing paragraph the editor keeps (§6.2). - If it does not, the editor re-serialises the offending blocks from their nodes. For example, an unclosed fence, reused from source, that is no longer last gets its closing fence, and becomes edited. - If the check still fails, the editor adopts the parse as its document (step 6). - Nothing is autosaved that would reload as a different document. L3 asserts this on documents, not bytes. - Reparse on edit. After each transaction that edits a block, the editor serialises that block and parses it again. - If the result is not exactly that block, the block becomes what the parse says. For example, text that now starts with
-after a hard break, or*word*typed literally. - So what the editor shows is always what the stored Markdown means. - While an IME is composing, the reparse waits untilcompositionend. - The reparse is idempotent: applying it twice is applying it once (L3). - Mapa has no escapes, so a literal*word*becomes emphasis, exactly as in the textarea (§10, D11). - A save that changes nothing writes nothing: - The editor autosaves only when the serialised body differs from what it last saved. - The store writes no revision for a commit whose final body equals the current body. That covers a
Mergedresult as well as a plain save, and the draft is dropped. Todaytx.commitmints a revision with the same body.
Parity hazards. The port must not trip on these, and each has corpus cases:
- Go's RE2
\sand\Sare ASCII; JavaScript's are Unicode. The port spells out ASCII classes. strings.TrimSpaceandtrim()trim different sets (U+0085, U+FEFF).- Offsets are compared in UTF-8 bytes.
strings.ReplaceAll(indent, "\t", " ")decides list levels.- Go runs its emphasis regexes over HTML-escaped text.
Merges keep bytes too. markup.Settle re-joins every block with Join today (base build note 23), so any merged commit rewrites the whole body's spacing.
Phase 2 makes Settle byte-preserving:
Merge3records, for each settled block, its index in theirs (or in mine), soSettleknows which blocks were neighbours.- It anchors on the current revision's text ("theirs").
- Theirs' blocks, and the bytes between theirs' adjacent blocks, are emitted as they are.
- Blocks taken from mine bring their own source.
- Only the seams where the two sides meet follow
Join. Settleruns the same structure check as the editor:Parseof its result must give the settled blocks. If it does not, it falls back to today'sJoin, which is correct but tidies spacing. For example, a kept seam might join two paragraphs.
The same rule applies when Resolve settles chosen hunks. This revises build note 23's "a merged save can tidy blank lines" (§10, D13).
6.5 Saving: autosave, commit and rebase
The base spec's §5, gate 11 and build note 31 (Kept) all hold.
Autosave:
- It fires 1.2s after typing stops, once the §6.4 structure check passes.
- It goes through
POST …/draftwithbase,versionandbody, and the two-tab version check. - It never touches the page or its revision.
A tab's own draft. The editor tracks whether this tab has typed into the page.
- Remembered in the tab.
sessionStorage, which is per tab and survives a reload, keeps the last draft version the tab wrote, keyed by page or by day (mapa-draft:<key>). - Own or offered. On load, a draft whose version matches that entry is the tab's own. So "reload, then close" still commits. Any other draft is offered: it is from another tab or an earlier session.
- Committing. Only an own draft commits by itself. An offered draft commits only on Save (§6.8). Typing into an offered draft makes it the tab's own from then on.
Commit, for an own draft, happens:
- on ⌘S;
- after two minutes idle;
- when the person leaves the page inside Mapa, by a link or the sidebar. The editor flushes the autosave, commits, then navigates. If that fails: - Saved or
Merged: it navigates. - Conflict: it stays on the page and shows the inline choice (below), with "Leave and decide later". Leaving keeps the draft, which the next visit offers. - The flush failed (offline, or a server error): it stays, shows Failed, and offers "Leave anyway". The person is told that what they typed since the last save will be lost. - The commit failed, but the draft is stored: it navigates. The draft is the tab's own, so the next visit from this tab commits it by the usual triggers. - when the tab closes, on
pagehide(§10, D3): - OnekeepalivePOST to…/draftcarriescommit=1, the tab's draftversion, and any text not yet sent. - The store requiresversionto be the current draft version. If it is not, it writes nothing and commits nothing. - Otherwise the text is written as the draft and committed in one request. - If the commit cannot happen (a same-block conflict, or the request never arrived), the draft stays. The next visit offers it as Save or Discard, as now. - Browsers cap akeepalivebody at 64KB. Over that, the POST carries no text and commits the last autosave. Up to 1.2s of typing on a very long page is then not committed by the close. It is still in the tab if the tab is restored. This is a written-down limit.
Status: savestatus shows Saving…, Saved, Retrying and Failed.
- "Saved" means the text is stored.
- Teammates see it from the next commit, and see "Ana is editing" until then (base §5).
Learning of a teammate's revision. There is no separate rebase GET. The autosave reply carries:
versionandrevision, the page's current revision.merge, when the draft's base is not current. It is computed over exactly the text this request carried, and takes one of these forms: -{against: R2, body: M}when the merge is clean; -{against: R2, conflict: true, hunks: […]}when it is not; -{noBase: true}when the base has aged out of the window; -{gone: true}when the page has been deleted. - Each conflicting hunk carries{at, count, base, mine, theirs}.atandcountare the hunk's blocks in the text sent.base,mineandtheirsare the Markdown of the three sides.
Clean: applying M (N4):
- Precondition: the editor's serialised body still equals the text that autosave sent. If anything was typed since, it does nothing, autosaves again and asks again.
- Apply. One transaction replaces every block that differs between the document and
parse(M), aligned bymarkup.mjs. - A block the teammate changed is applied, including the block under the caret. The caret and the selection are mapped through, so they survive. - Undo survives too: the transaction is an ordinary one, and undoing it brings back the person's own earlier text. - Rebuild the table against
Mfirst, before anything is checked. - Every block ofparse(M)gets a fresh origin, with its source, context, neighbours and seams taken fromM. - This is done in anaddToHistory: falsetransaction (§6.4, step 1). - Check that the document's blocks equal
parse(M)block for block: in kind, level, count, and each block's source. When they do, serialising the document gives exactlyM. - Move the base with a version-checked
POST …/draftcarryingrebase=R2,body=Mandversion. - The store sets the existing draft'sBaseRevisionto R2 only ifversionis current and R2 is a revision of this page inside the window. Otherwise it refuses and moves nothing. - If step 4 fails, for example after a teammate's spacing-only change that the editor cannot represent, the base does not move. - The editor retries on the next two autosaves, so three tries in all, then stops trying. - The draft keeps base R1, and the server's byte-preserving merge settles it at commit (§6.4). Nothing is lost and nothing loops.
Conflict (N3):
- The inline choice. The hunks' blocks are marked in place, each showing Yours, Theirs and Both (yours first, base build note 24), with the three sides from the reply.
- Locked until chosen. The conflicted blocks are read-only until the person chooses. The rest of the page stays editable. - An edit elsewhere autosaves as usual. Its reply carries the hunks again, for the new version. - The choice shown always belongs to the version whose reply carried it.
- Posting. Choosing posts to the existing
POST /p/{id}/resolve, withcurrent=R2, theversionthat reply belonged to, and onechoice-Nfor each hunk. That path commits the chosen text over the revision shown (Store.Resolve), so it is a commit made by the person's own choice. - The answer. Resolve answers JSON when asked:
{outcome, revision, body}. - Saved: the editor appliesbodyand rebuilds the table against it, as steps 2–4 do. Its base becomesrevision. - Conflicted again (another revision landed, or the draft changed in another tab): the editor autosaves and shows the new hunks. - Without script, the existing conflict page and its redirect stand. - No commit of its own. Until the person chooses, the base stays at R1 and the editor makes no commit of its own. Nothing nobody chose is committed.
The other answers:
noBase: the existing side-by-side choice, keep mine whole or keep theirs.gone: the existing "Save as a scratch page" or Discard.- A stale version: the existing 409, and the tab loads the newer draft (build note 31). That draft is then offered, not the tab's own.
- Daily notes: - An unwritten day's
/d/{date}/drafthas no revision and no merge. - A written day behaves as its page does. - A note created meanwhile by another tab takes the existingNoBasepath.
A commit that merged (Merged, body returned) follows steps 1–4 against the merged body. With nothing typed since the send, the editor applies it, rebuilds against it and takes the new revision as its base. No rebase POST is needed: the commit dropped the draft. With typing since, it keeps its base, so the next commit merges again (today's mapa.js rule).
Returning from the back/forward cache (pageshow with persisted):
- With no unsaved text, the editor reloads the page.
- Otherwise it autosaves at once, which brings
revisionandmergeback.
6.6 Typing: [[, /, input rules and the bubble
[[opens a combobox under the caret. - It offers team titles, aliases ("Old title of Halden Robotics"), the viewer's own pending link texts (base §6.3, build note 20), and a last row, "Link 'Hal', a page not written yet". - It uses/links/suggest, unchanged. - ↵ inserts awikilink. Typing|lets you set shown text. - A typed or picked date makes adatelink. - Backspace into a chip turns it back into its[[textsource. - A plain click on a chip follows the link. - The state of a newly typed chip comes fromPOST /links/resolve(§6.8)./at the start of an empty block, or after a space, offers: - Heading 1, 2 and 3 (#,##,###); - List (-), Numbered (1.) and Checklist (- [ ]); - Quote (>), Code (``````) and Divider (---); - Link to a page ([[); - Date, a picker that inserts adatelink`. - Card from Fichas is hidden until slice 2.- Input rules: the same Markdown shortcuts work typed at the start of a block.
**x**,*x*and `x` become marks, under §6.3's rules. A URL pasted over a selection makes a link. - The selection bubble: B, I, code, Page link and Web link, then Make team page (private notes only). - Page link (⌘L; Paul, 2026-11-16; build note 81) opens a field holding the selected words, offering what
[[offers for them, dates and "Link 'text'" included. Choosing a page makes the words one chip,[[Target|words]], or[[Target]]when they are the title. Web link is the address field it always was. - It sits above the selection, or below it on coarse pointers (§6.11). - Keys: - ⌘B, ⌘I, ⌘E (code), ⌘⇧K (web link), ⌘L (link to a page: over a selection, Page link; with none,
[[), ⌘S, ⌘Z, ⌘⇧Z. ⌘K stays search. - Tab and ⇧Tab indent and outdent list items, and only list items. Anywhere else Tab leaves the editor. - Esc, then Tab always leaves, even inside a list. This is the keyboard way out, listed in Help. - Copy, cut and paste: - Within Mapa: copy and cut put Mapa Markdown on the clipboard (
text/plain) beside the HTML. They also put a privateapplication/x-mapaslice carrying each block's source and the seams between the copied blocks. - A paste gives those blocks fresh origins that carry their source and seams (§6.4, step 1). - Paste prefers that slice. Copied blocks keep their source bytes, so cut and paste within a page re-emits the same bytes. - From outside:text/plainis parsed as Mapa Markdown.text/htmlis mapped onto the schema, and anything else becomes text. - Markers: a pasted block's^idis stripped only when that id is already in the document. Only the first holder keeps it (§6.4, step 1). A cut and paste keeps its marker, so links to the block still work.
6.7 Make team page from a selection
- Widen to blocks. The command widens the selection to every block it touches, and tints those whole blocks before anything is confirmed.
- The confirm popover: - a title, prefilled from the first heading or the first words; - "These blocks move to a new team page everyone can open. Your note keeps a link in their place. Nothing else in your note is shared."; - Make team page, held for 650ms.
- On confirm: - The editor commits the draft as an ordinary commit by the person. A daily note's first commit creates it. - It then takes the block indices from the body it just committed, parsed by
markup.mjs. They are not taken from the editor's own tree. - It postsMakeTeamPagewith those indices and the revision they index.MakeTeamPagegains thatrevisionand refuses a stale one. - Refusals follow gate 2. A taken title or a date-shaped one asks for another. Base §7.4's embed check applies once slice 2 exists.
- Afterwards, the link chip is where the blocks were. "Moved to [[Pilot logins]]." shows until the page is next opened.
6.8 What the editor is given
Data the page carries. Every editable page carries <script type="application/json" id="mapa-editor">.
- Pages that carry it are served
Cache-Control: no-store. - It holds: - the source it mounts over, and the base revision; - the person's draft, if they have one: its version and base revision. Its text is the source; - Whether the draft is the tab's own or offered is the tab's own knowledge, from
sessionStorage(§6.5). The server cannot know it. - the chip resolutions for every link in the source:{target → kind, href, current title}, under the viewer's scope. - Encoding. The island is written with Go's
encoding/json, which escapes<,>and&as\u003c,\u003eand\u0026, plus U+2028 and U+2029. - So a body holding</script>or<!--cannot end the element early. - A test renders a page whose body is</script><script>alert(1)</script>and checks the island parses back to the same text.
A person with a draft:
- The server renders the draft's text as the page body, so the editor mounts over identical markup.
- A bar above the body reads: "Unsaved changes from 2 hours ago. You're seeing your unsaved version." It offers Save, Discard and "Show the saved version".
- Without script this is still true, and the bar's buttons are the existing POSTs.
- Typing continues the draft. The draft is still "offered" until this tab types into it (§6.5).
POST /links/resolve answers the state of up to 32 link targets, for chips typed after mount.
- It is a POST so that the targets travel in the body, not in a URL that logs and history keep. It writes nothing, like
/preview. - It answers JSON, is scoped like
/links/suggest, and is inside L6 and L7.
The Links panel reads committed text.
- The panel, the map, backlinks and mentions come from the in-memory index, which is fed only by committed revisions (base §3.2). A person's draft never enters the index.
- So links typed into a draft appear in the panel after the next commit, and the panel is redrawn then.
- With script, the panel is refetched after each commit.
6.9 No shift, no flash
- The server's HTML is the editor's DOM (§5, L4).
- Mounting: the editor mounts on the
<article>itself ({mount: article}). - Before mount the body is the readable page, not yetcontenteditable. - A key pressed before mount types nothing. - The window before mount is measured (L5). - First paint: the panels and the sidebar come from their cookies. - The lead slot's
savestatusand the presence line reserve their width. - Never FOUT: - The system UI face only, and
ui-monospacefor code. No webfont. - The editor's CSS is inmapa.css, never injected.
6.10 The scriptless floor
- Without script: a page reads as rendered Markdown. "Edit as Markdown" (View, and a link in the page's kicker) opens today's textarea, with Save and its revision check.
- With script: View → Edit as Markdown stays.
- Round-trips: every Mapa node survives the textarea as text.
6.11 iOS and touch
Each quirk gets a WebKit case in make browser where possible, and a check by hand on a real iPhone through Safari's Web Inspector. devicectl hangs on this Mac, so automated device runs are not promised.
- Composition and autocorrect next to atoms. IME composition, dictation and autocorrect beside non-editable chips are a known weak spot of ProseMirror on WebKit. - Test each with a chip on both sides. - Never act on Enter while
isComposing. - The reparse waits forcompositionend(§6.4). - The selection callout: the bubble goes below the selection on coarse pointers, clear of iOS's callout.
- The keyboard: -
visualViewportkeeps the bubble, the lists and the accessory row above the keyboard. - The Links sheet hides while the keyboard is up. - Heights usedvh. - Zoom on focus: editable text is at least 16px on phones (the suite's iOS input-zoom fix).
- Smart punctuation: iOS turns
--into a dash and quotes into curly quotes. - The rule and fence input rules also accept—-,–-and the like. - The/menu is the dependable path. - Checkboxes: task boxes are NodeView buttons with names ("Done: Send Tom the summary"). A tap toggles; it does not place the caret. They are Tab stops inside the editor. So is an image's ALT badge when the image has no description (images spec, build note I22); a described image's badge is not, and is reached from the image's bubble.
- The accessory row: Página's keyboard row is adopted on phones while writing (§10, D6). It holds
[[,/, B, I, list, checklist, and Make team page on private notes.
6.12 Accessibility
- The editor:
role="textbox",aria-multiline="true", named "Page text, <title>". - Chips have the names in §4.2. - The ¶ handle is a button, "Link to this block". [[,/, Page link and ⌘K: - Each is a combobox and listbox, witharia-activedescendant. Page link's field is the combobox itself, so it carriesaria-expanded(build note 81). - While open, the editor hasaria-expandedandaria-controls. - A polite live region announces counts ("3 pages").- Dialogs and regions: - ⌘K and the phone sheet are modal
<dialog>s. - Links and History are labelled regions. - Esc closes them, and focus returns to what opened them. - The sidebar:
<nav aria-label="Mapa">witharia-currenton exactly one shown row (§3.2, build note 80). The rail keeps its labels in the accessibility tree. - History's diff:
<ins>and<del>, plus underline and strike. - General: - Shortcuts are listed in Help. - Focus is always visible. - Targets are at least 24px, and 32px on coarse pointers. - Content reflows at 320px (SC 1.4.10). - Reduced motion removes the sheet's and the bubble's transitions.
7. Gates
Base gates 1–12 keep passing, unchanged, and so do make mutate's nine mutations. The new gates are L1–L12. They run in make ci unless marked "browser".
The corpus
internal/mapa/markup/testdata/corpus/ holds only text that may be committed:
- every synthetic page
synthetic.gowrites; - the CommonMark spec's examples (0.31.2). Its CC BY-SA 4.0 licence is recorded beside them in
LICENSE.commonmark; - fixtures written for the purpose, shaped like real notes: tables, nested and mixed lists, HTML, fences, long lines, Unicode;
- hand-written edge cases: - CRLF and lone CR; - tabs in list indents, level skips, mixed list kinds; -
1),*and+bullets,[X]; - unclosed fences,~~~,***and_ _ _rules; -^idon every block kind; - wiki links with odd spacing,|and#^, and[[with no close; - empty and whitespace-only bodies; - a trailing empty item (-), a heading of only#, an empty quote; -***x***,**a *b* c**,*a **b** c*, emphasis around links and code; - continuation indents; - NBSP, U+2028, U+0085 and U+FEFF; - emoji, RTL text and zero-width joiners.
Private text is not committed. make corpus-local DIR=… runs L1–L4 over Markdown files read in place, for example the Oficina repos. It commits nothing. Its result is recorded in the build notes.
Fidelity (Node, against Go's golden file)
- L1, untouched round trip. For every corpus body, mounting and then serialising gives
cleanBody(body)byte for byte. - L2, locality. In each body, with a fixed seed: - Editing one block changes only the bytes
markup.Replacechanges for that block. - The seams on either side keep their original bytes. - Inserting or deleting blocks changes bytes only at the new seams, byJoin's rule. - Undo back to the start gives the original bytes. - L3, stability. Seeded random edits cover typing, marks, splits, joins, list moves, chips, undo, copy-drag and paste. -
serialise(parse(serialise(doc))) = serialise(doc). - Documents are compared, not bytes:parse(serialise(doc))has the document's blocks, kind for kind, level for level and count for count, in JavaScript and in Go. - The reparse rule is idempotent. - No two blocks share a^id. - Origins (N2): - undo after a rebase, a paste, a split or a copy-drag never pairs a node with another origin's source; - pasted blocks keep their copied bytes and seams; - table updates never appear in undo history. - Byte-preservingSettle: a merge changes bytes only in blocks mine changed, and at their seams. - L4, parity. -
markup.mjsequals Go'sParseandSpanson every corpus body: kinds, levels, markers and byte offsets. - The editor'stoDOMHTML equals Go'sRenderHTML. - That includes the four pinned emphasis outputs in §5, word for word. - It includes the trailing paragraph's markup. - Go writes the golden file (go test -run Golden -update). Node compares against it. CI fails when the golden file is stale.
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. 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. - Nolayout-shiftentry is recorded from first paint through mount. - Cookies are honoured at first paint. - The time fromDOMContentLoadedto mount is logged on every run. The gate fails only past 1s, which allows for CI machines. The 100ms warm target is checked by hand. - L6, scope (extends gate 1). Bo's output is byte-identical whether or not Ana's private notes hold the term, the link, the pending text or the block reference. That covers: - the panel's lists, counts, map nodes and edges, and the peek line; - Recently edited and Pinned; - the calendar's and the week's dots; - ⌘K's groups and its date row; -
[[suggestions,/links/resolve, and the editor's data island; - history summaries. 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 mutategains 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; - mounting the editor and leaving without typing; - opening a page with an offered draft and leaving it: no revision is created and the draft is unchanged; - opening New scratch page and leaving it. - L8, scriptless (extends gate 7).
make browserwalks, with JavaScript off: - the sidebar and its fold POST (a foreignreturnfalls back to/); - the day pill and the calendar's months; - the Links lists at the page's foot; - History and Restore; - ⌘K's search page; - rename in the header; - New team page and Make team page; - the draft bar's Save, Discard and Show saved; - Edit as Markdown and Save.
Saving
- L9, drafts, rebase and commits (extends gate 11): - Clean rebase. A teammate's revision landing mid-edit merges by block. - Every block the teammate changed is applied, the one under the caret included, and the caret survives. - The table is rebuilt against
M, and the document's blocks equalparse(M). - The base moves through the version-checkedrebasePOST. - The next commit isSaved, notMerged, and keepsM's bytes. - Typing mid-flight: typing between the autosave's send and its reply means the merge is not applied and the base does not move. The next autosave converges. - When the check never passes: a teammate's spacing-only change the editor cannot represent stops after three tries. The base stays put, and the commit's byte-preserving merge settles it. - Inline choice: - The reply carries each hunk's base, mine and theirs. - The conflicted blocks are read-only until chosen. - Yours goes throughResolve, commits once with no repeat conflict, and answers{outcome, revision, body}as JSON. - An edit elsewhere while the choice is open re-sends the hunks for the new version. - The rebase POST is refused with a stale version, with a revision outside the window, and with a revision of another page. - Offered drafts commit only on Save, never on idle, leave or close. - Reload, then close: a tab that typed, reloaded and then closed still commits, becausesessionStorageremembers its version. - Leaving inside Mapa: - a conflict keeps the person on the page with the choice; - a failed flush offers "Leave anyway"; - a stored draft whose commit failed lets them leave. -commit=1with a stale version writes and commits nothing. - A save that changes nothing, including aMergedresult equal to the current body, writes no revision. - Make team page refuses a stale revision. Its indices come from the committed body. - The first scratch commit: - it is single-flight: two quick autosaves create one page; - an empty body creates nothing (ErrEmpty); - the second autosave is a draft on the new page. -noBaseandgonereplies lead to the existing choices. - A stale tab cannot overwrite a newer draft (build note 31'sKeptincluded).
Quality
- L10, accessibility (browser). It checks: - chip names, roles and states; - a keyboard-only walk of
[[,/, Make team page, ⌘K, the calendar, History and Restore, with focus returning each time; - the Esc-Tab way out of the editor; - reflow at 320px; - axe-core, vendored at a pinned version with no network fetch, finds nothing serious. - L11, the busy rule. - Rename, Restore, Make team page, New team page, Pin and Link it hold their spinner for 650ms. - Links, the fold, the calendar and Appearance switch at once.
- L12, the bundle. CI rebuilds from the lockfile and fails on byte drift. The size is logged. The gate fails past 120KB gzipped.
8. Server changes, in one list
Rendering (Phase 1):
- Chips and their states; date links in long form.
<li><p>, and a new list when the item kind changes.pre-wrapon textblocks only, with no whitespace between blocks.- Continuation indents are not shown.
- 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. 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;
- ⌘K's groups and dates;
/links/resolve;- the editor's data island.
Event verbs:
- New verbs, on team pages only.
relinkedis for "Update links" and "Link it".markedis for "Link to this block". All three logeditedtoday. - Private pages keep
edited. Arelinkedrow on a private page would tell the plaintext log that the page links to something, a fact that is otherwise sealed. That reasoning was Fable's, and the coordinator decided it (N1). Private bulk edits are kept out of Recently edited by their transaction (§3.2). markedcan only ever be on a team page anyway: base §3.2 mints markers only in the page that holds the block, and "Link to this block" is offered on team pages only.- What a team-page verb says: that the page's links were updated, which teammates can already read in its history. Each new verb replaces an
editedrow the same write already logged, so no row is added. - Who reads verbs, checked against the code: - The index (
index.go) catches up by object and revision, and never branches on a verb. - Gate 8 counts events per write, not verbs. - S1 (slice 1 item 6, not yet built) is fed from the event log by object and revision. It treatsdeletedasgoneand every other verb as a change, so new verbs need nothing from it. Its conformance run will show this when it is built.
Pins (Q1, proposed per person):
- A sealed list of page ids in the member record. No new plaintext column, so §4's list is unchanged.
POST /pinschanges it, held for 650ms.- It logs one event whose object is the member, verb
pins. It never names the page. - A
pinsevent need not mean the list changed. The Notion import's pin write (columns and icons spec §6.3) logs one when it marks roots that found no free slot, so the marks and the event land in one transaction. It says only that the person's pins were considered. - A deleted or out-of-scope page drops out of the list when it is read.
History:
- Summaries come from event verbs, with the diff for
edited. - "Earlier history has aged out" when the window has dropped revisions.
- The word diff.
?panel=1fragments under theSec-Fetch-Destrule.
⌘K: /search/suggest gains the groups and the typed-date row.
New endpoint: POST /links/resolve, which writes nothing and answers JSON.
Resolve: POST /p/{id}/resolve answers JSON {outcome, revision, body} when asked (Accept: application/json). The form path's redirect is unchanged.
Autosave (POST …/draft):
- The reply gains
revision, andmergewhen the base is behind (§6.5). The merge is computed over the request's own text. - The reply's
mergecarries each conflicting hunk's{at, count, base, mine, theirs}. rebase=Rmoves an existing draft'sBaseRevision. TodaySaveDraftsets the base only when it creates the row. - It is version-checked. - It is refused unless R is a revision of this page inside the window.commit=1writes and commits in one request. It requires the current draft version.- Data that is not text but describes it (the version, the base) is not plaintext beyond what §4 already lists. The drafts row is
(…, base_revision, version, updated_at), as now.
Commits:
- A commit whose final body equals the current body writes no revision. That covers plain saves,
Mergedresults and Resolve. markup.Merge3records each settled block's index in theirs or in mine.markup.Settleis byte-preserving, runs the structure check, and falls back toJoinwhen the check fails (§6.4).MakeTeamPagetakes the revision its indices refer to, and refuses a stale one.
Scratch pages: the first commit is single-flight per tab and per text. ErrEmpty is kept.
Pages with editor data:
- They carry the
no-storeJSON island, escaped as §6.8 says. - Bodies whose last block is not a paragraph get the editor's trailing empty paragraph (§6.2).
- A person with a draft is served the draft's text as the body, with the draft bar.
View cookies: mapa-sidebar and mapa-links. They are set by script, or by POST /view/sidebar and POST /view/links with a return path that is checked to be local.
Unchanged:
- §4's plaintext list, if Q1 is answered "per person";
- the seal, and S1, S2 and S3;
- every refusal.
9. estilo and rastrillo
- estilo re-pin: to
f724edbor later. That brings the bar-stack (39792ae) and Mapa's mark at 125. - The floating glass panel moves to estilo. Mapa is its second adopter after Docs' inspector, which is the "two implementations" rule. - An estilo branch extracts
[estilo-float]: the glass, the rim and shadow, the dark values, and the centring helper. - Mapa adopts it. Docs adopts it when it next re-pins. - The Links panel needs nolight.jsglow, because it holds no controls that need back-lighting. - The sidebar's row grid and the rail stay Mapa's own until a second app wants them. Fichas' rail is the likely one.
- rastrillo: the
[rst-shell-nav] aalignment bug is reported upstream.
10. Departures
From the mock-ups
- D1, pins. The mock-up's Pinned list has no owner and no storage. Pins are proposed per person and sealed (§11, Q1).
- D2, "Recently edited". The list shows pages you last wrote in, not pages you last opened, and excludes bulk edits. - Remembering opens would make a GET write, which gate 10 forbids. - Keeping visits only in the browser would not be on screen at first paint without a shift.
- D5, the day pill. It stays in the header on daily notes even while the panel's week strip is open. The strip leaves when Links is off.
- D6, the accessory row. The phone keyboard row is Página's. Contexto has no other way for a phone to reach
[[,/or Make team page. - D7, embeds. Embeds stay reference chips until slice 2. The mock-up's Fichas card needs S10.
- D8, the oldest version. History's oldest entry says "Created this page", not "Made this page from your note". - Recording where a team page came from would need a plaintext event that marks it as born from private writing. That would be a new disclosure.
- The map: at most 12 neighbours, no "more" count, no tab stops. The lists are the accessible route.
From the base spec, each for the reviewer
- D3, a closed tab commits. Closing the tab commits a draft this tab typed into, by one
keepalivePOST with the current version. Base §5's "offered on the next visit" becomes the fallback. - The page has no Save button, so "Saved" must not turn into "You have unsaved changes" an hour later. - Offered drafts never commit without Save. - Every commit is still a POST from the person's own tab, and nothing runs on the server (doctrine §13). - D4, title-first team pages. A new team page exists from its title, which is what
POST /pagesalready does. That retires build note 25's known limit for team pages. - D9, whitespace. Textblocks render under
pre-wrap, so runs of spaces inside a line show as typed. Continuation indents stay hidden, as now. - D10, no "source blocks". The mock-up README's source blocks for tables and HTML are dropped. Mapa's parser already reads those as paragraphs and keeps their bytes.
- D11, no escapes. A literal
*word*becomes emphasis, as in the textarea. Adding backslash escapes would change Go's renderer, search, S3 readers and the textarea together. - The trigger to revisit this is someone needing literal asterisks. - D12, a scratch page is created by its first commit, not its first draft. - Base build note 13 ("created by its first save") and the textarea keep a new scratch page's text in the tab until Save. - With no Save button, the editor's first autosave on a new scratch page is that save. It is a commit, single-flight, and refused when empty (
ErrEmpty). - So a scratch page reaches the database about 1.2s after its first words, with a revision and an event. Every later autosave is a draft. - It is not a change to §4: it is the same row and event a Save makes. - D13, byte-preserving merges.
Settlekeeps the bytes of the current revision outside the blocks mine changed. That revises build note 23's "a merged save can tidy blank lines". - Stricter rules: - A no-op commit writes no revision. -
MakeTeamPagechecks its revision. -commit=1checks the current version. - "Update links", "Link it" and "Link to this block" get their own verbs. - Each of these makes an existing promise stricter, or the event log more exact. - Unchanged: - decisions 1–15; - the rungs and the namespace; - the seal boundary, S1, S2 and S3; - slices 2 and 3.
11. Open questions for Paul
Fable's recommendations are written in as the proposed answers.
- Q1, pins: yours, or the team's? Proposed, awaiting Paul: - Yours. Pins are private, sealed in your member record, and never shown to anyone else. - The pin event names only you, never the page.
- Q2, "Recently edited": what you last wrote in, not what you last opened. Bulk link updates don't count (D2). Proposed, awaiting Paul: yes, labelled "Recently edited". Paul, 2026-11-16: team pages only; your own notes are on Today and Scratch (build note 80).
- Q3, closing the tab saves your writing (D3). It applies only to writing done in that tab. A draft from an earlier session still waits for your Save. Proposed, awaiting Paul: yes, with those conditions.
- Q4, the sidebar's default with no saved preference. Proposed, awaiting Paul: open from 80rem, the rail below that.
12. Phasing
Phase 0: this spec, reviewed. Then stop.
Phase 1: the chrome, on today's editor. One commit per step, each green on make ci and make browser:
- The spike: -
editor/tooling with Node in CI; -markup.mjs's parse; -schema.mjsandtoDOM; - the Go golden file; - L4's HTML half over the corpus. - Re-pin estilo, take Mapa's mark and hue, and drop
themeSlug's fallback. - The shell: - the stacked header; - the sidebar, rail, fold and cookie; - the Menu sheet below 800px; - New team page.
- The page: - full window, the kicker line and the title, with rename in both places; - the renderer changes of §5, until L4 passes; - the restyled textarea screen; - the draft bar.
- The Links panel: - the scoped accessor and L6's mutation; - the lists and the map; - the foot fallback, the phone sheet, and the week on daily notes.
- The day pill and the calendar.
- History: the event verbs
relinkedandmarked, summaries, "aged out", and the word diff. - ⌘K's groups and dates.
- Recently edited, and pins (after Q1).
- Gates L7, L8 and L11 for Phase 1, and a preview on its own tailnet port.
Phase 2: the editor:
- The full schema and serialiser: - origins and the side table; - seams; - empty blocks; - the structure check and the reparse rule (L1–L3).
- Byte-preserving
Settleand the no-op commit, in Go (L3, L9). - Mounting: - the JSON island and
/links/resolve; - mounting over the draft; - no shift (L5). - Saving: - autosave and the tab's own draft; - commit,
pagehidewithcommit=1; - the first scratch commit. - Rebase: - the merge in autosave's reply; - the
rebasePOST; - the inline choice through Resolve (L9). - Editing: - chips,
[[,/, input rules and the bubble; - the clipboard; - block anchors. - Make team page from a selection.
- iOS, the accessory row and accessibility (L10), then Edit as Markdown in View.
Each phase ends in review on its branch. Nothing is merged or deployed from here.
13. Build notes
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.
- 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.mjsandtoDOM.make corpus-local DIR=…/oficinachecked 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. - 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. - 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. - 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.
- Task boxes are an attribute,
mapa-task="open|done", drawn by CSS, not an<input>. AtoDOMcontent hole cannot sit beside an input. SafeURLrefuses bracketed IP hosts (http://[::1]/), so the JavaScript port need not reimplement Go's IP parser.- Date chips carry the year when it is not this year: "Wednesday 1 January 2025". Amended by note 85: the label is the reader's locale's CLDR pattern for a weekday, day and month, with or without the year ("Wednesday, January 1, 2025" in en-US, "Mittwoch, 1. Januar 2025" in German; in en-IE, Mapa's default, CLDR puts a comma after the weekday only without the year: "Thursday, 12 November" but "Wednesday 1 January 2025").
- The chip markup is
<a mapa-chip="team|pending|date|block|block gone" aria-label=…>, with a glyph<svg mapa-i aria-hidden>. An alias addstitle="Now called …". A broken date is<span mapa-chip="broken">and an embed is<span mapa-chip="embed" role="img">. - The shell is estilo's bar plus Mapa's own sidebar, not rastrillo's
rst-shell-sidebar. Places are the bar'sNav, which estilo shows only in its Menu sheet below 800px; Mapa's CSS hides the bar's own copy from 800px. - 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/sidebarand/view/linksset cookies, write no row and log no event; gate 8 drives them as view-only routes. Theirreturnmust be a local path. - Recently edited leaves out bulk edits by transaction: any transaction whose events share one actor and one
atand hold more than oneedited(§3.2). It reads at most the person's last 200 qualifying events. - 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 ispinson the member. - 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. Amended by note 78: with script, the in-page notice; without it, still this confirm page. - 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.
- 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. - The map is a 284×200 viewBox with the ring at 104×66, starting at −150°. Its labels are clamped inside the box. Edges between neighbours are drawn once per pair.
- History (§4.5): - The summary's verb is the first event row naming the revision, since delete and freed-alias rows name it too. - Restore's source is inferred: the newest earlier revision in the window with the same text. Otherwise the summary reads "Restored an earlier version". Restore stores no pointer. - The panel's foot appears once a version is chosen, and Restore is left off when that version is the current one. - Each run of unchanged blocks is drawn on its own, so a numbered list split by a change can restart at 1. Emphasis that spans a change shows its asterisks. - The panel is fetched as
?panel=1(Sec-Fetch-Dest: emptyonly). Without script,/p/{id}/historyis the page with the panel beside it. - ⌘K (§4.6): -
/search/suggestanswers{query, date, pages, text, notes, create}. Each group holds at most 5 in ⌘K and 50 on the search page, so title hits cannot push out the other groups. - Snippet marks are UTF-16 offsets, and the script builds<mark>from text nodes. - "next friday" is never today. Three-letter weekdays and "nov 12" are accepted too. - The date row comes first, and that day's note is not repeated in Your notes. - 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. - 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.
- Help has a Colophon (
/help/open-source, "Colophon"), built from estilo'screditspackage: 26 components today, regenerated bymake creditsand checked inmake ci. It lists each project and its licence. It does not yet have the per-package notes from estilo's newercolophoncatalog, 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. - ⌘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).
- The glass recipe and the sidebar's tint stay in Mapa's CSS until estilo's
[estilo-float]exists. The panel's recipe, inlinks.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):
Settle's seams (§6.4, D13). Two blocks that were neighbours in mine keep mine's bytes between them, as theirs' do; only a seam where the sides meet followsJoin. Theirs' leading bytes are kept when its first block comes first. A block both sides changed the same way is taken from theirs. The structure check compares each block's kind, level, list kind and source.- The autosave reply is
{version, revision, merge?}, every revision and version as text (they are int63s).mergeis{against, body},{against, conflict: true, hunks: [{at, count, base, mine, theirs}]},{noBase: true}or{gone: true};atandcountare block positions in the text the request carried, andbase,mineandtheirseach side's exact bytes from the hunk's first block to its last.revisionis left out for an unwritten day and a deleted page. rebase=Rwrites the request'sbodyas the draft too. With no draft, to a revision of another page, past the window, or on a deleted page it answers 422{refused: "rebase"}; a stale version is the existing 409. Nothing moves. Every draft write is now compare-and-swap on the version it read, so two tabs racing cannot both win.commit=1answers as Save does. Version 0 with a body is a tab that never autosaved: its text becomes the draft and is committed. Version 0 with no body is refused (409).- A save that changes nothing reports the outcome it computed: a
Mergedresult equal to the current body still answersmergedwith the body, so the tab takes the teammate's text. From a stale tab it isKept. The draft is dropped only if it is still the version the tab held. Restore still mints a revision: it is its own verb. - Resolve's JSON
outcomeissaved,merged,conflicted,noBaseorkept. A choice that no longer fits (another revision landed, the draft changed, a choice missing) answersconflictedwith the currentrevisionandbody; no draft at all is the 404 it was. - Make team page's
revisionis required: none is stale. The refusal asks the person to choose again. - The first scratch commit (D12) is keyed by a token,
first=<16–64 of [A-Za-z0-9_-]>onPOST /scratch, which the tab draws once for the new page and sends until it learns the page's address. The server keeps (person, token) → page in memory only, for 10 minutes and at most 4,096 at once (past that a new token is refused with 503{refused: "busy"}and makes nothing, note 66; the cap is now 256 per person, note 76), and runs the whole create-or-look-up under one lock. So the first request creates the page and answers{href, page, revision}; any later one with the token is an autosave of a draft on that page, answered like any autosave plus{href, page}; an empty body is 422{empty: true}and creates nothing. Nothing new is stored, so §4 is unchanged. The version check could not key it, because no draft row exists before the page. A token forgotten (past 10 minutes, or across a restart or a CARLOS swap) makes a second page; only a tab still sending its first token that late meets it. - The island is on
/p/{id}(and/p/{id}/history, the current page with the panel),/and/d/{date}written or not, and/scratch/new. Itsbaseis the page's current revision,"0"for a day or page not written yet;draft.baseis the draft's own. Link keys are the target as typed, with#^idfor a block. A date'stitleis the day in words; a pending link's is empty.?saved=1and a day re-shown after a refused Save carry none: neither is the text the draft continues. POST /links/resolvetakes form fieldstarget, each a link key (anything after|is ignored). Over 32 is 422{refused: "too many"}. The answer is keyed by each key as sent; a key with no target is left out.- The draft bar says "You're seeing the saved version" under
?saved=1, with "Show your unsaved version". "Show the saved version" is left off where nothing is saved yet (an unwritten day) and in the Markdown editor. - Gate 1 compares the island's revisions as one value. Revisions are random in both worlds (doctrine §6.6), so they cannot say anything about Ana's notes; the history scope test already did the same for history links.
Phase 2, the client's half (steps 3 to 8):
- The scriptless floor on an unwritten day and on New scratch page (§6.10). Both now draw the empty page the editor mounts on, with "Edit as Markdown" in the kicker and in View; it opens
/d/{date}/editand/scratch/new?markdown=1, today's textarea and Save. Without script that is one click more than before on those two screens. The kicker's "Edit" is now "Edit as Markdown" everywhere. The empty-body placeholder is drawn only under@media (scripting: enabled): without script there is nothing to type in. - L5 runs in Chromium only in
make browser. rastrillo's harness drives Chromium (chromedp) and has no WebKit driver. The gate reads each block's box from the same page with scripts off (the server's drawing, with its CSS) and again after the mount with scripts on, and recordslayout-shiftentries from the start of the load; parsing's end to mount is logged (about 10ms warm here). WebKit was checked by hand with Playwright's WebKit build; the result is recorded where it was run (step 8). - A reload is a close.
pagehidecannot tell a reload from closing the tab: the Navigation API'snavigateevent does not fire for a reload the browser starts. So a reload commits the tab's own draft (D3), and the page it loads can race that commit and still show the draft. The closing request leavesmapa-closing:<drafts>insessionStorage; the page it loads, finding that version in its island, asks again by GET (at most eight times, 150ms apart) until the draft is gone, then takes the page's revision as its base. An own draft that autosave finds committed meanwhile (a 409 withcommitted) goes on as a new draft: from the new revision when the page holds exactly the draft's text, otherwise from the old base, so the server's merge keeps a teammate's text. Typing and closing within that settling window sends the text with the version the page loaded andsettling=1(note 62): the store takes it whether or not the reload's commit happened, so nothing is lost. (Until review round 3 it went as version 0, which the store refused while the draft still existed: the text was dropped.) At worst it meets the person's own committed text as a conflict on the next visit, kept as the draft. "Reload, then close" (L9) holds throughsessionStoragewhen the reload's own commit could not happen (a conflict). - The island carries where the editor saves:
drafts(the page's or the day's…/draft, or/scratchfor New scratch page, withfirst: true) andpage, the public id Resolve's inline choice posts to (left out for a page or day not written yet).LinkStategainsalias, so a chip through an old title is drawn as the server draws it. Neither says anything Bo could not already see of his own pages. - Block shortcuts are input rules; marks are the reparse's.
#,-,*,+,1.,1),[ ]in an item,>, three backticks or tildes, and---,***,___,—-or–-turn the block over as they are typed, so the space typed is not trimmed by the reparse writing-back as-.**x**,*x*and `xbecome marks through the reparse rule (D11), and the next letter typed is outside the mark just made. Enter in a quote ends it (a Mapa quote is one block of lines); ⇧Enter is a new line in a paragraph or a quote. Enter after a task item makes an open task, and after a numbered item the next number. A line of only***` at a block's start is a divider, as Go reads it. - The inline choice locks its blocks twice: they are drawn
contenteditable="false", and a transaction that would change them is filtered out, unless it is the editor's own (a merge applied, Resolve's answer). The choice is posted once every hunk has one. - After a commit the draft bar goes, and the Links panel and the page's foot are drawn again from a GET of the page (§6.8: "refetched after each commit").
- Leaving inside Mapa is a plain click on a same-origin link to another page. A form posted from the page (a menu's Pin, say) leaves through
pagehide, which commits the tab's own draft as a close does. A commit answeredKeptis followed by an autosave, whose 409 brings the newer draft, offered. [['s rows (§6.6)./links/suggestis unchanged, so its rows do not say which are aliases: the list asksPOST /links/resolvefor the rows it shows (the same scoped answer the chips use, kept for them) and labels an alias "Old title of …". A typed ISO date's row comes first, as the day's note; "Link '…'" comes last, only when no row's title is the text typed (folded).- The
/menu's Date opens the date picker (build note 83); "Today's date", beside it in/and in Insert, still inserts today's chip at once, in the viewer's zone, after a selection rather than over it, and after a space when it follows a!(note 83, review round 7). Backspace into a chip still opens[[2026-11-14with the list, so another date can be typed there too. (Until note 83, Date inserted today: there was no picker.) - The ¶ handle sits at a block's start, out of the text's flow (so it moves nothing at mount, L5), shown on hover and focus, and hidden on coarse pointers. It copies
[[Title#^id]], which pastes as a block chip anywhere in Mapa. - The browser gates press Enter as one
keyDowncarrying\r. chromedp'sKeyEventsends a separatecharevent, which a cancelled keydown does not stop, so an Enter the editor took (choosing from a list, splitting an item) was typed a second time. Browsers send the one event. - Make team page answers JSON when asked (§6.7), as Resolve does:
{href, revision, body}, the new page and the note as it now stands, which the editor takes as its text and base. A refusal is 422{error, taken}with the form's own sentence. The form's redirect is unchanged. The command is in the bubble on a private note (a day, a scratch page, or a page the Page menu offers to share); a selection across blocks shows the bubble too. The block numbers are read from the committed body and checked block by block against what the editor wrote; if a merge in that commit changed a chosen block, it asks the person to choose again. The confirm button holds for 650ms (L11). "Moved to …" stays in a bar until the page is next opened. - The editor carries no
aria-expandedwhile[[or/is open (§6.12 asked for it). ARIA 1.2 does not allow it on atextbox, and axe flags it (aria-allowed-attr), which L10 forbids. The editor hasaria-controlsnaming the listbox andaria-activedescendantnaming the chosen row, and the polite live region says the count. - Two of Phase 1's screens failed axe, and are fixed. The map's links sat inside
role="img"(nested-interactive): the image role and its label are now on a group inside the SVG, and the pointer shortcuts are a sibling group,aria-hidden, stilltabindex="-1". The picture and its label read as before. And estilo's stacked bar hides the app's name withdisplay: none, which leaves the brand link with no name (link-name); Mapa keeps the name visually hidden instead. That one is estilo's to fix (Docs' bar has it too), to be reported upstream. - The keyboard reaches the bubble with ⌥F10, as in most editors; arrows move along it and Esc goes back to the text. With blocks selected, Page → Make team page… starts from the selection, as the bubble does; with none it is the page of checkboxes. Help → Keyboard shortcuts lists the editor's keys.
- A task's box in the editor is a named button ("Not done: Send Tom the summary",
aria-pressed) laid over the box the server draws, out of the flow, 24px (32px on a coarse pointer). Once mounted, the CSS box's own alternative text is emptied, so it is read once. A click toggles[ ]/[x]without moving the caret. - The accessory row shows on a coarse pointer under 800px while the page's text has focus, kept above the keyboard by
visualViewport. While the keyboard covers more than 80px,<html data-mapa-keyboard>hides the Links sheet's peek line. - WebKit and the iPhone, by hand. L5 was run in Playwright's WebKit (playwright-core 1.65, WebKit build 2388): the blocks' boxes with scripts off and on agree on all 24 loads (three widths, light and dark, three team pages and a day); WebKit has no
layout-shiftentries to read. Typing beside chips in WebKit writes what it should. Not checked: a real iPhone (devicectlhangs here), so IME composition, dictation and autocorrect beside chips, and the selection callout, still want a check by hand through Safari's Web Inspector. - axe-core 4.10.3 is vendored in
internal/mapatest/testdata/axe/(MPL-2.0, its licence beside it) and injected by the gate, which fetches nothing. It is test-only, not in the release build, so the Colophon does not list it. - The draft bar's "Show the saved version" does not commit. It is a link inside Mapa, so leaving would commit an own draft first, and
pagehidewould too; a plain click on a link in the bar holds the editor's commits instead, stores what was typed as the draft, then follows the link (note 61; until review round 3 it stopped the editor, and unsent text was lost). - A new page opens with the caret in its body (§4.7): the editor takes focus at mount when the page's text is empty, except on a day (the home page), where focus would raise a phone's keyboard on every visit.
Fable's final review of 58fd476 (round 3, §14):
- A page deleted mid-edit keeps what is typed (review round 3, H1). Of the two fixes offered, the editor keeps autosaving the draft and never commits; making the view read-only was the other. Autosaving never loses text: what was typed between the autosave that met the delete and its reply is stored too, and the person can go on writing while they decide. The store accepts the writes when the person already has a draft on the page (
mayDraftallows a deleted page's own draft); a page deleted before the tab's first autosave is refused (404), and note 74 covers that case. (Round 3 said the store accepts the writes without that condition, which was wrong.) The save status says "Saved as a draft" (notices.mjs, a state estilo's savestatus has no words for), the bar says nothing typed is saved to the page, and its Save as a scratch page and Discard store the typing first and post the version the tab now holds. Leaving inside Mapa goes (the draft is Today's offer); closing writes the draft withoutcommit=1. The other stop of the same shape, an offered draft another tab committed (409committed), no longer stops either: the tab shows the page as it now is and typing is a new draft. - A commit is a reply with a revision (H2). An emptied draft on an unwritten day commits nothing:
commitDaydrops it if it is still the version the tab held (DiscardDraft, a draft write, exempt from gate 8 by name, §5) and the store answersErrEmpty; the handler answers{saved: false, empty: true, href: "/d/<date>"}(a form goes to the day). A page deleted under the commit (ErrPageGone) answers{saved: false, gone: true, href: "/"}and keeps its draft. The saver takesemptyas a fresh start from version 0,goneas note 58's state, and any other answer withoutrevisionas a failed commit. - Resolve commits from the text on screen (M1). Text typed since the conflict's reply is autosaved first, so Resolve's
versionis the draft that holds it; if that reply carries a different choice, it is shown to choose again. While the POST is out the editor takes no typing (the conflict plugin'sisBusy: a filter on transactions and a cancelledbeforeinput), so the answer never lands over text it did not include. A reply carrying the same hunks for a newer version keeps the choice on show and what was picked in it. - Commits held, text still written (M2). With a choice open, a page deleted (note 58) or commits held (note 56),
pagehidestill writes the text not yet sent, as the draft only, withoutcommit=1. Closing sendsprepare()'s text, the structure check's, as autosave does. settling=1(M3; amends note 38). A closing POST from a page still settling carries the version the page loaded andsettling=1; the store then takes that version or, when there is no draft, a new one, which is all version 0 allowed. When the reload's commit did happen, the new draft starts from the old base, so a block the person extended meets their own committed text as a conflict on the next visit: kept, never dropped (TestL9ClosingWhileSettlingWritesTheTextEitherWay).- Any autosave reply without a conflict ends the choice on show (M4), including a clean merge left unapplied because of typing; commits are then no longer blocked.
- A fence's info string may hold U+2028 or U+2029 (M5). The editor read the opening line with
., which matches neither, and threw at mount; Go reads them as text. Two corpus bodies put U+2028, U+2029, U+0085 and U+FEFF on fence lines, at the top level and in a list. - The parser's scans are linear, in Go too (M6).
cleanBodytrims with a loop. The link tests read per-text tables built in one pass (Scaninmarkup.mjs,scan.go), answering exactly what the regexes and the]]search answered (L4 holds the corpus unchanged). Go'sSpanswas quadratic too, and worse: 68 to 117 seconds over 80,000 bytes of unclosed links, on every view of such a page and in the index.linear.test.mjsandTestTheLinkScansAreLinearhold 80,000 characters of each shape under 750ms; the old code took 5 to 41 seconds in Node and over a minute in Go. - Lows fixed in round 3. The view forms'
returnusessafeReturn's rule (no control character at all). The first scratch commit's token map refuses a new token when full instead of forgetting it (note 31). L7 pages the month calendar. The marker rule keeps an^idon the block that held it before the edit, so a duplicate typed above never takes it. A copy-dragged block (the very node it copied) is reparsed. Undo and redo are guarded: a step prosemirror-transform throws on is refused. - Lows recorded, not fixed. - A commit that merged while the person kept typing in that block keeps the old base (today's
mapa.jsrule), so the next commit meets the person's own committed text in that block as a conflict, shown inline; nothing is lost. Note 62's settling draft is the same. The fix wants a three-way merge in the editor against the text sent, or the sent text carried to the server; neither is cheap. - An autosave in flight when the tab closes. The closing POST carries the version from before it; when the in-flight write lands first, the close is a stale 409. The in-flight text is stored as the draft and offered on the next visit; what was typed after it was sent is lost unless the tab is restored. That is bounded by one round trip of typing: the close comes before the reply. A stalled request would stretch it to the stall's length; post's 10-second timeout (note 75) caps that. Fixing it needs the tab to know the next version before the reply (a version the client draws) or the store to accept the previous one: a protocol change, left. It is the same class of limit as the 64KB keepalive cap. - A commit in flight when the tab closes, the same shape: ⌘S, more typing, then ⌘W inside the commit's round trip. The commit lands first and drops the draft, so the closing POST (commit=1with the old version) meets a 409committedand writes nothing: the typing after ⌘S is lost. Same bound, same fix. - The smallest protocol change, a follow-up, not built (Fable's): each autosave and commit carriesnext=N, a version the tab draws; a closing POST sendsversion=V&sent=N, and the store accepts the draft at either V or N. Then a close never meets its own request in flight. - The marker and reparse rules still fight over a block whose text is only its marker.- ^abreads as an item whose text is^aband whose marker isab(Go counts the item's space as the marker's). Duplicated, the marker rule takes the copy's marker and the reparse gives it back, until settle's four rounds run out. Fuzzing L3 with other seeds and 40 steps finds it in 1 to 5 bodies of 760 per seed, at58fd476as now. Fixing it means drawing a marker-only block as empty text with a marker, which changesfromMarkdownand the serialiser together under L4: left for its own change. - Undo's root. Settle's transaction, with the steps that set blocks' origins, is in undo history; inverted and mapped through later edits, such a step can land on a text node. Note 66 guards it; it is not removed.
Smooth navigation (Paul, 14 November: "clicking links should feel very smooth and solid"; §6.9):
- A block link lands without a jump, and without script. A block chip's address is
/p/{id}#b-…, and the browser's own fragment scroll used to put the block at the window's top edge, under the 56px sticky bar, with nothing to say why the page had moved. Nowhtmlhasscroll-padding-block-startof the bar plus 16px, so any in-page target (#main, a heading) clears the bar, and a block ([id^="b-"]in the page's body, so pages, days, scratch pages and History's versions alike) has ascroll-margin-block-startthat puts its top 40% of the way down the view the bar leaves: 353px of a 1280×800 window, 389px of a 390×844 phone. 40% because a block starting there or above in the first screen (a page's title and its first few blocks, the usual target on Mapa's short pages) is not scrolled to at all, while a deep block still arrives in the upper part of the view, with what leads to it above and room for what follows; a page too short to scroll never moves. CSS cannot say "only if it is not already in view": a fragment always aligns the start, so a block starting between 40% and the first screen's foot is still moved up to 40%, by less than the screen. The block is tinted with the accent's soft fill, which holds and then fades over 1.8s; underprefers-reduced-motionit holds 1.5s and goes, without a fade. The tint is a box shadow (inset for the fill, spread 4px for its rim), so nothing is laid out again and a code block's own background stays under it. The editor draws the block anew as it mounts (here the server's<ul>is replaced before first paint); in Chromium and WebKit the new element does not match:targetatDOMContentLoaded, but both match it again by the end of the load, and the tint's animation starts then, once (measured: onemapa-arriveanimation, current time equal to the time since load). The gate (TestABlockLinkLandsWithoutAJump,make browser) clicks a chip to an early and a deep block at 1280×800 and 390×844, scripts off and on: the early one scrolls nothing, the deep one's top is within 2px of the 40% line, and both match:targetand are tinted. Without the block's margin it fails: both blocks land 16px under the bar, from the padding alone. - No screen scrolls by a stray pixel.
[mapa-sr](the visually hidden class) was absolutely positioned at its static place, so the editor's two live regions (the[[and/lists'), appended to<body>, hung 1px below the page's end and every page with the editor scrolled by that pixel (scrollHeightwas the window's plus one). It is now pinned to its containing block's corner (inset-block-start: 0; inset-inline-start: 0), as well as clipped. The gate (TestNoScreenScrollsByAStrayPixel) loads a day, an unwritten day, a short page, its History, Scratch, New scratch page, Search with and without a query, Settings and All pages at 390, 800 and 1280px wide and 800px tall, scripts off and on (after the mount), and requiresscrollHeightto be no more than the window or the body's own flow, whichever is taller: a short page cannot scroll at all. - A page is fetched when the pointer rests on its link. Every shell page's response names Mapa's speculation ruleset in a
Speculation-Rulesheader ("/speculation-rules", served frominternal/mapa/speculation.jsonasapplication/speculationrules+json, which a file under/static/would not be). It is one rule: prefetch, never prerender, so no script of the next page runs before it is opened; document links matching/p/:pageor/d/:day; eagernessmoderate(on a desktop about 200ms of hover, or pointer-down). No inline<script type="speculationrules">: the CSP refuses inline scripts, and a ruleset by header is not a script. Mapa's header replaces rastrillo's default one, whose prerender rules select rastrillo's own shell sidebar, which Mapa does not draw (build note 9), so it matched nothing. A prefetch is a GET, so it writes nothing (gate 10);TestAPrefetchWritesNothingsendsSec-Purpose: prefetchGETs for a page, two days and Today as a teammate who has never written, and no row changes, drafts and events included. Measured in Chromium: the page is answered from the prefetch (deliveryTypeisnavigational-prefetch) although it isCache-Control: no-store. One case would show a stale page: the editor commits the tab's text as it leaves (§6.5, build note 43), after the hover fetched the next page, so that page would not show the commit (its Recently edited, its Linked from). So while the tab holds text that leaving would commit,editor/page.mjssets<html data-mapa-uncommitted>, the rule'snot selector_matchesstops matching, and Chromium evicts what it fetched (PrefetchEvictedAfterCandidateRemoved); the click then goes to the network after the commit.TestHoveringALinkPrefetchesThePage(make browser, a hovering mouse) checks both halves, and fails without the guard. Browsers without speculation rules (Safari, Firefox) ignore the header. - Cross-document view transitions were tried and left out.
@view-transition { navigation: auto }with the bar, the sidebar and the Links panel named, swapped in place with no animation, and only the page crossfading in 100ms (none under reduced motion) worked as designed in Chromium and Playwright's WebKit, with no measurable delay to first paint, the glass panel unchanged, and the frame's pixels the same mid-transition as after. But it cost two things the brief rules out. Chromium takes no input while a transition runs: a click 0 to 50ms after a page arrives was dropped every time (75ms and later landed), with::view-transition { pointer-events: none }too, andTestAPostHoldsAndAViewSwitchDoesNotfailed on it. And when a navigation starts while the previous one's transition is still running, Chromium sometimes rejects the new page's transition with an uncaughtInvalidStateError: Transition was aborted because of invalid state. Page already revealed, which no page script can catch (it is rejected afterpagereveal, scripts off too), so gate 7's no-console-error walk with scripts off failed in 2 of 4 runs, and a loop of its first three steps in 1 of about 100. The race is in the browser, so a real person's console would show it too. What it would have added is small: a same-origin navigation already keeps the old frame on screen until the new page paints (paint holding), and a screencast of four navigations without transitions shows no blank or partial frame; the bar and the sidebar are the same pixels before and after. A same-document transition would need a client-side router, which is not Mapa's shape. Worth trying again when Chromium lets input through during a transition. - Back and forward, and where a move lands (an audit, no change). Chromium (Chrome's back/forward cache for
Cache-Control: no-storepages, measured with the cache enabled) restores a screen without the editor, such as All pages, from the back/forward cache:pageshowwithpersistedtrue and no request.no-storestays on every signed-in page, as it should. A page with the editor is restored too, and then reloads itself on purpose (Saver.shown, §6.5: with nothing unsaved, the page is loaded again, since a teammate or the commit made on leaving may have changed it). A screencast of going back to a long page scrolled 1500px down shows no blank frame: the restored page, then the reloaded one, the same pixels, still at 1500px. It costs a full load on every Back to an editor page; asking the server by GET whether the revision moved, and reloading only then, would make Back instant there, and is left as a follow-up. No script has anunloadhandler (estilo's busy.js adds abeforeunloadonly while a held POST is in flight, which does not stop the cache). Safari's back/forward cache was not checked: Playwright's WebKit restored nothing, for any page. Where a move lands: from a page scrolled 1200px down, a sidebar item, a Links-panel chip and a ⌘K result each open the next page at the top, and a day-strip day and the day pill's step do too, withscrollY0 on every frame for 1.2s after load. New scratch page (1440 and 390 wide) and a new team page take the caret at mount (build note 57) and do not scroll: ProseMirror focuses withpreventScroll.
- Settling that finds a merged commit goes on from version 0 (review round 4, M-A). When
settle()found the loaded draft committed but the page holding more than its text (a teammate's merged in), it left the version at the loaded value and stopped settling, so a close sent that version withoutsettling=1and the store, finding no draft, answered 409 and wrote nothing. It now goes on from version 0 and the old base, asrecover()does. A different draft found while settling (another tab's) is shown at once, offered, when nothing is typed yet; typed text before that still meets it as a 409 at the next autosave and is replaced, which would want the merge note 67 records. - A page deleted before the tab stored any draft on it (M-B; corrects note 58).
mayDraftrefuses it (404): the person has no draft for the store to keep. The saver takes a 404 from the drafts route as that state: it sends nothing more there, the status says "Not saved", and the bar offers Save as a scratch page, which posts the text to the existingPOST /scratch. Leaving inside Mapa shows the offer again beside Leave anyway; a close makes the scratch page with one keepalivePOST /scratch, so what was typed is never only in a closed tab. - A bar's action does not go on a failed flush; a hung POST times out (L2, L3). Save as a scratch page and Discard are not sent when the flush before them failed, and the bar says so; Show the saved version offers Leave anyway instead of going.
post.mjsaborts a request after 10 seconds (never a keepalive one), and the saver retries. An aborted request may have landed; every draft write is version-checked, so the retry meets a 409 whose body is the text that request sent, and the saver takes that as its own: its version, and the typing since autosaved, never replaced. - The first scratch commit's tokens are held per person (L4; amends notes 31 and 66): at most 256 each, refused past that, so one person's tabs never use up anyone else's.
New team page and the rail's tooltips, unclipped (Paul, 14 November: clicking New team page showed nothing usable):
- Nothing leaves the sidebar by overflowing it.
[mapa-side]scrolls (overflow: auto), and two things drew outside it and were cut off: New team page's form (285px wide in a 224px sidebar, so its right side went; beside the rail, all of it) and every rail tooltip. The sidebar keeps its scrolling (long Pinned and Recently edited lists need it); what leaves it no longer belongs to its box. - The popover is a nativepopover(#mapa-new-page,role="dialog"), opened by apopovertargetbutton at the sidebar's foot, so it needs no script: the top layer, which no overflow clips, and the platform's own Esc, click outside (light dismiss) and focus, which moves to the title (autofocusinside a popover) and back to the button on close. Placed by CSS anchor positioning: above the button in the open sidebar, beside it on the rail and in the default between 800px and 80rem, withposition-try-fallbacks: flip-block. An engine without anchoring puts it fixed beside the sidebar's foot (inset-inline-start: var(--mapa-side-w) + 10px, 12px up); one without popovers shows a plain link to/newinstead of the button. It is drawn after<main>, not in the sidebar: WebKit gives a page's autofocus to the first[autofocus]in the document even when hidden, and the popover's field took it from the New page and Rename screens' own (measured:<div popover><input autofocus></div><input autofocus>focuses nothing in WebKit 2388). The menus'name="estilo-menus"group: a popover is not a<details>, so the name does not apply, but the exclusivity holds both ways where it can. Pressing on a menu's title light-dismisses the popover with no script, and opening the popover closes an open menu through estilo's chrome.js (a click outside it); with scripts off a menu left open stays open under the popover, as two<details>menus never could. Esc closes whichever is open. - With script (mapa.js,newTeamPage) the popover postsPOST /pagesitself withAccept: application/json, held 650ms with the busy spinner (the form carriesdata-busy="false"so busy.js leaves it), and goes to the page the reply names, where the editor takes the caret (note 57). A refused title (taken, empty after trimming, too long, a date) answers 422 with the sentence and, for a taken title, its page; the popover shows it under the field with "Open the page with that title", the typing kept and focus back in the field. An empty field is refused byrequiredbefore anything is sent. Esc gives focus back to the button: WebKit does not focus a button on a click, so a mouse-opened popover returned focus to the body. Without script the POST goes as a form, and a refusal is the New page screen with the sentence and what was typed. - The tooltips areposition: fixed, which escapes a scroller that is not the box's containing block. Where the engine anchors, each is tied to its own row (anchor-namewithanchor-scope, so every row's one name means that row) and follows the rail when it scrolls; elsewhere it sits at its static position, the row's corner, moved out 50px by margin. The static position does not follow a scrolled rail, which only scrolls below about 330px of window height. - New page is one title field (bug 3): the screen behind Page → New team page,/new, ⌘K's Create and a pending link drew the Markdown textarea under the title, borderless and half the window tall, so Create and Cancel sat 490 to 530px under the field and off a 877px window. It is now the title and the buttons, as Rename is and as §4.7's popover is; the page's text is written on the page once it exists, with the caret already there with script, and through the page's Edit as Markdown without. A body that comes with a refused POST (no screen sends one now) rides along in a hidden field, so nothing is lost. Gate 7's walk creates Acme, then writes its text through Edit as Markdown. - Gates (newpage_browser_test.go,make browser), each failing on1e92f29:TestNewTeamPageShowsTheWholeFormopens New team page in six sidebar states (1400 and 900 wide; no cookie,openandrail) and at 390 by Page → New team page, scripts off and on, askselementFromPointat the four corners of the title field and Create (3px in, past their rounded borders) for the form, checks focus is in the title, then types a title and presses Enter and waits for the page (on1e92f29: the corners hitmainin every sidebar state, focus stayed on the summary, Enter made no page, and at 390 Create was below the window);TestNewTeamPageRefusesATakenTitleInPlace;TestTheNewPageScreenKeepsItsButtonsUnderTheField(within 48px at 1402×877 and 390×844, scripts off and on; 488 to 526px on1e92f29);TestTheRailsTooltipsAreWhole, which hovers every rail row by width and by cookie and hit-tests the tooltip's corners (every one cut off on1e92f29).TestNewTeamPageAnswersThePopoverholds the JSON replies. By hand in Playwright's WebKit (build 2388): the popover's box in all five states matches Chromium's to the pixel, every corner hits, focus goes to the title and back to the button on Esc, a taken title is refused in place with scripts and on the screen without, Enter creates in both, and the tooltips are whole, a scrolled rail included.
The in-page title (Paul, 14 November: "Why can't I click a title to edit it?"):
- The in-page title renames, as §4.1 asked (Paul: "Why can't I click a title to edit it?"; amends note 13). - The field. On a team page the editor mounts on (
/p/{id}, not History, not?saved=1, not the Markdown editor), the server marks the H1mapa-renameand wraps its text in<span mapa-title-text>; without script that is the plain heading it was.editor/title.mjsmakes the spancontenteditable,role="textbox", named "Title, renames the page". The heading keeps the title as its own name, read from the textbox's value, so heading navigation is unchanged. An input styled as the H1 was not chosen: a title wraps and an input does not, so a long title would shift the page, and a click on its second line could not place the caret. It iscontenteditable="true", notplaintext-only, which Chromium forces topre-wrap(a line's end space kept and measured, so a wrapped title's box changed at mount); breaks and formatting are refused onbeforeinput, and paste inserts text only, one line. CSS gives the span the heading's ownwhite-space,overflow-wrapandline-break, so nothing moves when it becomes editable; the focus ring is an outline on the H1. - Keys. Click, tap or Tab to it; Enter, ⌘S or blur renames; Esc puts the title back and writes nothing; an empty or unchanged title sends nothing (blur restores the title). Enter is never acted on while composing (isComposing, keyCode 229). A refused title left by blur is not sent again until it changes. - One pending state. The header's title field, on that page, goes through the sameRenamer: its submit is taken over (the busy shim leaves a cancelled submit alone). While one rename is out, both show the title on its way, the header field is read-only, the H1 refuses typing, and a second rename is not sent. The state holds at least 650ms (the busy rule), with estilo's spinner and "Renaming…" in the note under the H1, and on the header's Rename button when it sent. - The POST.POST /p/{id}/renameanswers JSON when asked, as Make team page and Resolve do:{title, href, from, to, links, count, aliases}, wherefromandtoare the revisions the rename was made over and minted ("0"both for an unchanged title) andlinks/countthe confirm page's own scoped count (AliasLinkers, gate 1 compares it). A refusal (empty, too long, link syntax, date-shaped, taken by a title or an alias) is 422{error, taken}, the form's sentence and the page holding the title: the same shape, from the same helper (refusedJSON), asPOST /pages(note 77) and Make team page.POST /p/{id}/linksanswers{changed, notice}. Without script both redirect as before. - When it lands, with no reload: the H1, the header field (value,defaultValuefor estilo's Esc, refitted),document.title, the sidebar's entry, the kicker's "Also called", the editor's name ("Page text, …") and the Links panel and foot (refetched, as after a commit). The kicker's "Edited by" is not redrawn until the next load. - Update links in the page. With links to update, the note under the H1 says "Renamed. N pages you can edit link here by an old title." with Update links (the existing POST, held by the busy rule) and Not now; with none, "Renamed. The old title still leads here." Without script, rename still lands on the confirm page (note 13). - Refusals are said in the note,role="alert", with "Open the page with that title" when one holds it. The field it was typed in keeps the text (aria-invalid); the other shows the page's title. - The draft follows the rename. A rename mints a revision holding exactly the body of the one before (base §3.2), so the store moves every draft on the page based on that revision to the new one, in the rename's transaction (carryDrafts; only the base, never the text, the version or the time written). The tab's saver moves its own base the same way (Saver.renamed). Before, a draft open across a rename committed asMerged, "merged with a teammate's changes", against a revision that changed only the title, and the editor rebased for it. - Gates.internal/mapatest/title_test.go(JSON answers, refusals, Update links, the draft carried, which pages are renamable);title_browser_test.goandtitle_quality_browser_test.goinmake browser(click, type, Enter; Esc; a taken title; no double submit; not on daily, scratch or History; no shift at three widths and the caret where clicked; typing and draft kept with no rebase; axe in each state);editor/title.test.mjs(the shared state). Gate 1 compares the JSON answers. WebKit (Playwright 1.65.1, build 2388) by hand on the preview: no shift at 1440, 1000 and 390px, the caret where clicked, Esc, rename, refusal and the header all as in Chromium. IME composition was not driven by hand; it rests on theisComposingguard.
The title's follow-ups (Fable's review of ux/fixes-1, 315d8d7, APPROVE; branch fix/title-followups):
- The title renames on leaving the field, not the window; a rename carries only drafts on its own base; and a lost reply is recognised (amends note 78). - Whose drafts a rename carries. Only drafts based on the revision the rename was made over (note 78's rule, now gated). Bo drafts on R0, Ana edits (R1) and renames (R2): Bo's draft stays on R0, so his commit merges and keeps Ana's edit. Carried to R2, it would be a plain "Saved" over her edit.
TestAStaleDraftIsNotCarriedandTestATeammatesDraftOnTheHeadIsCarried(title_drafts_test.go).make mutatenow dropscarryDrafts' base filter (Where("page_id = ?", pageID)) and requires the first to fail. Before this, the mutant passed every gate. - An autosave in flight never puts back a carried base.writeDraft's compare-and-swap holds the base it read as well as the version (swapDraft). If the base moved while the version stayed the same, a rename carried it between the autosave's read and its write. The write then goes on over the carried base and keeps it. A rebase still sets the base it asked for. Another tab's write in between is stillErrStaleTab. Bumping the version incarryDraftswas not chosen: it would 409 every carried tab's next autosave, not just the one in flight. The saver answers a 409 it cannot recognise as its own by replacing the text on screen with the stored draft ("newer"). A base-only compare-and-swap that answered 409 would do the same to the in-flight one. The retry is in the store, so the tab hears nothing.TestAnAutosaveInFlightKeepsTheCarriedBase(internal/mapa/drafts_carry_test.go, the rename put between saveDraft's read and write),TestAWriteFromAStaleTabIsStillRefused. - Blur. A blur whiledocument.hasFocus()is false or the page is hidden (Cmd-Tab, another tab, another window) is not leaving the field. The edit stays open and nothing is sent. Coming back gives the field its focus: browsers restore it, and where one does not, a windowfocusputs the caret back at the end. Leaving the field within the page, or Enter, then renames. A blur within the page renames as before. - Closing with an edited title renames it (the choice L1 asked for). It works as closing commits the page's text (§6.5, D3): one keepalivePOST …/renameonpagehide, with the title as typed. A reload is a close here too. It sends nothing for an empty or unchanged title, or for a refused one left as it was. A rename still out at close is sent again, since leaving may cancel the first. A title already in place is no change, so it lands once. The edit is never silently dropped. The cost: a half-typed title left in a closed tab is the page's title. The close cannot show a refusal: a refused title is simply not applied. - A rename whose reply was lost. Before, the H1 said "Not renamed" though the rename had landed. Enter again gotfrom"0"andSaver.renamedskipped it, so the tab's base stayed on the pre-rename revision. Now, for a title that is already the page's,POST /p/{id}/renamestill writes nothing, but it answersfromandtofor the rename that put the title there, if that rename minted the current revision (renamedTo, read from the event log). The retry is then "Renamed", and the saver's base follows. Once anything else mints a revision, an unchanged title answers"0"and"0"again.TestARepeatedRenameAnswersTheRenameThatLanded;TestTitleARetriedRenameThatLandedMovesTheBase(browser, the first reply dropped in the page). - The guards, gated (M2), inmake browserwith trusted input through the DevTools protocol (title_guards_browser_test.go): - IME Enter. A composing Enter does not rename. This coversInput.imeSetCompositionthen Enter, which arrives withisComposing, and Safari's composition-ending Enter (keyCode 229). - Paste. A paste of bold, a link, a<br>and a paragraph lands as one line of plain text. - Breaks and formatting. Enter, Shift+Enter (also as keyCode 229, as an IME or Android sends them), ⌘B and ⌘I insert nothing. - Red, each guard removed in turn: -isComposingalone: the composing case renamed to "…か"; - keyCode 229 alone: the 229 case renamed; -beforeinput's break and format refusal: 229 Enter and Shift+Enter left<br><br>, ⌘B a bold span, ⌘I<i>; - the paste handler: the paste left the copied markup. - Held elsewhere. A trusted Enter or Shift+Enter with keyCode 13 is held by the keydown handler, notbeforeinput. - On a Mac. Ctrl+B is the Mac's "back a character" and never bolds there. - The hidden body on a refusedPOST /pages(note 77) is gated:TestARefusedNewPageKeepsItsBodyHidden. It checks the body is escaped, its lines are intact, and sending it again with a free title makes the page with that text. - Android's Enter renames (built at the coordinator's request, after Fable's review). Android's keyboard sends Enter as keyCode 229, which the keydown handler leaves alone because it may be composing. The break then arrives asbeforeinputinsertParagraph, not composing. AbeforeinputinsertParagraphorinsertLineBreakwithisComposingfalse now renames exactly as Enter does. It is still refused, so it inserts nothing, and a rename already out is not sent again. A break withisComposingtrue still does nothing. With a word still underlined (Gboard composes as you type), Chromium ends the composition first, and the break that follows is not composing, so it renames with the word in. Gates: -TestTitleAndroidsEnterRenamescovers a 229 Enter after typed text and after an open composition; each renames once and inserts nothing. Red on the bundle without the fix: "never: the rename from Android's Enter". -TestTitleAComposingEnterDoesNotRenamegains "a composing break": abeforeinputinsertParagraphwithisComposingtrue. Chromium never sends one, so it is made in the page. Red with theisComposingcheck dropped: renamed to "… X". - The desktop composing cases (isComposingkeydown, Safari's 229 keydown with no break) stay green.
Paul's rulings of 2026-11-16 (Fable's recommendation on the sidebar; branch feat/sidebar-and-page-link). Note 79 is fix/title-followups'.
- Recently edited is team pages only, and the sidebar has one full highlight (amends §3.2 and §11 Q2). - The ruling. Paul took Fable's recommendation: Recently edited lists team pages only. No scratch page and no daily note is in it, and no scratch page's first line is anywhere in the sidebar, the rail's tooltips and estilo's Menu sheet included. The reasons are §3.2's: Today covers days, so Scratch covers scratch; ⌘K already separates "Your notes"; the list has six slots; and on a shared screen private first lines would show on every page. - The list.
recent.goreads only events on live team pages: the query joinspagesand keepsrung = 'team'and notgone, both plaintext (§4). Private writes are never in the window of events it reads, so no number of them pushes the team pages out (Fable M1: filtered afterLIMIT 200, 210 scratch writes emptied the list). It was first a window of the newest 200 events that grew fourfold to a cap; Fable's re-review of168d97b(round 6 addendum, L1) found that costs 46ms a page view for a person who edits few team pages, and at the cap it shows one page. It is now one query (recentQuery): a loose scan of a new index,idx_events_actor_page(actor, kind, object; migration 0004), visits each page the person wrote in once; for each live team page, its newest write that counts is read back from that page's end of the index, stopping at the first; the six newest are kept. A plainGROUP BY object_idwithMAX(id)was measured first and rejected: it reads every one of the person's events (13ms at 20,000 and 150ms at 200,000; 36ms and 400ms with the bulk test). The bulk test reads one transaction throughidx_events_at, named withINDEXED BYbecause the planner otherwise takes the person's whole index for it. The cost now follows how many pages the person wrote in, not how many times:
| Apple M1 Max, 20 runs (BenchmarkRecentEdits*) | before | after | |---|---|---| | 20,000 events, all on one of six pages | 45.8ms, 1 page shown | 0.27ms, 6 | | 200,000 events, all on one of six pages | 47.3ms, 1 page shown | 0.28ms, 6 | | 20,000 events over six pages | 0.60ms | 0.29ms | | 200,000 events over 1,000 pages | not measured | 9.5ms |
The last row is the trade: about 9µs a page written in. A person with thousands of pages behind them would pay milliseconds; a first pass over the newest events, falling back to this query only when it cannot prove its six, would take that back, and is not built. TestRecentlyEditedReadsByIndex holds the plan to the two indexes and no scan of events. The scoped view still filters what it returns. A private page's label is never drawn there. Bulk detection now sees only team events; Update links still marks its transaction bulk by the team pages' relinked, and Make team page's new page logs created, so both count as before. - Scratch. The row stays. Its screen says "Only you see these: untitled notes, the last edited first", and lists them in that order (Index.ordered, as before). - Pins. A note of your own can be pinned (it always could). It stays in Pinned, as the person chose it, with a lock glyph at the row's end and ", only you see this" in its name. The rail hides Pinned, so its tooltips never show it. - One full highlight. side.go's light gives aria-current to the first row that is the page on screen (Pinned before Recently edited), and then takes it off the page's place. A past day lights Today, as today's note does: Today is where days are kept, and the day pill says which day; the old dayNav lit nothing for one. A team page in neither list lights All pages; a scratch page, Scratch; a pinned scratch page, its row. - The rail, with and without script. The rail hides the page rows, so there the place must be lit, and with no cookie only CSS knows the sidebar is a rail (by width). So a place holding a page that has its own row is drawn twice: unlit (mapa-side-holds="open") and lit (mapa-side-holds="rail"). CSS shows the unlit copy in the open sidebar and the lit one in the rail, by the same selectors that fold it. The lit copy also carries hidden, which the rail's display: grid outranks, so with no CSS at all only the page's own row is lit (Fable low 4). The cookie, the width and ⌘\'s fold in place all agree, with no script and no aria-current moved by script. A hidden copy is out of the accessibility tree, so exactly one lit row is ever exposed. The Menu sheet's rows are the places, and the page's place is lit there. - Gates. sidebar_ruling_test.go (server, so the scriptless screen): no scratch or daily row in Recently edited and no private first line in the sidebar or the bar's nav, on five screens with each cookie; the Scratch screen's order and label; a pinned note's lock; one highlight for eight kinds of page, open and in the rail. sidebar_browser_test.go in make browser, scripts off and on, at 1400 and 900 with no cookie, open and rail: exactly one visible aria-current for nine screens, the sidebar's text (the tooltips are its labels) holding no private line; at 390 the Menu sheet; ⌘\ moving the highlight from the row to All pages and back. Red on 510eaa5: two rows lit on a team page in Recently edited ("All pages | Quarterly plan"), on a pinned one three ("All pages | Pinned plan | Pinned plan"), on a scratch page "Scratch | Zanzibar secret first line", on a day "Today | Monday 16 November 2026", none on a past day; the private line in the sidebar's markup, also at 390 where only the Menu sheet shows; and no lock. - Gates added after Fable's re-review of 168d97b. TestRecentlyEditedOutlastsManyEditsToOnePage: six team pages, then 900 edits to one, and all six are listed (with the old window capped at 200, only "Team page 6"; uncapped, the old code passed). TestRecentlyEditedLeavesOutDeletedPages: nine team pages, every third deleted, six live rows and no deleted title; make mutate drops only NOT pages.gone and must see it fail (the scoped view would still hide the deleted titles, but the list falls short of six). The M1 mutant now drops the query's rung filter. - Gates added after Fable's review of 8066d40. TestRecentlyEditedOutlastsManyPrivateWrites: seven team pages, then 210 scratch pages, and Recently edited holds team pages 2 to 7 (0 rows at 8066d40); make mutate moves the rung filter out of the query and must see it fail. TestOneFullHighlightForEachPage also counts the rows lit with no CSS (2 without hidden).
- Link selected words to a page: Page link in the bubble, and ⌘L (amends §6.6). - The result.
editor/pagelink.mjsmakes the selected words one chip whose shown text is those words:[[Target|words]], or[[Target]]when the words are exactly the title (case counts: the words are kept as written). A date makes a date link,[[2026-11-13|friday]]. Spaces at the selection's edges stay outside the chip. A chip carries no marks in Mapa's Markdown (**[[A]]**is not a marked chip), so bold words lose their bold. - Fidelity. Every link is checked to read back as itself before it is made (pageLinkSourceparses the bytes withmarkup.mjs'sspans): words holding[or]], and a target holding|,#or]], are refused or not offered.pagelink.test.mjsholds the cases; an L3 run over the corpus (fidelity.test.mjs) makes 4,124 links over 760 bodies, holds everything L3 holds after each, checks the document (and the saved Markdown, read again) says what it said less the words plus exactly one chip, and undoes back to the body byte for byte. - What the list offers is[['s, from/links/suggestunchanged: team titles, aliases, your pending link texts, a date when the field holds one, and "Link 'text'", a page not written yet. The field opens holding the selected words, selected, so typing replaces them; ↑ ↓, ↵ or Tab, and Esc back to the text. TheComboboxserves an input here, which is the combobox and carriesaria-expanded. - **Two choices, not one field.** The bubble reads B, I, code, **Page link**, **Web link**, then Make team page. Web link is the old Link and its address field, unchanged, as is ⌘⇧K. One field taking either would have to guess: "example.com", "Q3 plan.md" and a pasted path are all plausible titles and plausible addresses, and a wrong guess makes the wrong kind of link silently. The buttons' names are their visible words, so speech input can say them; their tooltips name the keys. - **⌘L** (Mod-linkeys.mjs) runs one command, which Insert → Link to a page (now showing ⌘L) and the phone's[[button run too: over a selection it opens Page link; with none it types[[, so the list opens as for/→ Link to a page. In a code block it does nothing. On the Markdown screen, ⌘L and the menu write[[words]]around a selection and[[without one. Help → Keyboard shortcuts lists it. - **The browser's ⌘L.** The command answers true, so ProseMirror's keymap callspreventDefaulton the keydown; the gate checks the event arrives withdefaultPreventedin Chromium, and by hand in WebKit (Playwright 1.62, WebKit 2388). Chromium's shortcuts a page cannot cancel are its reserved ones (⌘N, ⌘T, ⌘W, ⌘Q and their Shift forms), and ⌘L is not among them, sopreventDefaultshould be enough there; for Safari I found nothing either way. That a real Chrome or Safari window keeps its address bar unfocused is not something a headless engine can show: it needs one look by hand in each before this is called done. - **What else is refused** (Fable's review of8066d40). Words carrying a web link: the chip would drop the address silently (M4, the coordinator's ruling), so they get "A page link can't hold another link or a line break". Words whose block would read differently with the chip in it: before it goes in, the block is written as the serialiser would and parsed as the server will, and the link must come back as one link with the same text (M3). After a!the chip would be an embed (x!word→x![[Acme|word]],<!-- foo -->→<![[-- foo -->]]), and a stray backtick orcan pair across it; the bubble says "Linked here, the Markdown around these words would read differently: a ! before them makes an embed, and a strayor pairs up. Select other words."linkCheckgives the refusal to whoever asks, so a row chosen after the page changed under the field says "The selection changed. Select the words again." (low 2), and ⌘A then ⌘L says the one-block sentence instead of nothing (low 1); the bubble stays up while its note is. - The Markdown screen (H1). ⌘L and Insert → Link to a page wrap a selection as[[words]]only when it can be one link; over any other selection (a bracket, a newline,|,#, only spaces) they do nothing, and[[goes in only at a caret. Before, such a selection fell through to "type[[" andsetRangeTextreplaced it, so ⌘A then ⌘L (the address bar's habit) left the page holding[[and autosaved it; the menu path had the same fall-through. The other Insert rows now go in at the selection's start and never over it. ⌘L there is the platform's Mod only: Ctrl+L on a Mac is the system's (low 3). - Across blocks: refused. A chip is one inline atom, so it cannot hold words from two blocks. Linking only the first block's part would quietly drop what was selected; the bubble says instead, in a status line: "A page link holds words from one paragraph, heading or item. Select words in just one." A selection over a chip or a line break is refused the same way. - Gates (pagelink_browser_test.go,make browser): select, ⌘L, choose a page, and the Markdown is[[Halden Robotics|robot firm]], the chip named "robot firm, team page" and focus back in the text, ⌘L's default prevented; ⌘L with nothing selected types[[and the list makes[[Halden Robotics]]; the bubble by mouse (words equal to the title make[[Halden Robotics]]) and by keyboard (⌥F10, three to the right, ↵, a date, the field's combobox roles, Esc linking nothing); the refusal across blocks; axe with the bubble and with the list open; the phone's[[over a selection; Insert → Link to a page showing ⌘L and opening Page link.TestTheBubbleMarksTheSelectionkeeps Web link by mouse and gains ⇧⌘K. Each was red on510eaa5(no Page link, ⌘L typed nothing, three to the right of Bold was "Link", Insert showed[[). After Fable's review:TestTheMarkdownScreenNeverReplacesASelectionandTestPageLinkSaysWhyItLinksNothinginmake browser;pagelink.test.mjs's web-link, embed and ⌘A cases; and the corpus run asserting per link the text less the words and exactly one more chip.
- The week strip has a key, and a daily note lists Linked from first (Paul, 2026-11-16: "What's this all about?"; amends §4.3). - The key. One quiet line under the strip, styled like the month calendar's foot: a filled square "Day shown", a ring "Today", a dot "A note you wrote", each mark drawn as on a day (
p[mapa-week-key],links.css). It is the server's HTML, so it is there with scripts off. For a screen reader each mark is named in words first ("Filled: Day shown, ringed: Today, dot: A note you wrote"); the day links already say "today" and "a note you wrote" in their own names. - The order. The panel on a daily note is now This week, Linked from, Links out: a team page's order, less the map and Mentioned. The page's foot already had it. The phone's peek line still reads "This week, and links out". - The empty lists. On a daily note, "Nothing links to this day yet." (was "No page links to this day yet. A date link in any of your pages lands here.") and "No links out yet." (was "This page links nowhere yet."). Team pages keep "Nothing links here yet." and "This page links nowhere yet.". "No links yet." was suggested for the second; "out" stays, because the line sits under "Nothing links to this day yet." and could otherwise read as the same thing again. - Copy review. Every new or changed string is incopy-review/week-strip/strings.json(with note 83's), for Paul's copy-review tool. Not reviewed yet. - Gates.week_strip_test.go(make test): the key under the strip on a written and an unwritten day and none on a team page; This week, Linked from, Links out in that order, and a team page's order unchanged; both new empty texts in the panel and the foot, the old ones gone.TestTheWeekKeyShowsWithScriptsOffAndOn(make browser): the key, the order and the texts in Chromium with scripts off and on, then axe on the day. Each was red on2cf0c44. - A date picker for
/→ Date and Insert → Date… (Paul, 2026-11-16; amends note 45 and §6.6). - What it is.editor/datepicker.mjs: a month at the caret, the month calendar's look ([mapa-datepick]inmapa.css, the numbers oflinks.css's month grid), with today chosen. ← → move a day (once the field holds text, they move its caret instead: review L3), ↑ ↓ a week, Page Up and Page Down a month (with Shift, a year); ↵ inserts the day; Esc closes and inserts nothing; focus goes back to the text either way. A click or a tap on a day inserts it; ‹ › page the month. It inserts the chip[[makes for a date,[[2026-11-20]](dateInsertionincommands.mjs, which Today's date now uses too). Focus leaving the picker closes it. - The chip reads back, or is refused (review M1). Before it goes in, the block is written as the serialiser would and parsed as the server will (readsBackinpagelink.mjs, Link to a page's own check): it must hold the same text and exactly one more link. Right after a!the chip would be an embed (Look![[2026-11-16]]reads asLookand an embed), so a space goes first:Look! [[2026-11-16]]. Where even that would not read back (inside an unclosed run of backticks, say), nothing goes in:/→ Date and Insert → Date… check before the picker opens, and they and Today's date say under the caret "A date can't go here: the Markdown around it would read differently, such as a strayor * pairing up. Move the caret and try again." (picker.refused, added to the open copy review). - **A selection is kept** (review M3). Date… and Today's date put the chip at the selection's end, never over it:Call Ana[[2026-11-17]] today. The picker opens there. - **Typed dates.** Its field takes what ⌘K takes ("next friday", "12 nov", "tomorrow", an ISO date) and moves to that day; words that are not a date say so under the month, and ↵ then inserts nothing.editor/typeddate.mjsis a line-for-line port oftypeddate.go;[[had no port (it reads ISO dates only).internal/mapa/testdata/typeddates.jsonholds 67 cases that Go (TestTypedDatesMatchTheSharedCases) and Node (typeddate.test.mjs) both answer, including where JavaScript differs from Go unless told (U+0085 and U+FEFF as spaces,İlowered,+12). - **Today** is the day in the zone "today" uses for the viewer, their own or the team's (MAPATIMEZONE), which every shell page already carries as<body data-zone>for the zone offer (review L2).today()incommands.mjsreads it withIntleach time it is asked, for Today's date too, so a picker or a page left open past midnight moves on; the picker reads it again on every redraw and typed date. With no zone it falls back to the browser's date. The field trims what is typed as Go does, so it reads no date where ⌘K reads none (\ufefffriday; review L1). No dots: the picker inserts a date, it does not navigate, and dots would need a new read; the brief made them optional. - **Roles.** The field is a combobox whose popup is the grid (ARIA 1.2's grid popup): focus stays in it,aria-activedescendantnames the chosen day'sgridcell, the grid is labelled by the month's title, today carriesaria-current="date", and the keys are the field's description. The picker is a non-modaldialog, "Insert a date". A typed date is announced in a polite status. - **Touch.** On a coarse pointer the picker takes focus, not its field, so a phone's keyboard goes down and the month shows whole; a tap on the field brings the keyboard back for a typed date. Days are 36px there, and the picker stays insidevisualViewport. The phone reaches it from the accessory row's/. - **Menus.**/lists Date ("choose a day", the picker) and then Today's date ("today's note", at once), so/date ↵is the picker and/today ↵is today. Insert ends Today's date, then Date…; Date… is drawn only where the page editor runs (Writable): the Markdown screen has no picker, and keeps Today's date. The[[and/lists now focus the text before running a row, so a row may move focus on (combobox.mjs). - **WebKit, by hand** (Playwright 1.62.1, WebKit 2388, overmake previewon its own port): the key with scripts off and on;/date, four →, ↵ wrote[[2026-11-20]]; "next friday" chose Friday 20 November and ↵ wrote it; Page Down then Esc wrote nothing and left focus in the text; Insert → Date…, ›, a click wrote[[2026-12-18]]; on a 390px touch screen the picker took focus with the field unfocused, sat on screen with 36px days, and a tap wrote[[2026-11-20]]. No page errors. Not checked: a real iPhone. - **Bundle.** 102.3KB gzipped (101.7KB before round 7), up from 99.0KB, against L12's 120KB. - **Gates.**datepickerbrowsertest.go(make browser), on a browser clock of Monday 16 November 2026:/→ Date opens on today with focus in the field, and the keys write[[2026-11-20]], Page Down and Page Up[[2026-12-16]]; "next friday" and "3 march" move it, a non-date says so and ↵ writes nothing; Esc writes nothing and returns focus; Insert ends "Today's date | Date…", axe with the picker open, and a click writes[[2026-12-18]]; the phone's tap.datepickertest.go(make test): Date… after Today's date on a day and a team page, absent from the Markdown screen.datepicker.test.mjs: the arithmetic, the chip's Markdown, undo, and/'s rows. Each was red on2cf0c44(no picker, no Date…, noinsertDate, notypeddate.mjs);TestTypedDatesMatchTheSharedCasespasses there, as it should: Go's parser did not change. - **Gates after Fable's review** (§14, round 7).datepickerreviewbrowser_test.go: after a!the picker and Today's date writeLook! [[2026-11-16]] Wow! [[2026-11-16]], two chips; at a caret insidefoobar `Date… shows the refusal, opens nothing and writes nothing; Date… and Today's date over a selection keep the words;\ufefffridaychooses nothing; ← moves the field's caret, not the day; Today's date withdata-zoneat UTC+14 writes the 17th at noon UTC on the 16th.datepicker.test.mjs: the space after!, the refusal and itsfalse, the selection kept,today()in four zones.fidelity.test.mjs's L3 run, with no threshold: per insert, either the text (plus the space, when spaced) and exactly one more date chip, in the document and in its saved Markdown read again, or a place where typingxat the same caret does not read back either; then[[date]]in the Markdown and undo to the body byte for byte. Over 760 bodies: 4,528 inserted, 13 spaced (each after a!), 19 refused, 9 inserted where the body already reads differently whatever is typed (an empty##heading, an unclosed fence beside another kind); all 41 of round 6's "something else" are among the last three. Each was red on3a7ee5f: the browser gates wroteLook![[2026-11-16]],Call [[2026-11-17]] today, chose Friday for\ufefffriday, moved the day on ← in a field holding text, wrote the 16th at UTC+14 and never showed a refusal; the L3 run with the readback switched off fails on 11 bodies (<![[2026-11-20]]DOCTYPE html>`: the date reads differently where a letter does not), where round 6's 1% threshold passed. - A click anywhere on the page's empty writing area writes there (amends §4.1; Paul, on an empty daily note: "I should be able to click anywhere on the document to focus on the 'Write' piece"). - The box. On a page the editor writes on (
[mapa-doc]holding the island), the column is a flex column at least as tall as<main>, and the body grows to fill it (frame.css). So a click below the text lands in the editor itself, and the page's foot (Linked from, at narrower widths and with the panel off) sits at the bottom of the first screen on a short page instead of under its last line; a long page is unchanged. A flex column does not collapse margins, so every child but the foot drops its top margin: each pair then keeps the larger of its two, as before (measured: every block, the head, the bars and the article's top are where they were, at 1440, 1000 and 390, scripts off and on). The server draws the same box with scripts off, so mounting moves nothing: L5 now compares the body's and the foot's boxes too, and runs on an unwritten day as well as the pilot page. With scripts off nothing else changes; there is no editor to focus. - The click (editor/writearea.mjs). A press on the empty area itself, meaning<main>, the column, or the body below its last block, puts the caret down and focuses the editor: below the last block, at the end of the document; in the margins beside the text, at the nearest position on that line (posAtCoordswith x held inside the column; above the first line, the first line). Beside a short line inside the column the browser already does this natively, since a block is the column's width. Anything drawn on the page is its own target and is left alone: the title, the kicker's links, chips, the Links panel, the draft bar, forms, the foot; the sidebar, the bubble, the menus and History are outside<main>or on<body>. A drag from the empty area selects from where it started, Shift extends, and a plain click with a selection elsewhere collapses it, as in the text. The empty area shows the text cursor, only once the editor is mounted (mapa.css). - Below a fence, a heading or a list: the empty paragraph after it. The document always ends in a paragraph (§6.2), so "the end of the document" after a last block that is not a paragraph is already the empty paragraph the editor keeps, and the server draws it. A click below a list therefore starts a new paragraph, as in Notion, and a click below a paragraph ends that paragraph, as in Obsidian or any word processor. That is the least surprising pair for notes: typing below a code block or a heading never goes into it, and nothing new is made by the click, so the draft is not dirtied and nothing is saved until the person types (the saver sees no transaction that changes the document; the gate checkscommittable()stays false and the Markdown is unchanged). - Touch. A touch scroll fires nomousedown, so only a tap focuses; the focus happens inside the tap's own handler, which iOS needs to bring up the keyboard. The listener is on<main>, not the document, so iOS counts the area as clickable. - The Markdown screen. A press on the empty area below the form (beside or under its preview, never on it) focuses the textarea with the caret at its end (mapa.js). No text cursor is drawn there. - Gates (writearea_browser_test.go,make browser), each red on6eaee96: an unwritten day clicked 600px below its placeholder is focused with the caret in its paragraph, the area's cursor istext, typing writes "Hello there", and axe finds nothing serious (on6eaee96: not focused); a page ending in a list, clicked below it, has the caret in the trailing empty paragraph with nothing to commit and the Markdown unchanged, and clicks in the right and left margins beside "Short." put the caret at that line's end and start, a selection elsewhere included (on6eaee96: not focused); a click below a last paragraph ends it (on6eaee96: the caret at offset 0); the empty margin takes the click, then the title, Edit as Markdown, a Links-panel chip and the panel's heading do not move focus into the body, and a chip in the text still leads to its page (on6eaee96: the margin took no click; with the handler widened to any target in<main>, the four controls each went into the body); at 390 on a phone, a touch scroll from the empty area does not focus and a tap does (on6eaee96: the tap did not); and the Markdown screen's click below (on6eaee96: not focused). L5, L10's axe andTestNoScreenScrollsByAStrayPixelstay green. - After Fable's review ofd10cfaf(APPROVE, lows taken): - Mid-composition the press is the browser's (L1). With an IME or dictation composing,pressreturns at once: the browser ends the composition and ProseMirror reads it in. Before, the press was taken, focus stayed, andview.composingstayed true.TestAClickInTheMarginMidCompositionEndsItcomposes "にほん" through CDP, clicks the right margin, and needs the composition ended and "First line.にほん" in the Markdown; without the guard it never ends. - A drag's anchor is held inside the document (L3). The anchor is taken when the press begins; a teammate's block merged in mid-drag can shorten the document under it, andresolvethrewRangeError.selectclamps both ends to the document.writearea.test.mjsdrags from 40 past the end of a shortened document and selects to its end (without the clamp:RangeError: Position 52 out of range). - No tap flash (L5). The mounted page's<main>has-webkit-tap-highlight-color: transparent, so a tap on the empty area does not flash grey on iOS now that<main>has a listener. - By hand in Playwright's WebKit (playwright-core 1.62.1, WebKit 2388): the column's and the body's boxes with scripts off and on agree on 18 loads (three widths; an empty and a written day, three team pages and New scratch page), as in Chromium, and match Chromium's layout; below the text, both margins beside a paragraph and a list item, the title, and a drag from below up into the text behave as in Chromium; a touch tap (hasTouch) below the placeholder focuses; the Markdown screen's click below focuses the textarea. Not checked: a real iPhone, where the keyboard coming up on a tap of the empty area wants one look through Safari's Web Inspector. - Dates, times and numbers in the reader's locale (Paul, 2026-11-17: localised numbers, money and dates "definitely should be in from day one", for every Oficina app; amends notes 7, 82 and 83, and §4.4's "Weeks start on Monday"). - Which locale. The person's own choice in Settings, when they made one; else what their browser's Accept-Language asks for among the locales Mapa offers; else the team's:
MAPA_LOCALE,en-IEunless set.LoadConfigrefuses a value that is not CLDR's spelling (en_IE: "write en-IE"), not offered, or offered without its rastrillo pack linked (locales.CheckConfig). The header is matched by rastrillo's own negotiation (Locales.Negotiate, built bylocale.Negotiationwith the team's first), handed a request carrying the header and nothing else: rastrillo'sLocales.Middlewarewould also take a/de/path prefix and itsrastrillo_localecookie over the header, and Mapa writes neither, so a prefixed page was half German, its links and fetches answered in the header's locale (review round 8, M2)./de/d/…is a 404 and the cookie is ignored.negotiate(locales.go) puts the browser's locale on every request in the router, andownLocale, behind the session, the person's over it.main.gopasses rastrillo noLocales, so no/_localeswitcher is mounted and the shells are unchanged; rastrillo's panic page isBuilt.ErrorPage, in the team's locale. Mapa offers en-IE, en-GB, en-US, de, fr and es (dates.json'soffered): a region falls to its language (de-ATreads German,fr-CAFrench), and another English (en-AU) reads the team's when the team's is English. The reader's own time zone, elseMAPA_TIME_ZONE, is unchanged: the locale picks the format, the zone the moment. - The person's own format (review round 8, L5, the coordinator's decision for Paul): Settings has "Date and number format", a select whose first option is "Your browser's: English (US)" (the format the header matched) and then each offered locale named in English with today written its way ("German: Donnerstag, 12. November 2026"). It posts toPOST /settings/locale, which keeps the code sealed on the member row (sealed_locale, migration 0005,seal.PurposeLocale, as the time zone is), logslocale_set, and refuses a code Mapa does not offer (422, "Choose one of the formats listed."). No cookie. Its strings are incopy-review/locale/strings.jsonfor Paul's copy review, not reviewed yet. - Where the patterns come from. rastrillo's packs carry CLDR's number and money data but no dates, so Mapa carries CLDR's date patterns itself:internal/mapa/locale/dates.json, whichmake locale-dateswrites (editor/gen-dates.mjs) from the ICU Node links, recording its versions (ICU 78.3, CLDR 48.0, the release rastrillo's money data is from). For each kind of date Mapa shows (a chip's weekday-day-month, with the year; the pill's short form; a day and month, with the year; the month, with the year; the year; the short time; the long date with the time) the CLDR skeleton is handed toIntl.DateTimeFormat, andformatToPartsgives back its pattern and the names it uses, read through that same pattern. Before writing, the generator draws every pattern with Mapa's own interpreter for every day of 2024 to 2026 (and eight times of day) and compares it with ICU; one difference fails the run. Two places whereIntlis not CLDR were found that way, which is why nothing readsIntlat run time: V8'sformatreplaces CLDR's U+202F before AM and PM with a space (formatToParts keeps it; Mapa writes CLDR's), and anhour: "numeric"skeleton comes back unpadded where CLDR's short time isHH:mm(Mapa readstimeStyle: short). Weeks start on CLDR's first day (getWeekInfo), and a typed date in numbers is read in the order CLDR's numeric date has. - One interpreter, twice: L4's approach.locale/format.go(Go) andeditor/dates.mjs(the editor) interpret the same patterns line for line. Go writeslocale/testdata/date_labels.json, every offered locale's every kind at six moments, anddates.test.mjsmust write each byte for byte. The server labels every chip it draws and every link in the island (LinkState.title), so mounting changes no label; for a chip typed after mount, the[[list and the picker, the island carries the reader's patterns (dates,locale.Client: three patterns, the weekday names and letters, the first day and the numeric order, about 1KB), andguesslabels the chip with them until/links/resolveanswers the same. L4 itself gainsmarkup/testdata/golden_locales.json: every corpus body with a date link (six added toedge.jsonfor it: this year, other years, shown text, broken dates, dates in headings, lists and quotes, a date in every month), rendered by Go in en-IE, en-US, de and fr;parity.test.mjsdraws each withtoDOM, its date chips labelled by the editor itself (guessover that locale's island data), never from Go's answer, and must give Go's HTML byte for byte. Sending only the server's labels was the other option, but a chip typed after mount and the picker would then wait on the server or fall back to English;Intlalone was the third, and the generator's own check shows it is not CLDR in Chromium's V8. - What is localised. Day titles and the year beside them (cut from the locale's full date before its year, so the quieter part keeps the locale's composition: "martes, 17 de noviembre" and " de 2026", "Tuesday, November 17" and ", 2026"; review round 8, L4), the window's title, the pill (its short date and its aria labels), date chips in the body and in Links out, daily notes' names wherever a page is listed (Linked from, mentions, search, the map, the sidebar), the month calendar (title, column letters and names, first day) and the week strip (letters, first day), the picker (month title, columns, first day, every day's name, typed numbers), "Edited by … at 21:09", "on 12 November", "yesterday" kept in words, History's day headings, times and titles, "Restored the version from …" and a version's banner (CLDR's long date with its time, "12. November 2026 um 21:09", since round 8), ⌘K's date row,<time>titles and "3 days ago"'s date past two weeks, Settings' "Today is now", and the counts: the panel's Linked from, Mentioned and Links out, the peek line, "Added 1,234 blocks", "1,234 pages" in Update links and the rename's answer. Counts go through rastrillo's ownnumberwith the locale's localizer ({{number L n}}in the templates,Locale.Numberin Go). The templates are parsed once and cloned per offered locale with that locale's functions, so no function map is rebound per request. Interface words stay English ("at", "on", "yesterday", "Today", "ago"), which mixes languages in a German reader's "Edited by you at 21:09" by design. - What is not. The stored Markdown ([[2026-11-20]]), URLs (/d/2026-11-20,?month=2026-11),<time datetime>,data-date, event payloads, the island's machine fields and the suite and S3 payloads stay ISO;TestTheStoredMarkdownIsTheSameInEveryLocalewrites from en-US, German and French browsers and reads the same Markdown in four. Day numbers in the grids, and ⌘K's spoken "3 pages", stay plain digits: every offered locale writes Latin digits (the generator refuses one that does not) and ⌘K never shows a thousand.<html lang>staysen. - Typed dates. The words stay English ("next friday", "12 nov"). ⌘K reads a date in numbers only with the locale's own separator (dates.json'sseparator:.in German,/elsewhere; a four-digit year first takes either), so "1.5" in English and "12/11" in German are searches; and a date typed in numbers (DateHit.numeric) is listed after the pages and text that answer it, so Enter opens the top hit, not a daily note (review round 8, M1). The picker, a date field, reads either separator. A date in numbers follows the reader's order:12/11is 12 November in en-IE and December 11 in en-US;12.11.and12.11.2026as German writes them; a four-digit year first is year, month, day anywhere. A two-digit year, a mixed separator, a fourth part, a sign, a three-digit day or month and a day that does not exist read as no date.typed_dates.jsonhas 54 new cases naming their locale (en-IE, en-GB, en-US, de, fr, es), 14 of themstrict(⌘K's separator rule); a case naming none must now read the same in every offered locale, which Go and the port both check. - Week start. The week strip, the month calendar and the picker start on the locale's first day;calendar.go'smondayOfis gone forLocale.WeekStart. Mapa has no other "this week". - Gates (each red on0296a7eunless said):mapatest/locale_test.go(make test), over HTTP, which is the page with scripts off: the day's title, its year and the pill's names in en-IE, en-US, German and French; chips and the island's labels anddatesin four; the month's columns and the week's and the grid's first day; History's day headings, times (9:09 PMin en-US), titles and "Added 1.234 blocks"; ⌘K's12/11in three; the negotiation (de-AT,en-AU,ja,pt-BR,fr-CA, none, and an en-US team) — all red on0296a7e(no locale anywhere), except the stored Markdown's gate, which holds there by construction and guards the rule.locales_test.go: the panel's count in four locales (1.234in German).locale/locale_test.go: formats, week start, numbers, the boot check.TestTypedDatesMatchTheSharedCasesandtypeddate.test.mjs: 23 of the 107 shared cases fail on0296a7e's parser and port.dates.test.mjsandparity.test.mjs's new test: on0296a7e, itsdayLabellabels 123 of the 128 date chips ingolden_locales.jsondifferently from Go.locale_browser_test.go(make browser): the browser's own Accept-Language (set through CDP, not the rig) writes the day and the week's first column in German and en-US, scripts off and on; the picker's columns, first day, title, spoken label and typed12/11or12.11.in en-US, German and French, writing ISO; a chip typed in German labelled as the server labels it after a reload; L5 with no shift in German and en-US at 1440 and 390 and on an unwritten day in dark. The browser rig asks for en-IE unless a test says otherwise, so every older browser gate keeps its English. Tests that read en-IE labels now read its comma ("Thursday, 12 November"). - Round 8 (Fable on9fb939f: CHANGES REQUIRED, three Mediums, no High). M1, M2 and L4 as above. M3, the gates missed most localised places:locale_sweep_test.goseeds an old page, a team page linked and mentioned from two daily notes, 1,234 added blocks, a restore and a pinned daily note, then reads every screen (today, two days, a paged month, the team page, its History, the History fragment, a version, the day's History, version and delete screens, All pages, two searches, Settings) in German and in en-US, failing on anything only an en-IE writing has (a day before an undotted month name, an English weekday, an English short pill, English week letters, a comma-grouped or ungrouped 1234) or that en-US never writes (a day before its month, a weekday with no comma, a 24-hour afternoon);TestTheSweepSeesEveryKindOfDateholds the same screens to show each in en-IE, so none passes by showing nothing. 34 call-site mutations, each swapping the reader's locale for the default (or the per-locale templates for the default's, or the header-only negotiation for rastrillo's middleware), run throughgo test -overlayover the locale gates: 32 caught. Two survive, both by construction: a team page's label is its title, which no locale writes (around.go's team chip), and Update links' "N pages" (pagesCount) differs only past 999.locale_settings_test.go: the prefix is a 404, the cookie is ignored, the own format outranks en-US, French and no header, is sealed and logged once, goes back to the browser's, refuses four bad values without a row, and reading writes nothing; gate 8 drives the new route. Lows:Locale.Localizeris nil-safe (L1);dates.test.mjsregeneratesdates.jsonfrom ICU and compares byte for byte when the Node links the same ICU and CLDR, and says it skipped otherwise (L2); rastrillo'snumberwrites 1.234 in Spanish and U+00A0 in French where CLDR 48 writes 1234 and U+202F, pinned inTestNumbersAreRastrillosand reported for rastrillo (L3). Fable's diff check of4cbc802: APPROVE, M1 to M3 resolved; its three Lows are fixed: a stored code Mapa no longer offers reads as unset in Settings (TestAFormatNoLongerOfferedReadsAsUnset), saving the format already set writes nothing, no event and no member row (TestSavingTheSameFormatWritesNothing; both red on4cbc802), andversionDaylost its unusednow. - For Paul. CLDR's en-IE writes "Thursday, 12 November" without the year and "Wednesday 1 January 2025" with it, and en-GB the other way round; Mapa writes what CLDR says, so the default's chips without a year gained a comma ("Thursday, 12 November"); day titles, cut from the full date, did not ("Thursday 12 November" and " 2026"). With the shown text and ", your note" a chip's accessible name reads "Thursday, 12 November, your note". Which locales Mapa offers is a list ingen-dates.mjs. A person's own format is a Settings choice (round 8); without one, a reader in Ireland whose browser asks for en-US gets month-first dates, Sunday weeks, 12-hour times and12/11as 11 December. - Merged with images (mainf9337f9). The images' screens go through the reader's locale too: "Images on this page" writes "Earlier image, taken out on <date>" withdateYearin the reader's locale and time zone (it was Go's2 January 2006in UTC), and an upload's refusals write their numbers withLocale.Number(the 10,000-pixel side, and the allowances' sizes). The sweep reads the old page's Markdown screen, which lists an image taken out of it;TestImageRefusalsWriteNumbersInTheReadersLocalereads both refusals in en-IE and German. The locale's migration is0006_alter_members, after images'0005_images. - The header has no Search (Paul, 2026-11-18: "I think we can just lose the search icon in the header"; amends §3.1). The bar's Search, made a lens with "Search ⌘K" as its tooltip that morning (main
2a1a87a), is gone. Search is a place, as it always was: the sidebar's row with ⌘K, the rail's icon with "Search" as its tooltip, the Menu sheet's place row below 800px (now its only Search row; it had two), and ⌘K or Ctrl+K on every page. Each opens ⌘K, and the search page with scripts off. estilo'sAction.IconOnlystays for a later action.search_entries_browser_test.goholds it: no Search in the bar at 1440, 1000, 800 and 390, scripts on and off, nor "Search ⌘K" anywhere; the sidebar's row open and in the rail, its tooltip on hover; the sheet's one row; the shortcut from six screens at three widths; axe at four widths; L5 for the bar. Axe at 390 found the brand link nameless there (below 800px estilo's rule for a bar with a title hides the name again, outweighing Mapa's rule that kept it for screen readers); that rule inframe.cssnow outweighs it. - File is the first menu (Paul, 2026-11-22: "Why is there no 'File' menu? I would have thought File -> Import was a thing"; amends §2, §3.1 and §3.4, and Notion import spec §7). The Page menu is now File (
id="mapa-menu-file"), as in Docs and Slides, and keeps its rows, ordered the Mac way: New team page and New scratch page; Import from Notion…; on a page Rename… and Link to a block… (team), Make team page… (private), History and Pin to sidebar or Unpin from sidebar; Deleted pages; and Delete…, last and set apart as Docs sets it. Each group is drawn only when it has a row. Import from Notion… is drawn only forMAPA_IMPORTERS(Config.Importer), and links to the existing import page; the account menu no longer offers it, so it lives in one place. With scripts off File is a<details>of links, and below 800px the menus are the bar's own second row (estilo's Menu sheet carries the places and the actions, never the menus), so a phone reaches the same rows. No shortcut changed. Help's "Markdown in Mapa" now says File → Link to a block. Copy: "File", "Import from Notion…" and that sentence went through Luna (copy-review/file-menu). Gates:filemenu_test.goholds the order for an importer and a non-importer, on a team page, a pinned one, a scratch page and off a page; I13 now looks in File and refuses the account menu, with two new mutations (File offering Import to everyone; the account menu offering it again);filemenu_browser_test.gochecks File is the first menu and shown at 1440 and 390, scripts on and off, as Ana (importer) and Bo; Import in File once and in the account menu never; the same rows at 390 as at 1440, each on screen with File open; the import reached from File by pointer and by keyboard, both widths, scripts on and off; and axe with File open at 1440 and 390.
- A ⋯ on each sidebar page row (Paul, 2026-11-22, asking how to delete a page: "Maybe not a right click on sidebar pages, but maybe a hover kebab menu?"; amends §3.2 and §3.4). Delete… was in the bar's Page menu (now File, note 87) all along, but nothing on a row said so. - The trigger. Each row in Pinned and Recently edited is a
[mapa-side-row]holding the row's link and, beside it (never inside it), a<details mapa-row-menu name="estilo-menus">whose<summary>is the ⋯, named "More actions for <title>" (Luna's wording,copy-review/sidebar-kebab/). The places have none. The ⋯ is laid over the row's end, and the link keeps that room at all times (padding-inline-end), so the title truncates in the same place whether the ⋯ shows or not and showing it moves nothing. Hidden, it isopacity: 0andpointer-events: none: the keyboard still reaches it (Tab from the row's link), the pointer passes through to the link. It shows while the pointer is on the row (@media (hover: hover)), while focus is in the row, and while it is open. In the rail and its default-by-width twin, the rows are hidden whole ([mapa-side-row], not just the link), so there is no ⋯. - Touch. A coarse pointer has no hover, so the ⋯ shows on the page on screen's row only (the one witharia-current). Not on every row: a sidebar of twelve pins and six recent pages would carry eighteen permanent ⋯, crowding 224px of titles, and every row would have a second tap target beside its link. A tap on another row opens that page, and its ⋯ is then there: one tap more, for the rarer act. On a coarse pointer every sidebar row (the places too, so the list keeps one rhythm), the ⋯ and the menu's rows are Fiesta's--rst-tap(44px); the rail keeps its 40×38px targets. Each page row keeps the ⋯'s room on a touch screen too, so a title truncates a little early on rows that show none: that is what keeps a keyboard's focus, which shows the ⋯ on any row, from moving the title. - Phones. Below 800px there is no sidebar and estilo's Menu sheet holds the places only (§3.2, note 80), so there is no page row to carry a ⋯. On a phone File, in the bar's second row (note 87), holds the page's verbs. Putting Pinned and Recently edited in the sheet is a change to the sheet, not to this menu, and is left for Paul. - The menu. estilo's menu, as the bar uses it: the panel is[estilo-menu]and its rows are drawn bymapa-menu-items, the template the menu bar now uses too. The rows come frompageVerbs, the one source for both menus;rowMenudrops what is markedHere(Link to a block…, which picks a block on the page on screen).pageVerbsreturns the verbs, Pin / Unpin among them, and Delete… apart, in File's order (note 87); the row's menu is Rename…, Make team page…, History, Pin / Unpin, a divider, and Delete…. Every row goes to its existing route: Delete… to/p/<id>/delete, the confirm page, so nothing is deleted from the menu. Pin and Unpin post to/p/<id>/pinwith areturnof the screen the row was on, checked bysafeReturn(anything else goes to the page, as before), less any?done=notice the screen was showing (withoutNotice), so it is not said again; a full sidebar still says so on the page, which takes you there. - Placement. The panel isposition: fixedso the sidebar's scrolling never clips it (note 77's reason), tied to its ⋯ by anchor positioning (anchor-scopeper row), below it and flipped above near the window's foot. The<details>is a block whose first line is the ⋯ (it is centred on the row by its own insets and auto margins, not by flex), so an engine without anchoring puts the panel at its static place, under the ⋯. The sticky sidebar is a stacking context, so the panel's ownz-indexcounted only inside it and the page's positioned content (the editor's text, images, the week strip) painted over the part that hangs across the page (Fable, review of27e4533, M1): while a menu is open the sidebar hasz-index: 1, under estilo's bar. - Script. None is needed: a<details>opens, its links go, Pin posts. estilo's chrome.js closes it on Esc (focus back on the ⋯) and on a click outside, as it does every menu in the group.mapa.jsmoves focus to the first row on opening, lets ↓ and ↑ move between rows, and closes it when focus leaves it for another control.title.mjsrenames a row's ⋯ with its row when the title is renamed in place (TestTitleClickTypeEnterRenamesInPlacechecks it). - Gates.sidebar_more_browser_test.go(make browser), each red on main (there is no ⋯ there): the ⋯ shows on hover and on focus and not with the pointer away, scripts off and on, and not at all in the rail; on a coarse pointer it shows on the page's row only, a tap on another row's end lands on its link, and the ⋯, the row and the menu's rows are 44px; the menus of a team page, a pinned team page and a pinned note, each row's label and address; Delete… opens the confirm page and the page is still there after, scripts off and on; with scripts off the last row's menu is whole and on top, and Unpin and Pin post and come back to the screen; Enter focuses the first row, ↓ moves, ↑ from the first goes to the last, Tab out closes it, Esc closes and gives focus back to the ⋯; at 900px with the sidebar open, the open menu is on top of the editor's text (TestARowsMenuIsOverTheEditor, red without the lift: the corner hit theARTICLE); axe, closed and open, with a mouse and on a touch screen; and hovering or focusing a long-titled row moves no box in the sidebar, with the title ending before the ⋯.TestARowsMenuIsThePageVerbsininternal/mapaholds the two menus to one source,TestARowComesBackWithoutTheNoticethe notice, andTestPinFromARowComesBackthe return.
- Every screen on the spacing scale (Paul, 2026-11-22: "Can we somehow put something in place to avoid weird spacing issues like this in future?", then "Release and start the rollout", with every app on rastrillo v0.45.0; amends notes 68 and 84, and §4.1's page column). Fiesta 1.6 ships the stack and two gates; Mapa now uses all three, and replaces the early copies c66189f made of them for the import page. - The libraries. rastrillo v0.45.0 (was a v0.35.1 pseudo-version), which serves Fiesta 1.6's
tokens.csswithrst-stack; Fiesta v1.6.1 (was 1.3.0), also ago toolfor the check; estilo 6238a47 (was d004805). Credits regenerated withmake credits. The newsigninpackage is not adopted: Mapa's sign-in is unchanged. rastrillo v0.37.0's CLDR 48 numbers came with the jump: French groups with U+202F and Spanish leaves four digits ungrouped, so1\u202f234and1234, as browsers write them. That was note 85's upstream report; the three tests that pinned the old output now pin the new. - The stack.[mapa-doc]isrst-stackon every signed-in screen, so a screen's blocks are spaced by Fiesta's one table and every hand margin between them went. A page's head (mapa-doc-head, Help's and a version's) is the page's header,rst-page-header, drawn as Mapa's (no rule, not a row), so the page opens--rst-sp-5under it as before; inside it the kicker is--rst-sp-3above the title (was 14px) and the look row--rst-sp-2(was 4px, touching the title). The body isrst-section, so it opens--rst-sp-5below whatever precedes it: the island's scripts stay wherepage.mjsreads them, just before the<article>. The unsaved-changes bar isrst-sectiontoo, the server's and the onenotices.mjsdraws (bundle rebuilt): the script's follows the island's scripts, not the head, and would otherwise sit one ordinary step under it. A version's head isrst-sectionas well, so its title is--rst-sp-5under the version bar (was 28px). The Links panel is a child of the stack but fixed over it, solinks.csstakes the stack's margin off it: a margin moves a fixed box, and it had moved the panel 4px down. The foot's references arerst-stack rst-section,--rst-sp-6under their rule (was 72px above it and 28px under), each group arst-stack rst-section(was 54px and 30px apart), and the rules that show the foot beside an open History or a narrow panel now show it as the flex column it is; the panel's sections carry the same attributes inside its own grid, where they change nothing. The editor pages' own flex column, and itsmargin-block-start: 0(an ID-weight selector that would have beaten the stack), went: the stack is that column now, and note 84's body still fills it. Search's label and its row are Fiesta's field (the label was 3.2px above the row); Settings' note sits a step under its form (it touched it). Help → Colophon is estilo's credits section, not a stack:frame.cssgives its heading the stack's step after a heading (it was 18.8px), until estilo's template carriesrst-stack. - c66189f's copies.mapa-stack,mapa-sectionandmapa-action-rowinmapa.cssare gone, forrst-stack,rst-stack rst-sectionandrst-actions; the import page and its confirm pages lost their outer wrapper, since the column is the stack. The audit vendored ininternal/mapatest/testdata/rhythmis gone too: the tests importamadan.net/rastrillo/fiesta/check/rhythm. - The spacing check.make spacing(go tool fiesta spacing internal/mapa/static) is inmake ciand is CI's step35-spacing. Nothing is skipped: estilo's and rastrillo's stylesheets are served from their modules, not vendored. On origin/main it refused 171 declarations: 118 off the scale (mostly 6, 10, 2, 14 and 1px, worst inlinks.cssandframe.css) and 53 steps typed by hand. Now none, with 50 allowances, each saying why on its line: the document's typographic rhythm inprose.css, in em of its text, which the server's HTML and the editor's DOM share, and the quote's 2px and 18px (16, and the diff's list indents inhistory.css, 3, which follow it); the page column's 48px sides, which the measure (42rem + 96px) andlinks.css's room arithmetic and breakpoints are built on, its 120px foot room, and 140px on a phone to clear the Links sheet (4); the column's centring arithmetic beside the panel (1); hairlines: 1px between sidebar rows, months' days, the week strip's 2px between seven days across the panel's 286px and its letter on its date (5); the rail's tooltip placed beside its 40px row where the engine cannot anchor (4); the sidebar row's room for its ⋯ and one step per level of nesting (2); the ¶ and the task box hanging in the margin on the box the server draws (6, one inprose.css); the 1px above and below a pill that hugs its text (the chips inlinks.cssandprose.css, an embed and inline code), the reference context lining up past its icon, the 4px dot centred in a 10px mark, and History's time on its title's first line (7); the palette and ⌘K's dialog placed a share of the window down (2). Everything else moved to its nearest step. Visible changes larger than a step's rounding: the page's top is 40px (was 56; 24 on a phone, was 28, with 16px sides, was 20), and the foot's break above. - The rhythm audit.TestEveryScreenKeepsTheRhythm(make browser) runs Fiesta's audit over the page column of 25 signed-in screens (Today, a day and its Markdown screen, a team page and its Markdown, History and a version, Rename, Delete, Look, Links, Inside and Link to a block screens, New page twice, All pages, Scratch, New scratch page, Search empty, with results and with none, Settings, Deleted pages, Help's Markdown and Colophon), at 1280 and 390px, scripts off and on, and fails on any finding. It skips one thing, the page's body ([mapa-body], the editor's document, whose em rhythm L1 to L5 hold); the audit also passes over fixed boxes, so the Links panel is not its to measure. Because the audit measures nothing across a skipped block's edges, the test's ownpageGapschecks that the gaps above and under the body are steps, and that the Links panel carries no margin (withoutlinks.css's rule for it, 20 failures). Review: Fable 5.2, APPROVE AFTER FIXES on 8f032dc (the panel's 4px, the script's bar, the body's unmeasured gaps, and lows), then APPROVE on 1a6c9a8. Left: no stage draws a real script bar (its spacing was measured by hand, 24px either side);prose.css'sa[mapa-chip]padding is overridden bylinks.css's unscoped rule, as on main; the ¶ clips 12px in a fine-pointer window under 800px (16px sides). On origin/main's CSS and markup its audit, over the first 23 of these screens, found 133 findings, among them the kicker's 14px, Search's 3.2px, Settings' 0px and the Colophon's 18.8px; now none.TestImportPageRhythmruns the same package over the import page's states.
14. Findings and what changed
Round 1: Fable on revision 1 (4027e10), answered in revision 2
| Finding | Change | Where | |---|---|---| | H1 Rebase can't move the base: SaveDraft sets it only on create, CommitDraft merges from the old base, Yours conflicts again, and every later commit is Merged and loses bytes | rebase=R is a version-checked POST that moves an existing draft's base. The inline choice goes through the existing Resolve. The reply names the revision it merged against. Settle becomes byte-preserving. Kept stays pinned | §6.5, §6.4, §8, L9, D13 | | H2 Rebase merged the stored draft, not the text on screen | The GET is dropped. Autosave's reply merges exactly the text it carried. The editor applies it only if that is still its text. The base never moves unless the result serialises to exactly the merge. The race is in L9 | §6.5, §8, L9 | | H3 An offered draft was committed when the page was left | Only a draft this tab typed into commits by itself. An offered draft commits only on Save. commit=1 needs the current version. L7 covers opening a page with a draft and leaving it | §6.5, §6.8, §8, L7, L9, D3, Q3 | | H4 "Same node object" fails both ways | Each block has an origin id that is not serialised, with a side table. A block is untouched when it is the first holder and === or eq holds, with an equal context. Seams are kept while origins stay adjacent. A structure check runs before every autosave. L3 compares documents | §6.4, L2, L3 | | M1 An empty trailing item or heading corrupted the block above | Empty blocks serialise as nothing. Corpus cases added | §6.4 step 4, corpus | | M2 Marks: Go cannot nest strong and em, and never crosses spans | The editor makes strong and em exclude each other and never span links, atoms or code. Commands split at those boundaries. Go's ***x*** mis-nesting is fixed so it renders well-formed HTML. L4 holds the mark corpus | §6.3, §5, L4 | | M3 Mounting over a draft shifted; the editor's inputs were unspecified | A no-store JSON island carries the source, the draft and chip resolutions. /links/resolve is added. The server renders the draft's text. L5 covers the draft case | §6.8, §8, L5, L6, L7 | | M4 Cut and paste went through HTML; stripping markers broke block links | Mapa Markdown and an application/x-mapa slice go on the clipboard. A marker is stripped only when its id is already in the document | §6.6, L3 | | M5 The list schema was unspecified | Lists by kind run, indent and the list attributes on list_item, depth as Go computes it, fidelity keyed on the item's paragraph. renderList splits lists when the kind changes | §6.3, §5 | | M6 pre-wrap placement; continuation indents | pre-wrap on textblocks only, with no whitespace between blocks. Continuation indents are hidden and kept on hard_break | §5, §6.3, D9 | | M7 History summaries | The verb comes from the event row. "Renamed" is added, along with relinked and marked. "Earlier history has aged out" | §4.5, §8 | | M8 The first autosave creating a scratch page was not listed | Listed as D12. Single-flight, ErrEmpty kept, gated | §4.7, §6.5, §8, L7, L9, D12 | | M9 Reparse during IME; idempotence | Deferred until compositionend. L3 asserts idempotence | §6.4 step 6, §6.11, L3 | | M10 Spike toDOM before the renderer changes | Phase 1 step 0 is the spike. The HTML is called final only once L4 passes | §5, §12 | | L The no-op commit should cover Merged | Covered, and Resolve too | §6.4 step 7, §8 | | L Rebase answers for an aged-out base, a deleted page, a stale version, /d/{date} | noBase, gone, the 409, and the daily note rules | §6.5 | | L L7 compares file bytes; the fold is a GET with an unchecked return | A logical dump hash. The fold is a POST with a checked local return | L7, L8, §3.2, §8 | | L L5's 100ms | Logged. The gate fails past 1s; the warm target is checked by hand | L5 | | L prosemirror-history pin; gap cursor and trailing paragraph | Pinned exactly, with -gapcursor and -dropcursor. The document always ends in a paragraph | §6.2 | | L L6 per-path mutations | One scoped accessor and one mutation on it | §4.3, §8, L6 | | L Corpus curation and licence | No private text committed. make corpus-local reads it in place. The CommonMark licence is recorded | §7 | | L Recent excludes bulk edits and is labelled | "Recently edited". relinked and marked are excluded | §3.2, §8, D2, Q2 | | L Returning from the back/forward cache | Reload if nothing is unsaved, otherwise autosave at once | §6.5 | | L Make team page indices | From the committed body, parsed | §6.7 | | L A keyboard way out of Tab | Tab indents only in lists. Esc then Tab always leaves | §6.6, L10 | | Q1–Q4 | Fable's recommendations written in as proposed answers, awaiting Paul | §11 |
Round 2: Fable's conditional approval of revision 2 (ad06a4e), answered in revision 3
| Finding | Change | Where | |---|---|---| | N1 A relinked event on a private page puts a sealed link-graph fact into the plaintext log | relinked and marked are logged on team pages only, and private pages keep edited (the coordinator's decision). Private bulk edits are left out of Recently edited by their transaction: one actor, one at, more than one edited. The index, gate 8 and S1 are confirmed to need nothing for the new verbs | §3.2, §4.5, §8 | | N2 Origins were block indices that a rebuild reuses, so undo, paste and split could pair a node with the wrong source | Origins are opaque, monotonic and never reused. The table never forgets, and keeps each origin's neighbours and seams. Pasted blocks get fresh origins with their source and seams. Only the first holder keeps a marker. Table updates are addToHistory: false | §6.4 step 1, §6.6, L3 | | N3 The conflict reply carried no hunks | Each hunk carries {at, count, base, mine, theirs}. Resolve answers {outcome, revision, body} as JSON. Conflicted blocks are read-only until chosen; the rest of the page stays editable, and the hunks are re-sent for each new version | §6.5, §8, L9 | | N4 "Serialises to exactly M" could fail forever | The table is rebuilt against M first, then the document's blocks are checked against parse(M). Three tries at most, then the server's merge settles it at commit. Wording fixed: rebuilt against M; the caret survives; a block the teammate changed is applied | §6.5, L9 | | N5 §5 and §6.3 disagreed on nested emphasis, and L4 failed its own corpus | The schema holds em and strong together wherever Go draws well-formed HTML, with em outside. ***x*** is pinned to <em><strong>x</strong></em>. Four outputs are stated exactly in §5 and held by L4 | §5, §6.3, L4 | | L /links/resolve as a GET | POST /links/resolve, which writes nothing, like /preview | §6.6, §6.8, §8, L7 | | L The structure check counted empty blocks and the trailing paragraph | Both are left out | §6.4 step 5 | | L The server should render the trailing paragraph | It does, and L4 pins its markup | §5, §6.2, §8, L4 | | L Settle's check; Merge3's indices | Settle runs the structure check and falls back to Join. Merge3 records each block's index in theirs or mine | §6.4, §8 | | L rebase=R must belong to this page | Refused unless R is a revision of this page inside the window | §6.5, §8, L9 | | L Reload then close left an offered draft | sessionStorage keeps the tab's draft version, so the tab still knows the draft is its own | §6.5, §6.8, L9 | | L Does the Links panel read the draft? | Committed text only. The panel is refetched after each commit | §6.8 | | L "Renamed from…" when the prior revision has aged out | "Renamed to <the new title>" | §4.5 | | L Leaving inside Mapa when the commit fails or conflicts | A conflict stays on the page with the choice and "Leave and decide later". A failed flush offers "Leave anyway". A stored draft whose commit failed leaves | §6.5, L9 | | L Escape < in the JSON island | encoding/json escaping, with a </script> test | §6.8 |
Round 3: Fable's final review of 58fd476
CHANGES REQUIRED, 2 high, answered on level-up/review-fixes. Every high and medium has a gate that fails without its fix; each was shown red by reverting the fix.
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | H1 A page deleted mid-edit: the editor took text, showed "Saved", stored none of it; the committed stop the same | The draft keeps autosaving, nothing commits, the status says "Saved as a draft", the bar's forms store the typing first; an offered draft committed elsewhere goes on as a new draft (note 58) | saver.test.mjs H1 ×2; TestL9APageDeletedMidEditKeepsWhatIsTyped (browser) | 4cd3176 | | H2 An emptied unwritten day's commit answered saved with no revision; the next text vanished under the stored empty draft | The store drops the held empty draft and answers {saved: false, empty: true}; ErrPageGone answers {saved: false, gone: true}; the saver never takes a reply without revision as a commit (note 59) | TestL9CommittingAnEmptiedDayDropsTheDraft, TestL9ACommitOnADeletedPageIsNotSaved, saver.test.mjs H2 | a61155c, 4cd3176 | | M1 Resolve's answer overwrote text typed since the last autosave | Autosave first; no typing while the POST is out; the same hunks keep their picks (note 60) | saver.test.mjs M1 (red with the old conflict.mjs alone too); TestL9TheInlineChoiceCommitsWhatIsOnScreen (browser) | 4cd3176 | | M2 Closing with a choice open dropped unsent text; "Show the saved version" too | Draft-only keepalive while commits are held; the bar's link holds, flushes, then goes (notes 56, 61) | saver.test.mjs M2 | 4cd3176 | | M3 Note 38's "nothing is lost" was false when the reload's commit had not happened | settling=1: the loaded version or none; note 38 corrected (note 62) | TestL9ClosingWhileSettlingWritesTheTextEitherWay, saver.test.mjs M3 | a61155c, 4cd3176 | | M4 A stale clean merge left the conflict set, blocking commits | Any reply without a conflict ends it (note 63) | saver.test.mjs M4 | 4cd3176 | | M5 The editor threw at mount on a fence line holding U+2028/U+2029 | dotAll; two corpus bodies (note 64) | L1, L2 on the new corpus bodies | 722f39a | | M6 cleanBody 10s on 80,000 spaces; the link scan quadratic | Linear in the editor, and in Go, which was worse (note 65) | linear.test.mjs, TestTheLinkScansAreLinear | 3bc0714 | | L A commit merged while typing in the same block conflicts later with the person's own text | Recorded (note 67) | — | — | | L First-scratch token map failed open at 4,096 | Refuses (503) before making anything (note 66) | TestAFullTokenMapRefusesANewPage | 3df8f5d | | L closing() sent current(), not prepare() | prepare() (note 61) | — | 4cd3176 | | L An autosave in flight at close makes the close a stale 409 | Recorded: a protocol change (note 67) | — | — | | L Undo can throw inside prosemirror-history | Guarded; the root recorded (notes 66, 67) | serialize.test.mjs guard case | 766a401 | | L Marker rule vs reparse over a duplicate ^id; a copy-drag never reparsed | The keeper is the block that held the id before; copies are reparsed; the marker-only fight recorded (notes 66, 67) | serialize.test.mjs ×2 | 1ea4be9 | | L localReturn weaker than safeReturn | Uses its rule | TestLocalReturnRefusesAnythingOffSite (\v, NUL, DEL) | 3f7fa15 | | L L7 had no ?month= case | TestL7TheMonthCalendarWritesNothing | (a member row written under ?month= turns it red) | 6d2a089 | | Gate L9 had no cases for H1, H2, M1–M3 | Added, Node, Go and browser (above) | — | a61155c, 4cd3176 | | Gate TestSettleFallsBackToJoinWhenTheBytesWouldNotParse passed without the structure check | Kept and Join bytes now differ | red with the check removed | a64af65 | | Gate "Untouched" ignoring context survived make ci | A serialize.test.mjs case changes context alone (task, bullet, quote) | red with checked dropped from the context key, which L3 misses | e378892 | | Gate The accessor's scope mutation was caught through one read | Gate 1 also compares a week alone and a month alone holding the day | all three comparisons differ under the mutation | f3c0817 |
Round 4: Fable's re-review of 14ab6a6 — APPROVE
No high. The mediums and lows are answered on level-up/review-fixes-2, without another review round. Each medium's gate was shown red with its fix reverted.
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | M-A (M3's residual) settle() found the draft committed with a teammate's text, left the loaded version, and a close then 409ed and wrote nothing | Version 0 and the old base, as recover() (note 73) | saver.test.mjs "settling finds the draft committed with a teammate's text" | c7e7aa4 | | L A different draft found while settling made the close stale and the next 409 replaced typing | Shown at once, offered, when nothing is typed; the rest recorded (note 73) | saver.test.mjs "settling finds another tab's newer draft" | c7e7aa4 | | M-B (H1's residual) A page deleted before the first autosave: 404, three retries, Failed after ~17s, no bar; the close 404ed | A 404 is that state: Not saved, Save as a scratch page via POST /scratch, offered again on leaving, made by the close; note 58 corrected (note 74) | saver.test.mjs M-B; TestL9APageDeletedBeforeAnyDraftOffersAScratchPage (browser, never saw the offer on the old bundle) | f39d651 | | L2 A bar's form was sent after a failed flush; Show the saved version went anyway | Not sent, and the bar says so; Leave anyway offered (note 75) | — | f39d651 | | L3 post() had no timeout: a hung autosave blocked every later one | post.mjs aborts after 10s; a landed aborted write is known as the tab's own (note 75) | post.test.mjs; saver.test.mjs L3 (the typing was replaced) | 9db58d6 | | L4 firstCap was one map for everyone | Per person, 256, failing closed (note 76) | TestAFullTokenMapRefusesANewPage (Bo refused under the old global count) | 6b18c30 | | Note 67 The in-flight close's loss bound; the commit-in-flight shape; the protocol change | Corrected and added; next=N / sent=N recorded as a follow-up, not built | — | this commit | | Merge design/level-up moved to 8c65d76 (smooth-nav) | Merged; page.mjs keeps uncommitted() and round 4's flushFirst; bundle rebuilt, credits regenerated | — | 63ffda6 |
Round 5: Fable on ux/fixes-1 (315d8d7) — APPROVE
No high. The mediums and lows are answered on fix/title-followups (note 79), without another review round. Each gate was shown red with its fix or guard removed.
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | M1 carryDrafts' base filter was ungated: carrying every draft on the page passed every gate, and a stale draft's commit then saved over a teammate's edit | Two tests (the Bo/Ana scenario; a teammate's draft on the head); make mutate drops the filter | TestAStaleDraftIsNotCarried (Bo's draft moved to R2 under the mutant); TestATeammatesDraftOnTheHeadIsCarried (with carryDrafts not called); the L9 mutant in scripts/mutate | 584ddf6 | | M2 The title's IME, beforeinput and paste guards were ungated | Browser gates with trusted input: composing Enter, rich paste, breaks and formatting | title_guards_browser_test.go, each guard removed in turn (note 79) | 9856d5a | | L1 Blur renamed when the window lost focus (Cmd-Tab mid-typing) | No rename on a blur with the window unfocused or the page hidden; the field gets its focus back; closing with an edited title renames it (keepalive) | TestTitleLosingTheWindowDoesNotRename (renamed to "… Rob"; with no focus restore, "coming back did not give the field its focus"; the hidden case alone too); TestTitleClosingThePageRenamesAnEditedTitle ("never: the closing rename" without pagehide); title.test.mjs closing | 7b3c7cd | | L2 An autosave in flight across a rename put the old base back | The compare-and-swap holds the base too; a carry under the same version is written over quietly, never a 409 | TestAnAutosaveInFlightKeepsTheCarriedBase (the base went back to R0 with the version-only swap) | 8ac67ca | | L3 A rename that landed with its reply lost said "Not renamed", and the retry's from "0" left the saver's base behind | An unchanged title answers the rename that minted the head | TestARepeatedRenameAnswersTheRenameThatLanded (from "0"); TestTitleARetriedRenameThatLandedMovesTheBase (browser: the base stayed on R0) | 71202ec, 7b3c7cd | | L4 The hidden body on a refused POST /pages was ungated | Gated | TestARefusedNewPageKeepsItsBodyHidden (red with the field dropped, and with the body's whitespace flattened) | 702569a | | Follow-up Android's Enter (keyCode 229, then a non-composing insertParagraph) did nothing in the title | A non-composing break renames as Enter does; a composing one still does nothing (note 79) | TestTitleAndroidsEnterRenames (never renamed on the old bundle); TestTitleAComposingEnterDoesNotRename "a composing break" (renamed with the isComposing check dropped) | see the branch tip |
Round 6: Fable on feat/sidebar-and-page-link (8066d40) — CHANGES REQUIRED
No review round after; each finding is answered with a gate shown red without the fix.
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | H1 ⌘L and Insert → Link to a page on the Markdown screen replaced a selection they could not wrap with [[ (⌘A then ⌘L wiped the page) | Over such a selection they do nothing; [[ only at a caret; other inserts never replace a selection (note 81) | TestTheMarkdownScreenNeverReplacesASelection: ⌘A then ⌘L left "[["; Insert over everything left "[[" | 07236bb | | M1 Recently edited emptied after 200 private writes: the team filter ran after LIMIT 200 | The query keeps live team pages (rung, gone); the window grows until six pages (note 80) | TestRecentlyEditedOutlastsManyPrivateWrites: 0 rows | 60421da | | M2 No gate for M1 | That test; the 80 mutant in scripts/mutate filters after the window again | the mutant must fail the test | 60421da | | M3 The corpus run checked stability, not fidelity; 15 links became an embed or re-paired code | Per link: the text less the words, exactly one more chip; the block is written and parsed before the chip goes in, and refused with a note when it would not read back (note 81) | the corpus run without the check: 11 of 760 bodies differ (<![[-- foo -->]], ` [[]] `); pagelink.test.mjs x!word, <!-- foo --> | a7513f1 | | **M4** Page-linking web-linked words dropped the address | Refused, "can't hold another link" (the coordinator's ruling; note 81) | pagelink.test.mjs: linkable returned the words at 8066d40 | a7513f1 | | **L1** ⌘A then ⌘L in the editor was swallowed silently | The one-block note, the bubble up to show it | TestPageLinkSaysWhyItLinksNothing: never said why | a7513f1 | | **L2** The bubble ignored a refused link | linkCheck's refusal shown | the same test: never said "The selection changed" | a7513f1 | | **L3** Ctrl+L on a Mac fired in the textarea | Mod only (⌘ on Apple, Ctrl elsewhere) | TestTheMarkdownScreenNeverReplacesASelection: wrote "line [[one]]" | 07236bb | | **L4** With no CSS both the lit rail copy and the page row carried aria-current | The lit copy is hidden too (note 80) | TestOneFullHighlightForEachPage: "with no CSS 2 rows are lit" | 60421da` |
Addendum: Fable's re-review of 168d97b — APPROVE, landed as 4dcfbdf. Three lows, on fix/recent-query:
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | L1 The widening window cost ~46ms a page view for a heavy editor of few team pages | One query: a loose scan of idx_events_actor_page (migration 0004), each page's newest write that counts, six (note 80, with before and after) | BenchmarkRecentEdits20k 45.8ms → 0.27ms, 200k 47.3ms → 0.28ms; TestRecentlyEditedReadsByIndex holds the plan | 4ee3a36 | | L2 "One page edited many times cannot hide the rest" was not gated | Gated | TestRecentlyEditedOutlastsManyEditsToOnePage: "Team page 6" alone with the window capped | 67cd217 | | L3 NOT pages.gone was not gated on its own | Gated, and a mutant | TestRecentlyEditedLeavesOutDeletedPages; the mutant dropping only that clause | 67cd217 |
Round 7: Fable on feat/week-strip-and-date-picker (3a7ee5f) — CHANGES REQUIRED
No High, no leak. Each finding is answered with a gate shown red without the fix, on the same branch.
| Finding | Change | Gate, red without the fix | Commit | |---|---|---|---| | M1 A date picked right after ! became an embed and the ! left the reading | dateInsertion (picker and Today's date) checks the block reads back with one more link and the same text, as Link to a page does; a space first after !; else refused, before the picker opens, with a note (note 83; picker.refused for copy review) | TestADateAfterABangIsNeverAnEmbed: wrote Look![[2026-11-16]]; TestADateTheMarkdownWouldMisreadIsRefused: no note; datepicker.test.mjs's ! and refusal cases | 017bbca | | M2 The corpus gate's 1% threshold could not fail on what it was for | Per insert, no threshold: one more date chip and the same text, or a place where a typed x fails too | the L3 run with the readback off: 11 bodies fail (<![[…]]DOCTYPE html>); round 6's run passed with them | 017bbca | | M3 Insert → Date… and Today's date replaced a selection | The chip goes at the selection's end; the words stay | TestADateOverASelectionKeepsTheWords: wrote Call [[2026-11-17]] today; datepicker.test.mjs | 017bbca | | L1 The field's .trim() took U+FEFF, which ⌘K does not | goTrimSpace; the port gets the field's value as typed | TestThePickersFieldTrimsAsCmdKDoesAndKeepsItsCaret: \ufefffriday chose Friday | 017bbca | | L2 "Today" was the browser's date, not the viewer's zone's; a picker open past midnight kept yesterday | today() reads <body data-zone> with Intl each time, for the picker and Today's date; the picker reads it on every redraw | TestTodayIsTheViewersZones: wrote the 16th at UTC+14; datepicker.test.mjs, four zones | 017bbca | | L3 ← → in the field always moved the day | With text in the field they move its caret | the same field test with the L1 fix in and this one out: "caret 11, day 2026-11-18" (at 3a7ee5f it fails first on L1) | 017bbca |