feat(dev): WP-33 — in-app dev switchers for scenario + role
Surface the ?scenario= and ?role= dev stand-ins as dropdowns in the existing debug-state devtool, so a demo can flip them with a click instead of editing the URL. scenario.ts/role.ts gain set* setters + exported valid-value lists (reused by the panel, no duplicated source of truth); scenario becomes tab-sticky like role so it survives navigation. Applied via location.reload() since both are read per-request in interceptors. Extends the debug-state eslint exemption to the ui→infrastructure rule (same devtool precedent). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -230,7 +230,10 @@ export default [
|
||||
// no-restricted-imports context-direction rules above (last-wins is per rule name).
|
||||
{
|
||||
files: ['src/app/**/ui/**/*.ts', 'src/app/**/layout/**/*.ts'],
|
||||
ignores: ['**/*.stories.ts', '**/*.spec.ts'],
|
||||
// debug-state is the sanctioned devtool (same precedent as the cross-context
|
||||
// exemption above): its WP-33 role/scenario switchers write the infrastructure
|
||||
// dev-mechanism helpers directly. Never a product feature — isDevMode()-gated.
|
||||
ignores: ['**/*.stories.ts', '**/*.spec.ts', 'src/app/shared/ui/debug-state/**'],
|
||||
plugins: { '@typescript-eslint': tseslint.plugin },
|
||||
rules: {
|
||||
'@typescript-eslint/no-restricted-imports': [
|
||||
|
||||
Reference in New Issue
Block a user