| 03-dashboard-intake-ui |
03 |
ui |
| react |
| typescript |
| tanstack-query |
| tanstack-router |
| zustand |
| tailwind |
| clickhouse-design |
| inventory |
|
| web/src/store/ui.ts (useUIStore — viewMode, setViewMode) |
| web/src/components/ui/badge.tsx (Badge with status variants) |
| web/src/components/ui/button.tsx (Button with forest/ghost/outline variants) |
| web/src/components/ui/card.tsx (Card, CardHeader, CardTitle, CardContent, CardFooter) |
| internal/api/handlers.InventoryItemResponse (JSON shape from GET /api/inventory) |
|
| web/src/lib/api.ts (InventoryItem type, fetchInventory, fetchInventoryItem) |
| web/src/hooks/useInventory.ts (useInventory, useInventoryItem TanStack Query hooks) |
| web/src/components/layout/AppShell.tsx (TopBar + main content wrapper) |
| web/src/components/layout/TopBar.tsx (sticky nav with HWLab branding) |
| web/src/components/inventory/StatusBadge.tsx (catalog_status color-coded badge) |
| web/src/components/inventory/ItemCard.tsx (grid card component) |
| web/src/components/inventory/ItemRow.tsx (list-mode row component) |
| web/src/components/inventory/FilterBar.tsx (search + status filter + view toggle) |
| web/src/pages/DashboardPage.tsx (/ route — inventory grid/list) |
| web/src/pages/ItemDetailPage.tsx (/item/$id route — full detail view) |
|
| web/src/router.tsx (indexRoute + itemRoute updated to lazy-load real pages) |
| 03-04, 03-05 (intake + scan pages reuse AppShell and TopBar) |
|
| added |
patterns |
|
|
| TanStack Query useQuery with typed fetchJSON wrapper (no axios) |
| Zustand viewMode persists grid/list toggle across navigation within session |
| lazy() + Suspense for route-level code splitting (DashboardPage + ItemDetailPage split into separate chunks) |
| client-side filter via useMemo — no server-side filtering for <200 items |
| label-upper CSS class applied to uppercase tracked labels |
|
|
| created |
modified |
| web/src/lib/api.ts |
| web/src/hooks/useInventory.ts |
| web/src/components/inventory/StatusBadge.tsx |
| web/src/components/inventory/ItemCard.tsx |
| web/src/components/inventory/ItemRow.tsx |
| web/src/components/layout/TopBar.tsx |
| web/src/components/layout/AppShell.tsx |
| web/src/components/inventory/FilterBar.tsx |
| web/src/pages/DashboardPage.tsx |
| web/src/pages/ItemDetailPage.tsx |
|
|
|
| id |
summary |
| DASH-01 |
lazy() + Suspense for DashboardPage and ItemDetailPage — creates separate JS chunks (9.17KB + 4.10KB) keeping initial bundle lean |
|
| id |
summary |
| DASH-02 |
Client-side filtering via useMemo on items array — acceptable for <=200 item limit from API; no server-side filter params needed |
|
| id |
summary |
| DASH-03 |
fetchJSON generic wraps raw fetch with typed error handling — no axios dependency, consistent with project WHAT NOT TO USE list |
|
|
12min |
2026-04-10 |