Two backlog trees are complete: `docs/project/backlog/` (75 files, every WP done) and `docs/project/refactor-backlog-setup/` (the arc before it). Move both under `docs/project/archive/` with `git mv`, so history stays intact through `git log --follow`. `SHOWCASE-ROADMAP.md` moves with them, because it points at the now-archived backlog README. Add `docs/project/archive/README.md`. It states that these trees are historical and names the two directories that are still live. Repoint every inbound reference named in RD-30's Files table: CLAUDE.md, the root README, both backend READMEs, `LetterHtml.cs`, `a11y.mdx`, the `document-feature` and `new-ssp` skills, and the readable-codebase PLAN, README, and RD-19 ticket. Fix two upward-relative links inside the moved WP files (WP-68, WP-69) that gained a directory level and would otherwise break. Repoint `.prettierignore`'s two agent-prompt exclusions to their new path, so prettier keeps leaving those files' exact wording alone. Mark RD-30 done and check off its acceptance criteria; flip its README row to done. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
WP-33 — In-app dev switchers (scenario + role)
Status: done Phase: 7 — refinements
Why
The two dev-only stand-ins — the async ?scenario= toggle (scenario.interceptor.ts) and the
faked ?role= (role.interceptor.ts) — were driven by hand-editing the URL query string.
Awkward for demos: you had to remember the valid values and retype them. This WP surfaces both
as dropdowns in the existing dev panel so a scenario/role can be flipped with a click.
Decisions (pre-made, don't relitigate)
- No new component/shell wiring. The switchers live inside the existing
debug-statedevtool (the sanctioned dev-only fab/panel already mounted in the shell underisDevMode()). - Reuse the mechanism modules, don't duplicate their source of truth.
scenario.ts/role.tsgain aset*setter + an exported valid-values list; the panel imports them.debug-stateis added to theui→infrastructureeslint exemption (same precedent as its existing cross-context exemption) rather than re-declaring the storage keys / valid lists in the UI. - Scenario becomes tab-sticky (sessionStorage), mirroring role. Without this the switcher
would be near-useless: navigation drops the query param and reverts to
defaultmid-demo. - Apply by
location.reload(). Both values are read per-request in interceptors and gate server-computed decision flags already fetched by eagerhttpResources — a reload is the simplest correct way to re-run them. Acceptable for a dev tool.
Files
shared/infrastructure/scenario.ts— tab-sticky read (mirrors role),setScenario, exportedSCENARIOS; co-locatedscenario.spec.ts.shared/infrastructure/role.ts—setRole, exportedROLES.shared/ui/debug-state/debug-state.component.ts— two<select>s in the panel.eslint.config.mjs— extend the debug-state devtool exemption to the ui→infrastructure rule.
Acceptance criteria
- Dev panel shows role + scenario dropdowns; changing one persists it and reloads.
- Scenario survives navigation within the tab (sticky).
npm run cigreen (lint, tests incl. new scenario spec, localized build).