The in-page title renames in place, with the header, through one pending state
On a team page the editor mounts on, the H1's text is editable in
place (editor/title.mjs): click, tap or Tab to it, type, Enter or blur
renames through POST /p/{id}/rename as JSON; Esc reverts; an empty or
unchanged title sends nothing. The header's title field goes through
the same Renamer, so while one rename is out both show the title on
its way, held 650ms by the busy rule, and neither can send another.
When it lands the header, the H1, the tab's title, the sidebar entry,
the kicker's old titles and the editor's name follow with no reload,
and the page offers Update links with the confirm page's count,
posting /p/{id}/links. Refusals are said beside the H1 and keep what
was typed. The saver's base follows a rename made over it.
The text is a span with role textbox, named "Title, renames the
page", inside the heading, so the heading keeps the title as its name.
contenteditable="true", not plaintext-only, which Chromium forces to
pre-wrap and so changes a wrapped title's box at mount.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+527
−33
editor/page.mjs+16 −1editor/saver.mjs+10 −0editor/title.mjs+326 −0editor/title.test.mjs+112 −0internal/mapa/static/{editor.1969c5f18c953d0a.js => editor.ac16df7e5105d46b.js}+32 −32internal/mapa/static/mapa.css+31 −0
editor/page.mjsLoading diff…
editor/saver.mjsLoading diff…
editor/title.mjsLoading diff…
editor/title.test.mjsLoading diff…
internal/mapa/static/{editor.1969c5f18c953d0a.js => editor.ac16df7e5105d46b.js}Loading diff…
internal/mapa/static/mapa.cssLoading diff…