Smooth nav: prefetch a page or day when the pointer rests on its link
Every shell page names Mapa's speculation ruleset by header (no inline script, so the CSP holds): prefetch, never prerender, links to /p/:page and /d/:day, moderately eager. It replaces rastrillo's default, which selects a sidebar Mapa does not draw. A prefetch is a GET and writes nothing (TestAPrefetchWritesNothing). While the editor holds text that leaving would commit, <html data-mapa-uncommitted> turns the rule off and Chromium evicts what it fetched, so the next page shows the commit. Build note 60; TestHoveringALinkPrefetchesThePage checks both halves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 files changed,
+230
−24
docs/superpowers/specs/2026-11-14-mapa-level-up.md+1 −0editor/page.mjs+17 −2internal/mapa/app.go+1 −0internal/mapa/credits/assets.json+1 −1internal/mapa/shell.go+1 −0internal/mapa/speculation.go+42 −0internal/mapa/speculation.json+1 −0internal/mapa/static/{editor.778d4034d2ac17d8.js => editor.1fe02276881d1b28.js}+21 −21internal/mapatest/prefetch_browser_test.go+77 −0internal/mapatest/speculation_test.go+68 −0
docs/superpowers/specs/2026-11-14-mapa-level-up.mdLoading diff…
editor/page.mjsLoading diff…
internal/mapa/app.goLoading diff…
internal/mapa/credits/assets.jsonLoading diff…
internal/mapa/shell.goLoading diff…
internal/mapa/speculation.goLoading diff…
internal/mapa/speculation.jsonLoading diff…
internal/mapa/static/{editor.778d4034d2ac17d8.js => editor.1fe02276881d1b28.js}Loading diff…
internal/mapatest/prefetch_browser_test.goLoading diff…
internal/mapatest/speculation_test.goLoading diff…