Foundation: route, recharts, sprint-dates migration, chart-colors helper (#46)

* feat(ST-1201): add Sprint start_date/end_date + claude_jobs index migration

- Sprint model: optionele start_date en end_date (DATE) voor burndown x-as
- CREATE INDEX claude_jobs(status, finished_at) voor agent-throughput-queries
- Bestaande sprints houden NULL; burndown skipt die

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ST-1202): add lib/chart-colors.ts + vitest coverage

MD3-token-to-CSS-var mappings for STATUS, PRIORITY, VERIFY, JOB_STATUS
and SERIES_COLORS; all 5 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ST-1203): add Insights link to NavBar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ST-1204): move Insights NavBar link between Solo and Todo's

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ST-1205): add sprint start_date/end_date UI + server actions

- createSprintAction + updateSprintDatesAction: Zod date validation
  with end_date >= start_date cross-check
- start-sprint-button: date inputs in create dialog
- sprint-header: date display button + edit dialog with updateSprintDatesAction
- sprint page: select start_date/end_date for SprintHeader prop
- Demo blokkade via bestaande isDemo checks
- 6 tests groen (validation + demo guard)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-02 15:58:15 +02:00 committed by GitHub
parent 55a1ee035c
commit ce94fb48c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 333 additions and 7 deletions

39
lib/chart-colors.ts Normal file
View file

@ -0,0 +1,39 @@
// Mapping van MD3-tokens naar CSS-var-strings voor Recharts fill/stroke.
// Recharts accepteert gewone strings — 'var(--status-done)' werkt direct.
export const STATUS_COLORS = {
TO_DO: 'var(--status-todo)',
IN_PROGRESS: 'var(--status-in-progress)',
REVIEW: 'var(--status-in-progress)',
DONE: 'var(--status-done)',
} as const
export const PRIORITY_COLORS = {
1: 'var(--priority-critical)',
2: 'var(--priority-high)',
3: 'var(--priority-medium)',
4: 'var(--priority-low)',
} as const
export const VERIFY_COLORS = {
ALIGNED: 'var(--status-done)',
PARTIAL: 'var(--priority-medium)',
EMPTY: 'var(--priority-critical)',
DIVERGENT: 'var(--priority-high)',
} as const
export const JOB_STATUS_COLORS = {
queued: 'var(--muted-foreground)',
claimed: 'var(--status-in-progress)',
running: 'var(--status-in-progress)',
done: 'var(--status-done)',
failed: 'var(--priority-critical)',
cancelled: 'var(--muted-foreground)',
} as const
export const SERIES_COLORS = [
'var(--chart-1)',
'var(--chart-2)',
'var(--chart-3)',
'var(--chart-4)',
'var(--chart-5)',
] as const