New team page is a popover at the sidebar's foot; AGENTS.md names the level-up's files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Human
Prompt
Phase 1 of the Mapa level-up: New team page (spec section 4.7).
From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.
Summary
The sidebar's New team page opens a small form (a details popover, so it works with scripts off) that posts the existing POST /pages and opens the new page; in the rail it opens to the side. The gate-7 walk's create step now looks for the title field inside main.
4 files changed,
+47
−4
AGENTS.md+10 −2internal/mapa/static/frame.css+27 −0internal/mapa/templates/frame.html+9 −1internal/mapatest/browser_test.go+1 −1
diff --git a/AGENTS.md b/AGENTS.md| index 213f8ec..d54d385 100644 |
| --- a/AGENTS.md |
| +++ b/AGENTS.md |
| @@ -38,8 +38,16 @@ Makefile, estilo's files served straight from the module). |
| - `readrule.go`, `s3.go` — S2's rule and S3's layout, item 6's seams. |
| - `handlers_*.go`, `today.go`, `private.go`, `settings.go`, |
| `render.go`, `shell.go`, `templates/`, `static/` — the screens, and |
| - estilo's files taken straight from the pinned module. `mapa.js` is |
| - the whole script layer. |
| + estilo's files taken straight from the pinned module. |
| + - The level-up's shell (`docs/superpowers/specs/2026-11-14-mapa-level-up.md`): |
| + `frame.go`, `menus.go`, `side.go` and `templates/frame.html` build |
| + estilo's stacked bar, the menus and the sidebar with its rail; |
| + `around.go` (the one scoped accessor every new read path uses), |
| + `mapview.go`, `calendar.go` and `static/links.*` are the Links panel, |
| + its map, the week and the month; `pins.go` and `recent.go` are the |
| + sidebar's own lists; `lastedit.go` is the kicker's "Edited by". |
| + `mapa.js` is the editor's and ⌘K's script layer, `links.js` the |
| + panel's; `frame.css` and `links.css` style them. |
| - `internal/mapatest/` — the gates of spec §11, from the outside. |
| `browser_test.go` is behind the `browser` tag. |
| - `scripts/preview/`, `scripts/mutate/` — `make preview`, `make mutate`. |
diff --git a/internal/mapa/static/frame.css b/internal/mapa/static/frame.css| index 447bdec..4976648 100644 |
| --- a/internal/mapa/static/frame.css |
| +++ b/internal/mapa/static/frame.css |
| @@ -363,6 +363,33 @@ textarea[mapa-editor]:focus { outline: none; box-shadow: none; } |
| [mapa-unsaved] p { margin: 0; flex: 1 1 16rem; } |
| +/* New team page: a popover from the sidebar's foot (§4.7). */ |
| +details[mapa-new-page] { position: relative; } |
| +details[mapa-new-page] > summary { list-style: none; } |
| +details[mapa-new-page] > summary::-webkit-details-marker { display: none; } |
| +form[mapa-new-page-form] { |
| + position: absolute; |
| + z-index: 40; |
| + inset-block-end: calc(100% + 6px); |
| + inset-inline-start: 0; |
| + display: grid; |
| + gap: 8px; |
| + inline-size: 260px; |
| + padding: 12px; |
| + border: 1px solid var(--rst-line); |
| + border-radius: 12px; |
| + background: var(--rst-surface); |
| + box-shadow: 0 18px 40px -16px rgb(23 32 60 / 0.35); |
| +} |
| +form[mapa-new-page-form] label { font-size: 12px; font-weight: 650; color: var(--rst-text-muted); } |
| +form[mapa-new-page-form] p { margin: 0; font-size: 12px; } |
| +@media (min-width: 800px) { |
| + [mapa-app][data-side="rail"] form[mapa-new-page-form] { inset-block-end: 0; inset-inline-start: calc(100% + 10px); } |
| +} |
| +@media (min-width: 800px) and (max-width: 79.99rem) { |
| + [mapa-app]:not([data-side]) form[mapa-new-page-form] { inset-block-end: 0; inset-inline-start: calc(100% + 10px); } |
| +} |
| + |
| /* Below 800px there is no sidebar: its places are rows in estilo's |
| Menu sheet. Last, so it wins over [mapa-side]'s own display. */ |
| @media (max-width: 799.98px) { |
diff --git a/internal/mapa/templates/frame.html b/internal/mapa/templates/frame.html| index 4cbb8aa..e722204 100644 |
| --- a/internal/mapa/templates/frame.html |
| +++ b/internal/mapa/templates/frame.html |
| @@ -133,7 +133,15 @@ |
| {{- range .}}{{template "mapa-side-link" .}}{{end}} |
| {{- end}} |
| <div mapa-side-foot> |
| - <a mapa-side-item href="/new" data-mapa-new-page>{{icon "plus"}}<span mapa-side-label>New team page</span></a> |
| + <details mapa-new-page name="estilo-menus"> |
| + <summary mapa-side-item>{{icon "plus"}}<span mapa-side-label>New team page</span></summary> |
| + <form method="post" action="/pages" mapa-new-page-form> |
| + <label for="mapa-new-title">Title of the new team page</label> |
| + <input rst-input id="mapa-new-title" name="title" required maxlength="120" autocomplete="off"> |
| + <p mapa-meta>Everyone in the team can open it.</p> |
| + <button rst-btn="primary" type="submit">Create page</button> |
| + </form> |
| + </details> |
| <form method="post" action="/view/sidebar" mapa-fold> |
| <input type="hidden" name="return" value="{{.Return}}"> |
| <button mapa-side-item type="submit" name="state" value="rail" mapa-fold-to="rail" data-mapa-command="toggle-sidebar">{{icon "panel-left"}}<span mapa-side-label>Fold sidebar</span><kbd mapa-kbd aria-hidden="true">⌘\</kbd></button> |
diff --git a/internal/mapatest/browser_test.go b/internal/mapatest/browser_test.go| index 798422f..cf5349b 100644 |
| --- a/internal/mapatest/browser_test.go |
| +++ b/internal/mapatest/browser_test.go |
| @@ -149,7 +149,7 @@ func walk(t *testing.T, rig *harness.Rig, store *mapa.Store, live bool) { |
| } else { |
| searchByPage(t, rig) |
| } |
| - rig.Screen(`input[name="title"]`, "create, offered") |
| + rig.Screen(`main input[name="title"]`, "create, offered") |
| drive(t, rig, |
| chromedp.SendKeys("textarea[mapa-editor]", "Acme is a customer."), |
| press(save), |