Build note 77: New team page and the rail's tooltips, unclipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+9
−0
docs/superpowers/specs/2026-11-14-mapa-level-up.md+9 −0
CI passed — run details
CI log
=== editor === cd editor && npm ci --no-audit --no-fund --loglevel=error added 16 packages in 314ms cd editor && node build-bundles.mjs wrote internal/mapa/static/editor.1969c5f18c953d0a.js (305206 bytes, 95.3KB gzipped; L12 budget 120KB) cd editor && node --test ✔ L1: mounting then serialising gives cleanBody(body), byte for byte (41.512296ms) ℹ 760 bodies ✔ L1: mounting a stored body adds nothing, and saving it writes nothing new (57.717518ms) ✔ L2: one edited block changes only that block's bytes; undo gives the body back (103.27393ms) ℹ 748 single-block edits ✔ L2: inserting or deleting a block changes bytes only at the new seams, by Join (115.421861ms) ℹ 755 inserts, 715 deletes ✔ L3: seeded edits keep the document and its Markdown saying the same thing (3218.801171ms) ℹ 18240 edits over 760 bodies ✔ linear: trailing spaces (18.739545ms) ✔ linear: trailing whitespace (13.084307ms) ✔ linear: unclosed web links (12.66059ms) ✔ linear: web links with no address (25.685139ms) ✔ linear: unclosed wiki links (27.548456ms) ✔ linear: unclosed embeds (19.375876ms) ✔ linear: closes only (8.509085ms) ✔ golden file has bodies (0.712032ms) ✔ markup.mjs parses every body into Go's blocks, byte offsets and all (12.690417ms) ✔ markup.mjs strips and spans every block as Go does (26.223107ms) ✔ the schema's toDOM draws every body as Go renders it (49.862666ms) ✔ emphasis draws the four pinned outputs (16.489718ms) ✔ a body ends in the editor's empty paragraph (0.233784ms) ✔ a POST that never answers is aborted after the timeout (21.496634ms) ✔ a keepalive POST carries no signal, and an answer clears the timer (1.133394ms) ✔ autosave sends only what differs, and the tab owns the draft it wrote (9.877063ms) ✔ an offered draft never commits by itself; Save commits it (1.397715ms) ✔ reload, then close: sessionStorage says the draft is this tab's own (0.663943ms) ✔ closing carries text not yet sent, and the cap leaves it out (20.903341ms) ✔ clean rebase: applied, the caret survives, the base moves by the rebase POST (3.337304ms) ✔ the block under the caret is the teammate's too, and undo brings back yours (2.441141ms) ✔ typing mid-flight: the merge is not applied and the base does not move (1.031886ms) ✔ a merge the editor cannot represent stops after three tries (3.23242ms) ✔ a conflict is shown, locks the editor's own commits, and Resolve settles it (1.138383ms) ✔ leaving: a conflict stays with the choice; a failed flush offers Leave anyway; a stored draft leaves (1.338504ms) ✔ a stale tab shows the newer draft, offered, and never overwrites it (0.792231ms) ✔ the first scratch commit: empty creates nothing, then one page, then drafts on it (0.77623ms) ✔ noBase and gone lead to the existing choices (0.778816ms) ✔ a commit that merged is applied when nothing was typed since (0.914548ms) ✔ back from the cache: nothing unsaved reloads, unsaved text autosaves at once (6.641548ms) ✔ an own draft committed meanwhile goes on as a new draft (1.386484ms) ✔ a reload keeps a stored draft; unsent text still commits (0.542988ms) ✔ a page deleted mid-edit: what is typed is still stored as the draft, and nothing commits (H1) (1.079585ms) ✔ an offered draft committed in another tab: typing goes on as a new draft (H1) (2.567216ms) ✔ a commit reply without a revision is not a commit; an emptied day starts afresh (H2) (1.139005ms) ✔ Resolve stores what was typed first, and takes no typing until its answer is applied (M1) (3.902733ms) ✔ closing with a choice open, or commits held, still writes the text, never commits (M2) (1.073472ms) ✔ closing inside the settling window sends the loaded version with settling=1 (M3) (0.319934ms) ✔ a clean merge not applied because of typing still ends the choice on show (M4) (0.874954ms) ✔ settling finds the draft committed with a teammate's text: a close still writes (M-A) (0.475102ms) ✔ settling finds another tab's newer draft: the tab shows it before any typing (0.654776ms) ✔ a page deleted before the first autosave: the text is offered as a scratch page, and a close makes one (M-B) (0.557956ms) ✔ an autosave that never answered but landed: its 409 keeps the typing since (L3) (0.61454ms) ✔ marks: em outside strong, bold reopened around italics, edges outside (6.267653ms) ✔ marks close before code, links and atoms, and reopen after (0.408688ms) ✔ untouched blocks and atoms re-emit their source; edited atoms are written from attributes (5.424329ms) ✔ empty blocks are written as nothing (1.979084ms) ✔ an unclosed fence that is no longer last gets its closing fence (1.208984ms) ✔ the structure check puts Join's seam where a kept one would merge two blocks (1.733277ms) ✔ prepareSave adopts the parse when no seam or rewrite can save the document (2.47869ms) ✔ reparse: typed emphasis becomes a mark, "- " after a break becomes an item (1.836398ms) ✔ a trailing hard break stays on screen and is written as nothing (0.475372ms) ✔ the reparse waits while an IME is composing (0.716731ms) ✔ copied blocks paste with their bytes and seams; a cut and paste gives the body back (2.940899ms) ✔ a forged x-mapa slice is refused, and text from outside is read as Markdown (0.891214ms) ✔ rebuild changes origins only, outside undo history (1.274505ms) ✔ applyBody takes a teammate's block, keeps the caret, and ends untouched (1.074143ms) ✔ a block whose context changed is written again: a task toggled, a bullet, a quote (2.001495ms) ✔ a duplicate ^id typed above its holder never takes the id from it (0.545963ms) ✔ a copy-dragged block is reparsed, and says what its Markdown says (0.726829ms) ✔ a history command that throws is refused, never thrown (2.43462ms) ℹ tests 66 ℹ suites 0 ℹ pass 66 ℹ fail 0 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 ℹ duration_ms 3635.034229 === vet === go vet ./... go vet -tags browser ./internal/mapatest/ === fmt === === code === go tool rastrillo budget code The base has no .rastrillo/code.txt: skipping the check that records only go down. budget code: within the limits. === test === CGO_ENABLED=0 go test ./... ? amadan.net/oficina/mapa/cmd/mapa [no test files] ok amadan.net/oficina/mapa/internal/mapa 0.503s ? amadan.net/oficina/mapa/internal/mapa/icons [no test files] ok amadan.net/oficina/mapa/internal/mapa/markup 0.054s ok amadan.net/oficina/mapa/internal/mapa/seal 0.002s ok amadan.net/oficina/mapa/internal/mapatest 8.388s ? amadan.net/oficina/mapa/scripts/mutate [no test files] ? amadan.net/oficina/mapa/scripts/preview [no test files] === migration-check === go tool rastrillo migration check rastrillo migration check: models and migrations agree === credits-check === python3 scripts/credits.py --check credits: checked
diff --git a/docs/superpowers/specs/2026-11-14-mapa-level-up.md b/docs/superpowers/specs/2026-11-14-mapa-level-up.md| index 46ef2c6..13e84ac 100644 |
| --- a/docs/superpowers/specs/2026-11-14-mapa-level-up.md |
| +++ b/docs/superpowers/specs/2026-11-14-mapa-level-up.md |
| @@ -1142,6 +1142,15 @@ Phase 1's choices where this spec was silent, or where the build chose different |
| 75. **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.mjs` aborts 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. |
| 76. **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): |
| + |
| +77. **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 native `popover` (`#mapa-new-page`, `role="dialog"`), opened by a `popovertarget` button 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 (`autofocus` inside 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, with `position-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 `/new` instead 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 posts `POST /pages` itself with `Accept: application/json`, held 650ms with the busy spinner (the form carries `data-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 by `required` before 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** are `position: 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-name` with `anchor-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 on `1e92f29`: `TestNewTeamPageShowsTheWholeForm` opens New team page in six sidebar states (1400 and 900 wide; no cookie, `open` and `rail`) and at 390 by Page → New team page, scripts off and on, asks `elementFromPoint` at 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 (on `1e92f29`: the corners hit `main` in 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 on `1e92f29`); `TestTheRailsTooltipsAreWhole`, which hovers every rail row by width and by cookie and hit-tests the tooltip's corners (every one cut off on `1e92f29`). `TestNewTeamPageAnswersThePopover` holds 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. |
| + |
| ## 14. Findings and what changed |