diff --git a/docs/superpowers/plans/2026-06-17-admin-redesign-checklist.md b/docs/superpowers/plans/2026-06-17-admin-redesign-checklist.md index 67c35db..4c359ea 100644 --- a/docs/superpowers/plans/2026-06-17-admin-redesign-checklist.md +++ b/docs/superpowers/plans/2026-06-17-admin-redesign-checklist.md @@ -41,9 +41,9 @@ git branch -D design/ui-revamp-2026-06 # delete the branch | Done | Task | Files | Notes | Commit | |---|---|---|---|---| -| [ ] | Replace `--admin-*` color tokens in admin-design-system.css | `src/styles/admin-design-system.css` | use spec §3 table. Drop the muddy `aba278` warning, the purple stat icons, the blue stat icons. | `style(admin): unify color tokens` | -| [ ] | Update `globals.css` if any admin colors live there | `src/app/globals.css` | grep for `admin-accent`, `admin-bg` | (same commit) | -| [ ] | Remove inline `#fef3c7` / `#dbeafe` / `#f3e8ff` from stat cards in DashboardClient | `src/components/admin/DashboardClient.tsx` | semantic colors only | `style(admin): semantic stat colors` | +| [x] | Replace `--admin-*` color tokens in admin-design-system.css | `src/styles/admin-design-system.css` | use spec §3 table. Drop the muddy `aba278` warning, the purple stat icons, the blue stat icons. | `style(admin): unify color tokens` (18fb44e) | +| [x] | Update `globals.css` if any admin colors live there | `src/app/globals.css` | grep for `admin-accent`, `admin-bg` | (same commit) | +| [x] | Remove inline `#fef3c7` / `#dbeafe` / `#f3e8ff` from stat cards in DashboardClient | `src/components/admin/DashboardClient.tsx` | semantic colors only | (same commit) | ## Phase 2 — Discoverability (sidebar + command palette) diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx index 9b17171..2f8dc52 100644 --- a/src/app/admin/layout.tsx +++ b/src/app/admin/layout.tsx @@ -10,6 +10,8 @@ import { ToastProvider } from "@/components/admin/Toast"; import { ToastContainer } from "@/components/admin/ToastContainer"; import { SmoothViewTransition } from "@/components/transitions/SmoothViewTransition"; import { RouteAnnouncer } from "@/components/transitions/RouteAnnouncer"; +import CommandPalette from "@/components/admin/CommandPalette"; +import { getEnabledAddons } from "@/actions/billing/stripe-portal"; // Admin layout calls getAdminUser() which reads cookies(). Without this, // Next.js tries to prerender the entire /admin/* tree statically and the @@ -99,6 +101,17 @@ export default async function AdminLayout({ children }: { children: React.ReactN console.error("[admin/layout] listBrandsForAdmin failed:", err); } + // Fetch enabled add-ons for the active brand. Used to gate Water Log / + // Route Trace visibility in the sidebar. Empty object = all show. + let enabledAddons: Record = {}; + if (activeBrandId) { + try { + enabledAddons = await getEnabledAddons(activeBrandId); + } catch (err) { + console.error("[admin/layout] getEnabledAddons failed:", err); + } + } + return ( + {/* Cmd+K command palette — mounted globally so any admin page can summon it */} + {/* The main content area swaps on every navigation. Wrapping it in opts the swap into a soft crossfade via the View Transitions API — sidebar and