Status: done (2026-11-23)
Priority: 2
Size: M
Design ref: Claims, ownership and territory (Overlay); none for the switch itself: page only, no design mechanism moves.
Goal: The map bar has one button per overlay (Land L, Bedrock O, Walking time H), each drawn over the others, and no room for more. Give the page one overlay registry and one switch, so that a new overlay is one file and one entry. Page script only: no change under src/sim or to st.
Acceptance criteria:
src/page/overlays.js, in src/page.json before the overlays that register): each overlay registers {id, name, key, icon, group, set(on), refresh(), reset(), layer, keyEl}; page/land, page/ground and page/reach register and keep their drawing unchanged. docs/architecture/modules.md, Adding things, says how to add one.landBtn, groundBtn and reachBtn, ONE button, overlayBtn (aria-expanded, aria-controls), showing the active overlay’s icon (layers with none on), pressed (accent) while one is on. It unfolds a list in a panel above the bar, placed and styled like noticePop (the two never both open): a radiogroup built from the registry, grouped by group, a row per overlay with icon, name and its key in a kbd; the active row checked (accent). A row turns its overlay on, the active row off; the list stays open after a choice and shuts on Escape, on the button or on a press on the map. Arrow keys move between rows; rows at least 44px high on a coarse pointer.SHORTCUTS and aria-keyshortcuts follow. (H stays the eye’s, hide the interface, which already took it before SHORTCUTS: Walking time is J; the digits 1 to 5 are the speeds, so an overlay’s digit is 6 to 9; all work with the list shut.)st); the mural theme styles the button and the list as it does the bar’s buttons and its rows.tests/browser.js or a new tests/browser-overlays.js with its line in tests/suites.js): each overlay on and off through the list and by key, no console error, never two layers visible; node tests/smoke.js passes.src/page/overlays.js is the registry, the button and its list; tests/browser-overlays.js (in tests/suites.js) checks each
registered overlay through the list, by key, [ ] and 0, one layer and one key at a time, and the list on a phone; screenshots outside the repo.layer field joins the registry so that the check can hold that one layer alone is seen. closeNotices also shuts the overlays’ list, so
every place that put away the bell’s list (Esc, hide, choosing, the editor, the minimap shut) puts away both.