# 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-state` devtool (the sanctioned dev-only fab/panel already mounted in the shell under `isDevMode()`). - **Reuse the mechanism modules, don't duplicate their source of truth.** `scenario.ts`/`role.ts` gain a `set*` setter + an exported valid-values list; the panel imports them. `debug-state` is added to the `ui→infrastructure` eslint 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 `default` mid-demo. - **Apply by `location.reload()`.** Both values are read per-request in interceptors and gate server-computed decision flags already fetched by eager `httpResource`s — 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`, exported `SCENARIOS`; co-located `scenario.spec.ts`. - `shared/infrastructure/role.ts` — `setRole`, exported `ROLES`. - `shared/ui/debug-state/debug-state.component.ts` — two `