feat(capa): replace the CAPA board with a workspace (TableCard list and status board) with search, filters and saved views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -356,7 +356,7 @@ Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>"
|
||||
|
||||
**Interfaces:**
|
||||
- Consumes: everything exported by `@/lib/capa/list` (Task 1); `TableCard`, `Column`, `Segmented`, `FilterChip`, `Avatar`, `StatusTag`, `PriorityTag` from `@/components/ui/*`.
|
||||
- Produces: `CapaWorkspace({ capas: CapaRow[]; today: string })` and `CapaBoardView({ capas: CapaRow[]; today: string })`.
|
||||
- Produces: `CapaWorkspace({ capas: CapaRow[]; today: string })` and `CapaBoardView({ capas: CapaRow[] })`.
|
||||
|
||||
- [ ] **Step 1: Write the failing test**
|
||||
|
||||
@@ -482,7 +482,7 @@ import { Avatar } from '@/components/ui/avatar'
|
||||
import { PriorityTag, StatusTag } from '@/components/ui/status-tag'
|
||||
import { STATUS_ORDER, type CapaRow } from '@/lib/capa/list'
|
||||
|
||||
export function CapaBoardView({ capas }: { capas: CapaRow[]; today: string }) {
|
||||
export function CapaBoardView({ capas }: { capas: CapaRow[] }) {
|
||||
return (
|
||||
<div className="flex gap-3 overflow-x-auto pb-2">
|
||||
{STATUS_ORDER.map(status => {
|
||||
@@ -526,7 +526,7 @@ export function CapaBoardView({ capas }: { capas: CapaRow[]; today: string }) {
|
||||
}
|
||||
```
|
||||
|
||||
(`today` stays in the props type so the workspace passes one shape to both views; the board does not use it yet. If `tsc` or lint flags it, drop it from both places.)
|
||||
(The board takes only `capas`; it does not need `today`.)
|
||||
|
||||
- [ ] **Step 4: Write `components/capa/capa-workspace.tsx`**
|
||||
|
||||
@@ -692,7 +692,7 @@ export function CapaWorkspace({ capas, today }: { capas: CapaRow[]; today: strin
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
<div className="flex flex-wrap items-center gap-2">{toolbar}</div>
|
||||
<CapaBoardView capas={boardRows} today={today} />
|
||||
<CapaBoardView capas={boardRows} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user