diff --git a/src/api/ai.ts b/src/api/ai.ts index 43be29a..cc473cb 100644 --- a/src/api/ai.ts +++ b/src/api/ai.ts @@ -72,7 +72,7 @@ Respond with ONLY valid JSON matching this exact schema — no markdown, no expl "description": "string (1 sentence explaining the task)", "type": "feature" | "bug" | "task", "priority": "high" | "medium" | "low", - "storyPoints": number (1-13, fibonacci-ish: 1 2 3 5 8 13) + "storyPoints": number (must be one of: 1 2 3 5 8 13 21) } ] }` diff --git a/src/components/dialogs/WorkItemDialog.tsx b/src/components/dialogs/WorkItemDialog.tsx index 9573f7f..d09bc60 100644 --- a/src/components/dialogs/WorkItemDialog.tsx +++ b/src/components/dialogs/WorkItemDialog.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react' import type { WorkItem, Sprint } from '../../types' -import { STATUSES, PRIORITIES, ITEM_TYPES, STATUS_LABELS, PRIORITY_LABELS, TYPE_LABELS } from '../../constants' +import { STATUSES, PRIORITIES, ITEM_TYPES, STATUS_LABELS, PRIORITY_LABELS, TYPE_LABELS, FIBONACCI_POINTS } from '../../constants' interface Props { item?: WorkItem | null @@ -74,16 +74,27 @@ export default function WorkItemDialog({ item, sprints, onSave, onDelete, onClos -
- - + + +
+ Story Points +
+ {FIBONACCI_POINTS.map(pt => ( + + ))} +
@@ -128,3 +139,6 @@ const input: React.CSSProperties = { background: '#0f172a', border: '1px solid # const primaryBtn: React.CSSProperties = { background: '#3b82f6', color: '#fff', border: 'none', borderRadius: 6, padding: '8px 20px', fontSize: 14, fontWeight: 600, cursor: 'pointer' } const ghostBtn: React.CSSProperties = { background: 'none', border: '1px solid #334155', color: '#94a3b8', borderRadius: 6, padding: '8px 20px', fontSize: 14, cursor: 'pointer' } const deleteBtn: React.CSSProperties = { background: 'none', border: '1px solid #7f1d1d', color: '#f87171', borderRadius: 6, padding: '8px 16px', fontSize: 14, cursor: 'pointer' } +const pointsPicker: React.CSSProperties = { display: 'flex', gap: 6 } +const pointsBtn: React.CSSProperties = { flex: 1, background: '#0f172a', border: '1px solid #334155', borderRadius: 6, color: '#64748b', fontSize: 14, fontWeight: 600, padding: '8px 0', cursor: 'pointer' } +const pointsBtnActive: React.CSSProperties = { background: '#1d4ed8', border: '1px solid #3b82f6', color: '#fff' } diff --git a/src/constants.ts b/src/constants.ts index 213631f..4cc46c1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -50,3 +50,4 @@ export const STATUSES: WorkItemStatus[] = ['new', 'active', 'resolved', 'closed export const PRIORITIES: Priority[] = ['high', 'medium', 'low'] export const ITEM_TYPES: WorkItemType[] = ['feature', 'bug', 'task'] export const SPRINT_STATUSES: SprintStatus[] = ['planned', 'active', 'completed'] +export const FIBONACCI_POINTS: number[] = [1, 2, 3, 5, 8, 13, 21]