oficina / mapa Public

The row menu is over the page, and comes back without the notice

Fable's review of 27e4533: the sticky sidebar is a stacking context, so
the open menu's part over the page was painted under the editor's text;
the sidebar is lifted while a menu is open, and a gate at 900px holds
it. The <details> is a block, so without anchoring the menu falls under
its ⋯. A pin from a row drops the screen's ?done= notice. On a touch
screen every sidebar row is 44px. Gates for ↑, Tab out and the rename.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 56e58c0eca47a2640e835a874c47854a0ec1c2de parent 27e4533
6 files changed, +110 −36
  • docs/superpowers/specs/2026-11-14-mapa-level-up.md +8 −8
  • internal/mapa/menus_test.go +15 −1
  • internal/mapa/side.go +17 −3
  • internal/mapa/static/frame.css +7 −4
  • internal/mapatest/sidebar_more_browser_test.go +56 −20
  • internal/mapatest/title_browser_test.go +7 −0

CI passed — run details

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

added 16 packages in 523ms
cd editor && node build-bundles.mjs
wrote internal/mapa/static/editor.f090d9073767ee52.js (354326 bytes, 111.3KB gzipped; L12 budget 120KB)
cd editor && node --test
✔ a badge is named for what it does, starting with its visible word (3.673862ms)
✔ first words stop at five words or forty characters (0.200373ms)
✔ the field keeps one trimmed line, without brackets (0.341355ms)
✔ the field holds at most MaxAlt bytes, cut at a character (1.152103ms)
✔ days and weeks move across months and years (0.995782ms)
✔ a month keeps the day, or takes the month's last (0.264262ms)
✔ the grid is six weeks from Monday, as the month calendar draws it (0.55373ms)
✔ the grid starts the week where the locale does (2.079398ms)
✔ the keys move a day, a week, a month and a year (0.294838ms)
✔ the picked day is the chip [[ makes for a date (14.517467ms)
✔ Insert → Today's date still puts today in at once (1.997766ms)
✔ / offers Date, the picker, and Today's date beside it (0.266245ms)
✔ after a ! the chip goes in after a space, never as an embed (3.123629ms)
✔ where the Markdown would read the chip differently, it is refused (6.633545ms)
✔ over a selection the chip goes after it and the words stay (2.504789ms)
✔ today is the day in the viewer's zone (41.334089ms)
✔ every offered locale has cases (0.847025ms)
✔ dates.mjs writes every date Go writes, byte for byte (4.369575ms)
✔ a chip, the month and the week, in three locales (0.436963ms)
✔ dates.json is what ICU gives, byte for byte (624.613341ms)
✔ L1: mounting then serialising gives cleanBody(body), byte for byte (97.093154ms)
ℹ 871 bodies
✔ L1: mounting a stored body adds nothing, and saving it writes nothing new (134.136463ms)
✔ L2: one edited block changes only that block's bytes; undo gives the body back (153.585813ms)
ℹ 858 single-block edits
✔ L2: inserting or deleting a block changes bytes only at the new seams, by Join (174.890783ms)
ℹ 866 inserts, 817 deletes
✔ L3: seeded edits keep the document and its Markdown saying the same thing (5592.008913ms)
ℹ 20904 edits over 871 bodies
✔ L3: Link to a page makes exactly one chip, and changes nothing else (1958.807299ms)
ℹ 4532 links over 871 bodies; refused: {"A page link can’t hold another link or a line break. Select plain words.":918,"A page link can’t show [ or ]]. Select words without them.":404,"Select some words to link them to a page.":174,"Linked here, the Markdown around these words would read differently: a ! before them makes an embed, and a stray ` or * pairs up. Select other words.":18}
✔ L3: a picked date is one more date chip, or refused where a letter would be too (1331.732773ms)
ℹ over 871 bodies: {"inserted":5158,"spaced":23,"refused":45,"unstable":9}
✔ linear: trailing spaces (43.447629ms)
✔ linear: trailing whitespace (25.413443ms)
✔ linear: unclosed web links (38.117818ms)
✔ linear: web links with no address (53.301224ms)
✔ linear: unclosed wiki links (34.745184ms)
✔ linear: unclosed embeds (25.644612ms)
✔ linear: closes only (13.380964ms)
✔ the selected words become the chip's shown text (11.009424ms)
✔ words that are the title make a plain [[Title]] (3.630842ms)
✔ spaces at the selection's edges stay outside the chip (2.004648ms)
✔ a date makes a date link, in a heading, an item and a quote (7.889904ms)
✔ bold words lose their bold: a chip carries no marks in Mapa's Markdown (2.294787ms)
✔ only the linked block's bytes change, and undo gives the body back (3.085417ms)
✔ a selection across blocks, over a chip or a break, or of brackets is refused (1.733464ms)
✔ a target the words cannot be linked to as typed is refused (0.406706ms)
✔ ⌘L: over a selection it opens Page link; with none it types [[; in code it does nothing (3.135211ms)
✔ web-linked words are refused: the address would be lost (review M4) (1.108331ms)
✔ words whose Markdown would read otherwise are refused (review M3) (3.193659ms)
✔ ⌘A then ⌘L says why, instead of doing nothing (review low 1) (0.476837ms)
✔ linkCheck says why it refuses (review low 2) (1.730448ms)
✔ golden file has bodies (1.476355ms)
✔ markup.mjs parses every body into Go's blocks, byte offsets and all (28.842899ms)
✔ markup.mjs strips and spans every block as Go does (85.297657ms)
✔ the schema's toDOM draws every body as Go renders it (98.574889ms)
✔ emphasis draws the four pinned outputs (22.396111ms)
✔ a body ends in the editor's empty paragraph (0.285481ms)
✔ the editor labels date chips as Go does, in every locale L4 holds (12.934033ms)
✔ a POST that never answers is aborted after the timeout (26.115627ms)
✔ a keepalive POST carries no signal, and an answer clears the timer (1.188079ms)
✔ autosave sends only what differs, and the tab owns the draft it wrote (13.889861ms)
✔ an offered draft never commits by itself; Save commits it (2.083505ms)
✔ reload, then close: sessionStorage says the draft is this tab's own (0.930441ms)
✔ closing carries text not yet sent, and the cap leaves it out (32.076762ms)
✔ clean rebase: applied, the caret survives, the base moves by the rebase POST (4.041987ms)
✔ the block under the caret is the teammate's too, and undo brings back yours (3.671317ms)
✔ typing mid-flight: the merge is not applied and the base does not move (1.272316ms)
✔ a merge the editor cannot represent stops after three tries (5.147974ms)
✔ a conflict is shown, locks the editor's own commits, and Resolve settles it (1.647995ms)
✔ leaving: a conflict stays with the choice; a failed flush offers Leave anyway; a stored draft leaves (2.023172ms)
✔ a stale tab shows the newer draft, offered, and never overwrites it (1.121676ms)
✔ the first scratch commit: empty creates nothing, then one page, then drafts on it (0.960486ms)
✔ noBase and gone lead to the existing choices (0.937583ms)
✔ a commit that merged is applied when nothing was typed since (1.536528ms)
✔ back from the cache: nothing unsaved reloads, unsaved text autosaves at once (10.904029ms)
✔ an own draft committed meanwhile goes on as a new draft (2.146301ms)
✔ a reload keeps a stored draft; unsent text still commits (0.753862ms)
✔ a page deleted mid-edit: what is typed is still stored as the draft, and nothing commits (H1) (1.702045ms)
✔ an offered draft committed in another tab: typing goes on as a new draft (H1) (3.727362ms)
✔ a commit reply without a revision is not a commit; an emptied day starts afresh (H2) (1.40864ms)
✔ Resolve stores what was typed first, and takes no typing until its answer is applied (M1) (5.014224ms)
✔ closing with a choice open, or commits held, still writes the text, never commits (M2) (2.549932ms)
✔ closing inside the settling window sends the loaded version with settling=1 (M3) (0.431303ms)
✔ a clean merge not applied because of typing still ends the choice on show (M4) (1.538041ms)
✔ settling finds the draft committed with a teammate's text: a close still writes (M-A) (1.095257ms)
✔ settling finds another tab's newer draft: the tab shows it before any typing (0.857224ms)
✔ a page deleted before the first autosave: the text is offered as a scratch page, and a close makes one (M-B) (0.756567ms)
✔ an autosave that never answered but landed: its 409 keeps the typing since (L3) (0.769862ms)
✔ marks: em outside strong, bold reopened around italics, edges outside (15.573923ms)
✔ marks close before code, links and atoms, and reopen after (0.584276ms)
✔ untouched blocks and atoms re-emit their source; edited atoms are written from attributes (14.427833ms)
✔ empty blocks are written as nothing (5.241166ms)
✔ an unclosed fence that is no longer last gets its closing fence (2.621795ms)
✔ the structure check puts Join's seam where a kept one would merge two blocks (2.838158ms)
✔ prepareSave adopts the parse when no seam or rewrite can save the document (10.091848ms)
✔ reparse: typed emphasis becomes a mark, "- " after a break becomes an item (2.788045ms)
✔ a trailing hard break stays on screen and is written as nothing (4.267377ms)
✔ the reparse waits while an IME is composing (1.050714ms)
✔ copied blocks paste with their bytes and seams; a cut and paste gives the body back (11.264959ms)
✔ a forged x-mapa slice is refused, and text from outside is read as Markdown (0.74775ms)
✔ rebuild changes origins only, outside undo history (2.163613ms)
✔ applyBody takes a teammate's block, keeps the caret, and ends untouched (1.897269ms)
✔ a block whose context changed is written again: a task toggled, a bullet, a quote (4.026579ms)
✔ a duplicate ^id typed above its holder never takes the id from it (1.406866ms)
✔ a copy-dragged block is reparsed, and says what its Markdown says (1.062476ms)
✔ a history command that throws is refused, never thrown (12.040932ms)
✔ an image re-emits its source, and an edited alt changes only its span (2.590097ms)
✔ a paste whose image copy is refused says why and pastes nothing (26.944248ms)
✔ a line of image openers reads in linear time (149.017406ms)
✔ a line of shared link address reads in linear time (11.755302ms)
✔ a line of shared web address reads in linear time (55.819848ms)
✔ one rename at a time, from either field (6.10305ms)
✔ an empty or unchanged title sends nothing (0.333611ms)
✔ a refusal keeps what was typed, and the title (0.249394ms)
✔ the pending state holds for the busy rule (13.054176ms)
✔ a failed POST says so and keeps the title (1.015388ms)
✔ Update links posts the confirm page's POST (0.254463ms)
✔ clean is CleanTitle's whitespace rule (0.964965ms)
✔ the saver's base follows a rename made over it, and only that (0.301731ms)
✔ closing sends the rename as one keepalive POST (4.216302ms)
✔ the port answers every shared case as typeddate.go does (7.540423ms)
✔ numbers follow the locale: 12/11 is November in en-IE, December in en-US (0.272717ms)
✔ M6: several files land in the order they were chosen (55.818846ms)
✔ M5: one Backspace before the box keeps the image where the box is (13.29773ms)
✔ M5: undoing text typed just before the box keeps the upload (13.12591ms)
✔ L12: a failed upload an undo takes away does not stall the next (14.131632ms)
✔ M4: Replace… keeps the old image until the new one is in, and its alt (15.989825ms)
✔ M3 and N1: text wins, except over a picture copied from a page (1.782376ms)
✔ N2: a JPEG over 10 MB is scaled before its size is checked (7.530774ms)
✔ a drag whose anchor the document no longer reaches selects to its end (6.134658ms)
ℹ tests 126
ℹ suites 0
ℹ pass 126
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 9645.582003
=== 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	4.018s
?   	amadan.net/oficina/mapa/internal/mapa/icons	[no test files]
ok  	amadan.net/oficina/mapa/internal/mapa/imagefile	0.244s
ok  	amadan.net/oficina/mapa/internal/mapa/locale	0.014s
ok  	amadan.net/oficina/mapa/internal/mapa/markup	0.188s
ok  	amadan.net/oficina/mapa/internal/mapa/notionmd	0.379s
ok  	amadan.net/oficina/mapa/internal/mapa/seal	0.005s
ok  	amadan.net/oficina/mapa/internal/mapatest	16.455s
?   	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 edaf3a4..6f18ed2 100644
--- a/docs/superpowers/specs/2026-11-14-mapa-level-up.md
+++ b/docs/superpowers/specs/2026-11-14-mapa-level-up.md
@@ -135,10 +135,10 @@ The menus are estilo's `menubar`, with their keyboard shortcuts shown. An entry
- **Page:**
- New team page and New scratch page.
- - Rename (team) and Pin / Unpin.
+ - Rename (team), Link to this block (team) and Pin / Unpin.
- Make team page (private notes).
- - Link to this block (team).
- - History, Delete… and Deleted pages.
+ - History, then Delete… set apart (build note 88).
+ - Deleted pages.
- 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.
@@ -1285,12 +1285,12 @@ Phase 1's choices where this spec was silent, or where the build chose different
88. **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 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 is `opacity: 0` and `pointer-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 with `aria-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 the page rows, the ⋯ and the menu's rows are Fiesta's `--rst-tap` (44px).
+ - **Touch.** A coarse pointer has no hover, so the ⋯ shows on the page on screen's row only (the one with `aria-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 the bar's Page menu is the page's verbs, as before. 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 by `mapa-menu-items`, the template the menu bar now uses too. The rows come from `pageVerbs`, the one source for both menus; `rowMenu` drops what is marked `Here` (Link to a block…, which picks a block on the page on screen). The Page menu takes the same order: Rename…, Link to a block…, Pin / Unpin, Make team page…, History, then Delete… set apart by a divider. 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>/pin` with a `return` of the screen the row was on, checked by `safeReturn` (anything else goes to the page, as before); a full sidebar still says so on the page.
- - **Placement.** The panel is `position: fixed` so the sidebar's scrolling never clips it (note 77's reason), tied to its ⋯ by anchor positioning (`anchor-scope` per row), below it and flipped above near the window's foot; an engine without anchoring puts it at its static place under the ⋯. The sidebar's stacking is unchanged.
- - **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.js` moves focus to the first row on opening, lets ↓ and ↑ move between rows, and closes it when focus leaves it for another control. `title.mjs` renames a row's ⋯ with its row when the title is renamed in place.
- - **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, Esc closes and gives focus back to the ⋯; 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 ⋯. `TestARowsMenuIsThePagesVerbs` in `internal/mapa` holds the two menus to one source, and `TestPinFromARowComesBack` the return.
+ - **The menu.** estilo's menu, as the bar uses it: the panel is `[estilo-menu]` and its rows are drawn by `mapa-menu-items`, the template the menu bar now uses too. The rows come from `pageVerbs`, the one source for both menus; `rowMenu` drops what is marked `Here` (Link to a block…, which picks a block on the page on screen). The Page menu takes the same order: Rename…, Link to a block…, Pin / Unpin, Make team page…, History, then Delete… set apart by a divider. 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>/pin` with a `return` of the screen the row was on, checked by `safeReturn` (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 is `position: fixed` so the sidebar's scrolling never clips it (note 77's reason), tied to its ⋯ by anchor positioning (`anchor-scope` per 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 own `z-index` counted 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 of `27e4533`, M1): while a menu is open the sidebar has `z-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.js` moves focus to the first row on opening, lets ↓ and ↑ move between rows, and closes it when focus leaves it for another control. `title.mjs` renames a row's ⋯ with its row when the title is renamed in place (`TestTitleClickTypeEnterRenamesInPlace` checks 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 the `ARTICLE`); 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 ⋯. `TestARowsMenuIsThePageVerbs` in `internal/mapa` holds the two menus to one source, `TestARowComesBackWithoutTheNotice` the notice, and `TestPinFromARowComesBack` the return.
## 14. Findings and what changed
diff --git a/internal/mapa/menus_test.go b/internal/mapa/menus_test.go
index 12a9d18..afc95b1 100644
--- a/internal/mapa/menus_test.go
+++ b/internal/mapa/menus_test.go
@@ -58,8 +58,22 @@ func TestARowsMenuIsThePageVerbs(t *testing.T) {
}
}
}
- bar := pageVerbs(PageView{Public: "t", Kind: KindPage}, false)
+ team := PageView{Public: "t", Kind: KindPage}
+ bar := pageVerbs(team, false)
+ rowMenu(team, false, "/pages")
if _, back := bar[2].Fields["return"]; back {
t.Error("the row's return leaked into the bar's Pin")
}
}
+
+// A pin from a row comes back without the notice the screen showed.
+func TestARowComesBackWithoutTheNotice(t *testing.T) {
+ cases := map[string]string{"/p/x?done=pinsfull": "/p/x",
+ "/pages?q=a&done=saved": "/pages?q=a", "/d/2026-11-14": "/d/2026-11-14",
+ "/": "/"}
+ for given, want := range cases {
+ if got := withoutNotice(given); got != want {
+ t.Errorf("withoutNotice(%q) = %q, want %q", given, got, want)
+ }
+ }
+}
diff --git a/internal/mapa/side.go b/internal/mapa/side.go
index dcc3409..a7e1f43 100644
--- a/internal/mapa/side.go
+++ b/internal/mapa/side.go
@@ -2,6 +2,7 @@ package mapa
import (
"net/http"
+ "net/url"
"slices"
"github.com/go-chi/chi/v5"
@@ -58,18 +59,31 @@ func (app *app) side(request *http.Request, page *view) sideView {
// menus gives each page row its ⋯ (build note 88): a row in Recently
// edited is pinned too when Pinned holds its page.
func (side *sideView) menus() {
- pinned := map[string]bool{}
+ back, pinned := withoutNotice(side.Return), map[string]bool{}
for index := range side.Pinned {
row := &side.Pinned[index]
pinned[row.Href] = true
- row.Menu = rowMenu(row.page, true, side.Return)
+ row.Menu = rowMenu(row.page, true, back)
}
for index := range side.Recent {
row := &side.Recent[index]
- row.Menu = rowMenu(row.page, pinned[row.Href], side.Return)
+ row.Menu = rowMenu(row.page, pinned[row.Href], back)
}
}
+// withoutNotice is a return path less its ?done= notice, which said
+// what the last action did and must not be said again after a pin.
+func withoutNotice(path string) string {
+ parsed, err := url.Parse(path)
+ if err != nil || !parsed.Query().Has("done") {
+ return path
+ }
+ query := parsed.Query()
+ query.Del("done")
+ parsed.RawQuery = query.Encode()
+ return parsed.RequestURI()
+}
+
// light leaves exactly one full highlight (Paul, 2026-11-16; build
// note 80): on the page's own row when it has one, the first of
// Pinned and Recently edited, and otherwise on its place. The rail
diff --git a/internal/mapa/static/frame.css b/internal/mapa/static/frame.css
index 69dd89b..119559e 100644
--- a/internal/mapa/static/frame.css
+++ b/internal/mapa/static/frame.css
@@ -133,8 +133,8 @@ body {
position: absolute;
inset-block: 0;
inset-inline-end: var(--rst-sp-1);
- display: flex;
- align-items: center;
+ block-size: var(--mapa-more);
+ margin-block: auto;
opacity: 0;
pointer-events: none;
}
@@ -164,15 +164,18 @@ body {
and every row is a full tap target, the ⋯ too (Fiesta's --rst-tap). */
@media (pointer: coarse) {
[mapa-side-row] { --mapa-more: var(--rst-tap); }
- [mapa-side-row] > [mapa-side-item] { min-block-size: var(--rst-tap); }
+ [mapa-side-item] { min-block-size: var(--rst-tap); }
[mapa-row-menu] { inset-inline-end: 0; }
[mapa-side-row]:has(> [aria-current]) > [mapa-row-menu] { opacity: 1; pointer-events: auto; }
[mapa-row-menu] [estilo-menu-item] { min-block-size: var(--rst-tap); }
}
/* The menu leaves the sidebar's scrolling box, as the rail's tooltips
do (build note 77): fixed, tied to its ⋯ where the engine anchors,
- else at its static place under the ⋯. */
+ else at its static place, under the ⋯ (the <details> is a block, the
+ ⋯ its first line). The sticky sidebar is a stacking context, so while
+ a menu is open it is lifted over the page it hangs across. */
[mapa-row-menu] > [estilo-menu] { position: fixed; margin-block-start: var(--rst-sp-1); }
+[mapa-side]:has([mapa-row-menu][open]) { z-index: 1; }
@supports (anchor-name: --mapa-row-more) {
[mapa-row-menu] { anchor-scope: --mapa-row-more; }
[mapa-row-more] { anchor-name: --mapa-row-more; }
diff --git a/internal/mapatest/sidebar_more_browser_test.go b/internal/mapatest/sidebar_more_browser_test.go
index afbb998..b521024 100644
--- a/internal/mapatest/sidebar_more_browser_test.go
+++ b/internal/mapatest/sidebar_more_browser_test.go
@@ -59,6 +59,22 @@ func moreShown(t *testing.T, rig *harness.Rig, tag string) bool {
})()`, tag)))
}
+// cornersOf is, for the element a selector names, each corner (3px in)
+// where something else is on top: "" when all of it shows.
+const cornersOf = `(function (menu) {
+ var r = menu.getBoundingClientRect(), misses = [];
+ [[r.left + 3, r.top + 3], [r.right - 3, r.top + 3],
+ [r.left + 3, r.bottom - 3], [r.right - 3, r.bottom - 3]
+ ].forEach(function (p) {
+ var hit = document.elementFromPoint(p[0], p[1]);
+ if (!hit || !menu.contains(hit)) {
+ misses.push(p.map(Math.round).join(",") + " " +
+ (hit ? hit.tagName : "nothing"));
+ }
+ });
+ return misses.join("; ");
+})(document.querySelector(%q))`
+
// openMore opens the ⋯ of the row tagged tag as a mouse does: it comes
// to rest on the ⋯, which shows it, and clicks.
func openMore(tag string) chromedp.Action[chromedp.Void] {
@@ -140,15 +156,6 @@ func TestARowsMoreOnATouchScreen(t *testing.T) {
if sizes != "44x44x44" {
t.Fatalf("the ⋯ and a row are %s, want 44x44x44", sizes)
}
- drive(t, rig, press(more("p")),
- chromedp.WaitVisible(`[data-row="p"] [mapa-row-menu][open]`))
- short := evaluate(t, rig, `Array.prototype.filter.call(
- document.querySelectorAll('[data-row="p"] [estilo-menu-item]'),
- function (el) { return el.getBoundingClientRect().height < 44; })
- .map(function (el) { return el.textContent.trim(); }).join(", ")`)
- if short != "" {
- t.Fatalf("on a touch screen these rows are under 44px: %s", short)
- }
hit := evaluate(t, rig, `(function () {
var r = document.querySelector('[data-row="q"] [mapa-row-more]')
.getBoundingClientRect();
@@ -160,6 +167,14 @@ func TestARowsMoreOnATouchScreen(t *testing.T) {
if hit != "link" {
t.Fatalf("a tap on another row's end lands on %s, not its link", hit)
}
+ drive(t, rig, press(more("p")), chromedp.WaitVisible(panel("p")))
+ short := evaluate(t, rig, `Array.prototype.filter.call(
+ document.querySelectorAll('[data-row="p"] [estilo-menu-item]'),
+ function (el) { return el.getBoundingClientRect().height < 44; })
+ .map(function (el) { return el.textContent.trim(); }).join(", ")`)
+ if short != "" {
+ t.Fatalf("on a touch screen these rows are under 44px: %s", short)
+ }
}
// menuOf is the open or closed menu of the row tagged tag: each row's
@@ -244,17 +259,8 @@ func TestARowsMenuWorksWithScriptsOff(t *testing.T) {
})(document.querySelectorAll("[mapa-side-row]"))`),
openMore("last"),
chromedp.WaitVisible(panel("last")))
- if misses := evaluate(t, rig, `(function () {
- var menu = document.querySelector('[data-row="last"] [estilo-menu]');
- var r = menu.getBoundingClientRect(), misses = [];
- [[r.left + 3, r.top + 3], [r.right - 3, r.top + 3],
- [r.left + 3, r.bottom - 3], [r.right - 3, r.bottom - 3]
- ].forEach(function (p) {
- var hit = document.elementFromPoint(p[0], p[1]);
- if (!hit || !menu.contains(hit)) misses.push(p.map(Math.round).join(","));
- });
- return misses.join(" ");
-})()`); misses != "" {
+ if misses := evaluate(t, rig, fmt.Sprintf(cornersOf,
+ panel("last"))); misses != "" {
t.Fatalf("the last row's menu is covered or cut off at %s", misses)
}
drive(t, rig, markRow("Pinned plan", "p"), openMore("p"),
@@ -284,6 +290,22 @@ func TestARowsMenuWorksWithScriptsOff(t *testing.T) {
}
}
+// The open menu is on top of the page it hangs across: at 900px with
+// the sidebar open, the editor's text starts under it.
+func TestARowsMenuIsOverTheEditor(t *testing.T) {
+ rig, store := browserRig(t, 0, harness.WithHover())
+ notes := writeOwnNotes(t, store)
+ drive(t, rig, scripts(true), sideCookie(rig, "open"),
+ chromedp.EmulateViewport(900, 877),
+ chromedp.Navigate(rig.Origin+notes.team),
+ chromedp.WaitVisible(mounted), markRow("Pinned plan", "p"),
+ openMore("p"))
+ misses := evaluate(t, rig, fmt.Sprintf(cornersOf, panel("p")))
+ if misses != "" {
+ t.Fatalf("the menu is under the page at %s", misses)
+ }
+}
+
// From the keyboard: Enter on the ⋯ opens it with focus on its first
// row, ↓ moves, and Esc closes it with focus back on the ⋯.
func TestARowsMenuTakesFocusAndGivesItBack(t *testing.T) {
@@ -301,6 +323,20 @@ func TestARowsMenuTakesFocusAndGivesItBack(t *testing.T) {
if got := evaluate(t, rig, focused); got != "Pin to sidebar" {
t.Fatalf("↓ focused %q", got)
}
+ drive(t, rig, chromedp.KeyEvent(kb.ArrowUp),
+ chromedp.KeyEvent(kb.ArrowUp))
+ if got := evaluate(t, rig, focused); got != "Delete…" {
+ t.Fatalf("↑ from the first row focused %q, not the last", got)
+ }
+ drive(t, rig, chromedp.KeyEvent(kb.Tab))
+ if evaluate(t, rig, `String(document.querySelector(
+ '[data-row="q"] [mapa-row-menu]').open)`) != "false" {
+ t.Fatal("Tab out of the menu left it open")
+ }
+ drive(t, rig, press(more("q")), chromedp.WaitVisible(panel("q")))
+ eventually(t, "focus back in the menu", func() bool {
+ return evaluate(t, rig, focused) == "Rename…"
+ })
drive(t, rig, chromedp.KeyEvent(kb.Escape))
if got := evaluate(t, rig, focused); got !=
"More actions for Quarterly plan" {
diff --git a/internal/mapatest/title_browser_test.go b/internal/mapatest/title_browser_test.go
index d9d42a0..797e534 100644
--- a/internal/mapatest/title_browser_test.go
+++ b/internal/mapatest/title_browser_test.go
@@ -125,6 +125,13 @@ func TestTitleClickTypeEnterRenamesInPlace(t *testing.T) {
if !strings.HasPrefix(got, want) || !strings.HasSuffix(got, "|true") {
t.Fatalf("after the rename:\n got %s\nwant %s…|true", got, want)
}
+ // The row's ⋯ is renamed with its row (build note 88).
+ more := evaluate(t, rig, `document.querySelector(
+ '[mapa-side] a[mapa-side-page][href="`+mapa.PagePath(page)+
+ `"] + [mapa-row-menu] [mapa-row-more]').getAttribute("aria-label")`)
+ if more != "More actions for Halden Robotics" {
+ t.Fatalf("after the rename the row's ⋯ is %q", more)
+ }
drive(t, rig, chromedp.Click(notice))
eventually(t, "the links updated", func() bool {
return strings.Contains(evaluate(t, rig,