Phase 3a: shadcn init + Home/Case List view

Initialize shadcn/ui (radix-nova preset) and wire its semantic tokens
to the editorial navy/cream/gold palette so primitives inherit the
judicial voice without per-component overrides.

Replace the Phase 2 live-probe with a real dashboard: KPI tiles,
conic-gradient status donut (ported from the vanilla renderHero),
and a TanStack Table cases list with search + sort. Add useCase(n)
hook with 5s staleTime/refetchInterval to replace the old manual
polling loop when Case Detail ships next.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 16:04:30 +00:00
parent 0ee8e723bd
commit 51064f3a03
25 changed files with 6513 additions and 247 deletions

View File

@@ -806,13 +806,13 @@
"description": "Add npm run api:types script that runs openapi-typescript against FastAPI's /openapi.json -> src/lib/api/types.ts. Build lib/api/client.ts (typed fetch wrapper + TanStack Query client with default retry/staleTime). Create one lib/api/<domain>.ts per endpoint category (cases, upload, compose, training, system), each exporting typed useQuery/useMutation hooks. Build lib/sse.ts as EventSource -> Query cache adapter. Plan: ~/.claude/plans/joyful-marinating-sutton.md.",
"details": "See full plan at ~/.claude/plans/joyful-marinating-sutton.md for architecture, critical files, risks, and open questions. This task is phase 2 of 7 in the legal-ai UI rewrite from vanilla HTML to Next.js 15 + shadcn/ui.",
"testStrategy": "useCases() hook returns typed array from live FastAPI. TypeScript errors if backend endpoint changes without frontend update.",
"status": "in-progress",
"status": "done",
"dependencies": [
"83"
],
"priority": "high",
"subtasks": [],
"updatedAt": "2026-04-11T15:46:39.743Z"
"updatedAt": "2026-04-11T15:51:34.020Z"
},
{
"id": "85",
@@ -820,12 +820,13 @@
"description": "Port the 3 highest-value screens. Use the frontend-design Claude Code skill to generate layout + composition, passing design tokens (navy/gold/parchment, Heebo), editorial voice, and typed API hooks. Use shadcn Card/Badge/Tabs/Sheet/ScrollArea as primitives. Port the custom donut chart into <DonutChart> component. TanStack Query staleTime:5000 for case detail replaces manual 5s polling. Plan: ~/.claude/plans/joyful-marinating-sutton.md.",
"details": "See full plan at ~/.claude/plans/joyful-marinating-sutton.md for architecture, critical files, risks, and open questions. This task is phase 3 of 7 in the legal-ai UI rewrite from vanilla HTML to Next.js 15 + shadcn/ui.",
"testStrategy": "Users can browse case list, open a case detail, and view the compose screen with live data from FastAPI. All 3 screens visually match the existing legal-ai identity.",
"status": "pending",
"status": "in-progress",
"dependencies": [
"84"
],
"priority": "high",
"subtasks": []
"subtasks": [],
"updatedAt": "2026-04-11T15:55:49.327Z"
},
{
"id": "86",
@@ -882,9 +883,9 @@
],
"metadata": {
"version": "1.0.0",
"lastModified": "2026-04-11T15:46:39.743Z",
"lastModified": "2026-04-11T15:55:49.330Z",
"taskCount": 58,
"completedCount": 50,
"completedCount": 51,
"tags": [
"master"
]