feat(operator): command palette, impersonation, incident, tweaks (O.8)

- CommandPalette + useCommandPalette: ⌘K opens a search-and-jump panel over
  real tenants/partners + fixture flags + nav + actions. Arrow keys + Enter
  navigate, Escape/backdrop close. Recents are intentionally omitted for now;
  add when there's something to recent over.
- Impersonation stub: useImpersonation + ImpersonationModal + ImpersonationBanner.
  Modal opens from tenant detail and from the palette. Banner stays at the top
  of the shell until exited. No real OBO token is minted — wiring OAuth Token
  Exchange is tracked as a follow-up.
- IncidentModal + useIncidentModal: opened from the Overview and Infrastructure
  incident banners, renders the mock INCIDENT data with metrics, timeline and
  draft composer.
- TweaksPanel + useTweaks: floating bottom-right panel for theme (dark/light),
  density (comfy/compact), env badge (prod/staging/dev). Saved to localStorage.
- Theme/density apply via [data-theme] + [data-density] overrides in
  tokens.css. Topbar env badge now reads from useTweaks instead of a prop.
- Layout wires ⌘K + ⌘[ at the document level and mounts the palette + modals
  + banner + tweaks panel once for all pages.
This commit is contained in:
Ronni Baslund
2026-05-24 08:34:34 +02:00
parent e0ac643e80
commit c71e782dc0
16 changed files with 1162 additions and 30 deletions
+18 -9
View File
@@ -454,16 +454,25 @@ forward as bearer to platform-api.
`components/OpPlaceholder.vue`, `server/api/users/index.get.ts`,
`types/user.ts`.
### O.8 · Interactions
### O.8 · Interactions
- [ ] `CommandPalette.vue` — ⌘K opens, fuzzy search over tenants + partners
+ flags + nav items + actions
- [ ] `ImpersonationModal.vue` — visual stub with reason field, Demo-only
badge, no-op confirm + toast
- [ ] `ImpersonationBanner.vue` — top banner shown when impersonating
- [ ] `IncidentModal.vue` — mock incident render
- [ ] `TweaksPanel.vue` — theme (light/dark), density (comfy/compact),
env (prod/staging/dev cosmetic switch)
- [x] `CommandPalette.vue` + `useCommandPalette` — ⌘K opens, searches real
tenants/partners + mock flags + nav items + actions. Arrow keys + Enter
navigate, Escape/backdrop close.
- [x] `ImpersonationModal.vue` + `useImpersonation` — confirm modal with
reason field, opens from tenant detail (`Impersonate` action) and from
the palette (`Impersonate user…` action). Stub — no real OBO token is
minted. Follow-up to wire OAuth Token Exchange remains.
- [x] `ImpersonationBanner.vue` — full-width red banner at the top of the
shell, persists until `Exit impersonation` is clicked.
- [x] `IncidentModal.vue` + `useIncidentModal` — opens from the Overview and
Infrastructure incident banners, renders mock `INCIDENT` data
(metrics + timeline + draft composer).
- [x] `TweaksPanel.vue` + `useTweaks` — floating bottom-right panel. Theme
(dark/light), density (comfy/compact), env badge (prod/staging/dev).
Choices persist to localStorage, apply via `[data-theme]` / `[data-density]`
overrides in tokens.css.
- [x] Layout wires ⌘K + ⌘[ globally. Topbar reads env from `useTweaks`.
### O.9 · Verification