From 071057189490667f718b125c0ffb51c62011f387 Mon Sep 17 00:00:00 2001 From: ngqile Date: Tue, 1 Dec 2026 19:35:22 +0800 Subject: [PATCH] feat: shell wordmark, accent nav item and styled company picker Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM --- .../changes/add-visual-foundation/tasks.md | 2 +- .../app/components/app/CompanyPicker.tsx | 26 +++++++----- .../app/components/app/Header.tsx | 4 +- .../app/components/app/Sidebar.test.tsx | 40 +++++++++++++++++-- .../app/components/app/Sidebar.tsx | 19 +++++---- .../app/components/ui/badge.tsx | 2 +- .../app/components/ui/card.tsx | 2 +- .../app/components/ui/table.tsx | 2 +- solvway-admin-portal/app/globals.css | 25 ++++-------- .../app/lib/CompanyScope.test.tsx | 35 ++++++++++++---- .../app/tailwind3-classes.test.ts | 1 - 11 files changed, 101 insertions(+), 57 deletions(-) diff --git a/openspec/changes/add-visual-foundation/tasks.md b/openspec/changes/add-visual-foundation/tasks.md index 20d8cca..14186ca 100644 --- a/openspec/changes/add-visual-foundation/tasks.md +++ b/openspec/changes/add-visual-foundation/tasks.md @@ -12,7 +12,7 @@ Serial. One implementer at a time, Opus review gate per task. ## 2. Shell -- [ ] 2.1 Sidebar wordmark (mark plus solid "Co-Lite"; remove `brand-gradient-text` from `globals.css`), cards use the shadow token, active item in the accent, header and page header spacing to the reference sketch; company picker becomes the styled select. +- [x] 2.1 Sidebar wordmark (mark plus solid "Co-Lite"; remove `brand-gradient-text` from `globals.css`), cards use the shadow token, active item in the accent, header and page header spacing to the reference sketch; company picker becomes the styled select. - Depends on: 1.1 - Tests first: sidebar shows "Co-Lite" with no gradient class; only the current nav item is marked active; the company picker opens a menu with "All companies" and each code, and choosing one sets the scope. - Scope: `solvway-admin-portal/app/components/app/**`, `solvway-admin-portal/app/components/ui/**`, `solvway-admin-portal/app/lib/CompanyScope*.tsx`, `solvway-admin-portal/app/globals.css` diff --git a/solvway-admin-portal/app/components/app/CompanyPicker.tsx b/solvway-admin-portal/app/components/app/CompanyPicker.tsx index 96ac7a5..23290e7 100644 --- a/solvway-admin-portal/app/components/app/CompanyPicker.tsx +++ b/solvway-admin-portal/app/components/app/CompanyPicker.tsx @@ -3,6 +3,10 @@ import { useAdminAuth } from "@/app/lib/AdminAuthContext"; import { useCompanyScope } from "@/app/lib/CompanyScope"; import { useT } from "@/app/lib/i18n/MessagesProvider"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/app/components/ui/select"; + +// Radix Select rejects "" as an item value, so "All companies" is this sentinel, mapped to undefined. +const ALL = "all"; // Header company filter; super admins only (staff are always scoped by the server). export default function CompanyPicker() { @@ -11,16 +15,16 @@ export default function CompanyPicker() { const t = useT(); if (!isSuper) return null; return ( - + ); } diff --git a/solvway-admin-portal/app/components/app/Header.tsx b/solvway-admin-portal/app/components/app/Header.tsx index 706f3f9..5a580ec 100644 --- a/solvway-admin-portal/app/components/app/Header.tsx +++ b/solvway-admin-portal/app/components/app/Header.tsx @@ -55,7 +55,7 @@ export default function Header() { const initial = (name ?? "?").slice(0, 1).toUpperCase(); return ( -
+