docs(website): theming & nav phases 0-2 as built #104

Merged
whitlocktech merged 1 commits from docs/theming-nav-phase-0-2 into edge 2026-08-07 23:25:07 +00:00
Member

What & why

Docs half of the phases 0–2 PR pair. Code: RunicGateway/website#121.

Targets edge — every PR pair in this workstream does, and the feature reaches main as one edgemain merge once all phases are in.

BACKEND_DESIGN.md

  • The new /settings router group in the §2 tree and its own §4 route table, including why it is a fifth group rather than a route on an existing one: /public is anonymous, /admin/settings is adminOnly while AdminLayout renders for editors and moderators, and /player is data scoped to req.user.id.
  • DELETE /admin/settings/:key in the admin route table, with the key allowlist and why reset deletes rather than writes.
  • The five unseeded theming/nav keys under the settings schema section: absence of the row is the "use the default" state, values are TEXT so every consumer parses, and malformed reads as absent on both sides (utils/settingsJson.js server-side, parseLayout and its callers client-side).
  • Route count 215 → 225.

THEMING_AND_NAV.md

  • Phases 0–2 marked landed, plus an "as landed" section recording the three things the design deliberately left open — where /settings/nav lives, where parseJsonSetting lives, and the exact 23-declaration radius promotion (with the note that --shadow-card/--panel-grad were already tokens, so the shadow half was a no-op).
  • §7.1 now documents the merge util's ordering rules as implemented: an untouched item keeps its base-array index as its sort key; an explicit order wins a tie against a coincidental index; equal explicit orders keep code order; group is honored only when it names an existing section; validation is field-by-field so a bad label doesn't discard a good order.
  • The edge-branch workflow for the remaining PR pairs.

api-route-inventory.json

Resynced from server/routes.manifest.json. Picks up the two new routes plus eight that were already missing from this mirror since the Protocol 3.0 cutover — admin/shard/clilocs{,/import,/path}, public/shard/market{,/meta,/vendors/:serial}, public/shard/points{,/:system}. Worth a look: it means the mirror drifted for a whole workstream, so it may be worth a CI check like the one that already freezes routes.manifest.json itself.

How it was tested

Docs only — nothing to build or run. The route inventory was regenerated from the manifest rather than hand-edited, and every claim about the code is from the branch in website#121, where npm test (695 pass) and node --test in the client (67 pass) are green.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Opus 5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.
## What & why Docs half of the phases 0–2 PR pair. Code: RunicGateway/website#121. Targets **`edge`** — every PR pair in this workstream does, and the feature reaches `main` as one `edge` → `main` merge once all phases are in. ### `BACKEND_DESIGN.md` - The new **`/settings` router group** in the §2 tree and its own §4 route table, including *why it is a fifth group* rather than a route on an existing one: `/public` is anonymous, `/admin/settings` is `adminOnly` while `AdminLayout` renders for editors and moderators, and `/player` is data scoped to `req.user.id`. - **`DELETE /admin/settings/:key`** in the admin route table, with the key allowlist and why reset deletes rather than writes. - The **five unseeded theming/nav keys** under the `settings` schema section: absence of the row *is* the "use the default" state, values are `TEXT` so every consumer parses, and malformed reads as absent on both sides (`utils/settingsJson.js` server-side, `parseLayout` and its callers client-side). - Route count 215 → 225. ### `THEMING_AND_NAV.md` - Phases 0–2 marked landed, plus an **"as landed"** section recording the three things the design deliberately left open — where `/settings/nav` lives, where `parseJsonSetting` lives, and the exact 23-declaration radius promotion (with the note that `--shadow-card`/`--panel-grad` were already tokens, so the shadow half was a no-op). - §7.1 now documents the merge util's **ordering rules as implemented**: an untouched item keeps its base-array index as its sort key; an explicit `order` wins a tie against a coincidental index; equal explicit orders keep code order; `group` is honored only when it names an existing section; validation is field-by-field so a bad `label` doesn't discard a good `order`. - The `edge`-branch workflow for the remaining PR pairs. ### `api-route-inventory.json` Resynced from `server/routes.manifest.json`. Picks up the two new routes **plus eight that were already missing from this mirror** since the Protocol 3.0 cutover — `admin/shard/clilocs{,/import,/path}`, `public/shard/market{,/meta,/vendors/:serial}`, `public/shard/points{,/:system}`. Worth a look: it means the mirror drifted for a whole workstream, so it may be worth a CI check like the one that already freezes `routes.manifest.json` itself. ## How it was tested Docs only — nothing to build or run. The route inventory was regenerated from the manifest rather than hand-edited, and every claim about the code is from the branch in website#121, where `npm test` (695 pass) and `node --test` in the client (67 pass) are green. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Opus 5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it.
wtclaude added 1 commit 2026-08-07 23:17:06 +00:00
Matches RunicGateway/website's phases 0-2 of THEMING_AND_NAV.md.

BACKEND_DESIGN.md:
- The new /settings router group and its one route, plus why it is a fifth
  group rather than a route on an existing one.
- DELETE /admin/settings/:key in the admin route table, with the allowlist and
  why reset deletes instead of writing.
- The five unseeded theming/nav keys under the settings schema: absence of the
  row is the "use the default" state, values are TEXT so consumers parse, and
  malformed reads as absent.
- Route count 215 -> 225.

THEMING_AND_NAV.md:
- Phases 0-2 marked landed, with an "as landed" section recording the three
  things the design left open: where /settings/nav lives, where
  parseJsonSetting lives, and the exact 23-declaration radius promotion.
- The nav merge util's ordering rules, settled by the implementation: an
  untouched item keeps its index as its sort key, an explicit order wins a tie
  against a coincidental index, equal explicit orders keep code order, and
  `group` is honored only when it names an existing section.
- All four PR pairs target `edge`; the feature reaches `main` as one merge.

api-route-inventory.json: resynced from server/routes.manifest.json. Picks up
the two new routes plus eight that were already missing from the mirror since
the Protocol 3.0 cutover (shard clilocs, market, points).

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech merged commit 09e6ffd67c into edge 2026-08-07 23:25:07 +00:00
whitlocktech deleted branch docs/theming-nav-phase-0-2 2026-08-07 23:25:08 +00:00
Sign in to join this conversation.
No description provided.