/design ships in production, for server administrators only (#952) #953

Merged
claude-bot merged 6 commits from feat/design-admin into main 2026-09-30 08:07:33 +00:00
Collaborator

Closes #952. Lane 0's review needs /design on dev, and dev runs the production image, so the owner chose (2026-09-30) to ship it in production for administrators only.

How it works: /design is always mounted and still lazy (its own 73 kB chunk; the main bundle is unchanged). It's wrapped in components/DesignAccess.jsx:

  • Dev build: open to anyone, as before.
  • Production, while the session check is in flight: the loading screen, so nothing leaks.
  • Production, signed out or not an admin: the app's own NotFound, the same page an unknown address gets, with no redirect and no 403. Nothing hints that the page exists.
  • Production admin: the page. This is the same user.is_admin check that AppFrame and useContents use.

Production safety: DesignReference imports only ui/ pieces, its CSS and the ui/*/states.jsx glob. It has no dev-only fixtures and makes no fetch calls. Its inline styles are within the prod CSP (style-src 'self' 'unsafe-inline').

Tests:

  • DesignAccess.test.jsx, five cases: admin sees the page; non-admin and signed-out get NotFound; loading shows neither; dev-open shows the page even when signed out.
  • The full vitest suite passes (2765), and eslint shows 0 errors.
  • npm run build shows DesignReference as its own chunk.

Docs:

  • ui/README.md;
  • the build plan's §3.5;
  • the page's own header comment.

Changelog: changelog.d/952-design-admin.changed.md.

🤖 Generated with Claude Code

Closes #952. Lane 0's review needs `/design` on dev, and dev runs the production image, so the owner chose (2026-09-30) to ship it in production for administrators only. **How it works:** `/design` is always mounted and still lazy (its own 73 kB chunk; the main bundle is unchanged). It's wrapped in `components/DesignAccess.jsx`: - **Dev build:** open to anyone, as before. - **Production, while the session check is in flight:** the loading screen, so nothing leaks. - **Production, signed out or not an admin:** the app's own `NotFound`, the same page an unknown address gets, with no redirect and no 403. Nothing hints that the page exists. - **Production admin:** the page. This is the same `user.is_admin` check that `AppFrame` and `useContents` use. **Production safety:** `DesignReference` imports only `ui/` pieces, its CSS and the `ui/*/states.jsx` glob. It has no dev-only fixtures and makes no fetch calls. Its inline styles are within the prod CSP (`style-src 'self' 'unsafe-inline'`). **Tests:** - `DesignAccess.test.jsx`, five cases: admin sees the page; non-admin and signed-out get NotFound; loading shows neither; dev-open shows the page even when signed out. - The full vitest suite passes (2765), and eslint shows 0 errors. - `npm run build` shows DesignReference as its own chunk. **Docs:** - `ui/README.md`; - the build plan's §3.5; - the page's own header comment. Changelog: `changelog.d/952-design-admin.changed.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Always lazy-load and mount the route behind DesignAccess: open in dev
builds, admin-only in production, NotFound for everyone else.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs(design): /design is admin-only in production, not dev-only (#952)
All checks were successful
CI / Docker image build (pull_request) Successful in 25s
CI / Bot/backend version sync (pull_request) Successful in 29s
CI / Does this change touch the recording path? (pull_request) Successful in 34s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m4s
CI / Backend lint (ruff) (pull_request) Successful in 1m6s
CI / Feedback site tests (pull_request) Successful in 1m38s
CI / Bot tests and audit (pull_request) Successful in 1m47s
CI / Frontend (shard 2/2) (pull_request) Successful in 5m12s
CI / End-to-end journeys (phone) (pull_request) Successful in 6m22s
CI / Frontend (shard 1/2) (pull_request) Successful in 7m1s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 6m49s
CI / End-to-end journeys (desktop) (pull_request) Successful in 12m57s
CI / Backend migration, tests, and audit (pull_request) Successful in 15m4s
36a982ef9e
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(design): only phone-state boxes scroll sideways, so popovers elsewhere aren't clipped (#952)
Some checks failed
CI / Backend lint (ruff) (pull_request) Successful in 29s
CI / Docker image build (pull_request) Successful in 27s
CI / Does this change touch the recording path? (pull_request) Successful in 27s
CI / Bot/backend version sync (pull_request) Successful in 30s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Feedback site tests (pull_request) Successful in 44s
CI / Bot tests and audit (pull_request) Successful in 1m57s
CI / Frontend (shard 2/2) (pull_request) Failing after 5m42s
CI / Frontend (shard 1/2) (pull_request) Successful in 7m44s
CI / End-to-end journeys (phone) (pull_request) Successful in 7m23s
CI / End-to-end journeys (desktop) (pull_request) Successful in 8m11s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 8m10s
CI / Backend migration, tests, and audit (pull_request) Successful in 16m52s
9213a6a2fc
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/design-admin
Some checks failed
CI / Backend lint (ruff) (pull_request) Successful in 38s
CI / Feedback site tests (pull_request) Successful in 42s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m7s
CI / Bot/backend version sync (pull_request) Successful in 28s
CI / Docker image build (pull_request) Successful in 28s
CI / Does this change touch the recording path? (pull_request) Successful in 34s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 2m5s
CI / Frontend (shard 2/2) (pull_request) Successful in 5m53s
CI / Frontend (shard 1/2) (pull_request) Successful in 7m52s
CI / End-to-end journeys (phone) (pull_request) Successful in 7m54s
CI / End-to-end journeys (desktop) (pull_request) Successful in 8m37s
CI / Backend migration, tests, and audit (pull_request) Successful in 17m44s
CI / End-to-end journeys (keyboard) (pull_request) Has been cancelled
d33ab4c835
Merge origin/main into feat/design-admin; phone-state boxes are the app container and scroll sideways (#952, #960)
All checks were successful
CI / Bot/backend version sync (pull_request) Successful in 36s
CI / Docker image build (pull_request) Successful in 36s
CI / Backend lint (ruff) (pull_request) Successful in 41s
CI / Does this change touch the recording path? (pull_request) Successful in 34s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Feedback site tests (pull_request) Successful in 57s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m28s
CI / Bot tests and audit (pull_request) Successful in 4m35s
CI / Frontend (shard 2/2) (pull_request) Successful in 6m7s
CI / End-to-end journeys (phone) (pull_request) Successful in 6m40s
CI / Frontend (shard 1/2) (pull_request) Successful in 7m54s
CI / End-to-end journeys (desktop) (pull_request) Successful in 7m34s
CI / Backend migration, tests, and audit (pull_request) Successful in 16m33s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 17m53s
5c9684c695
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.