Summary
Weekly goals with a type: commits should auto-fill their current value from the actual GitHub commit count for that week, instead of requiring manual updates.
What to build
- Add a
type column to the goals Supabase table: commits | prs | manual
- Update
GET /api/goals:
- For goals with
type = commits: fetch commit count for the current week from GitHub and set current dynamically
- For goals with
type = prs: fetch merged PR count for the week
- For
type = manual: leave current as stored
- Update
GoalTracker to show goal type badge next to each goal label
Supabase migration needed
ALTER TABLE goals ADD COLUMN type text NOT NULL DEFAULT 'manual';
Acceptance criteria
Difficulty
Medium — requires DB migration + API logic change.
Summary
Weekly goals with a
type: commitsshould auto-fill theircurrentvalue from the actual GitHub commit count for that week, instead of requiring manual updates.What to build
typecolumn to thegoalsSupabase table:commits | prs | manualGET /api/goals:type = commits: fetch commit count for the current week from GitHub and setcurrentdynamicallytype = prs: fetch merged PR count for the weektype = manual: leavecurrentas storedGoalTrackerto show goal type badge next to each goal labelSupabase migration needed
Acceptance criteria
supabase/migrations/GET /api/goalsreturns correctcurrentfor auto typesPOST /api/goalsaccepts optionaltypefieldDifficulty
Medium — requires DB migration + API logic change.