[Admin][UI] SPA scaffold — auth gate, shell, navigation
Why
The admin app (from the Infra issue) needs its shell before feature pages land.
Scope
- App shell: 48px header (match console), left/top nav, dark theme, shared design tokens.
- Auth gate: on load call
GET /v1/admin/me; if not admin show a clean "Admin access required" state; if signed out, link to /console/ sign-in. Read session from the same localStorage token the console uses.
- Central
apiFetch wrapper (Bearer token + error handling), mirroring console.
- Nav routes (stubs, filled by later issues): Overview · Users · Agents & Instances · Usage & Spending · Errors & Ops · Moderation.
- Mobile-friendly (the store convention: icon nav, scrollable).
Acceptance criteria
Relevant code
store/admin/ (new app), reference store/console/src/ (apiFetch, nav, header)
References
- FGS
App.tsx router + auth gate; FAS App.tsx.
Part of the PAGS Admin Portal epic. Depends on Infra + Foundation. Blocks the other UI issues.
[Admin][UI] SPA scaffold — auth gate, shell, navigation
Why
The admin app (from the Infra issue) needs its shell before feature pages land.
Scope
GET /v1/admin/me; if not admin show a clean "Admin access required" state; if signed out, link to/console/sign-in. Read session from the samelocalStoragetoken the console uses.apiFetchwrapper (Bearer token + error handling), mirroring console.Acceptance criteria
Relevant code
store/admin/(new app), referencestore/console/src/(apiFetch, nav, header)References
App.tsxrouter + auth gate; FASApp.tsx.Part of the PAGS Admin Portal epic. Depends on Infra + Foundation. Blocks the other UI issues.