feat: add customizable category tags to Goal Tracker (#2647)#3194
Open
aaniya22 wants to merge 1 commit into
Open
feat: add customizable category tags to Goal Tracker (#2647)#3194aaniya22 wants to merge 1 commit into
aaniya22 wants to merge 1 commit into
Conversation
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds customizable category tags (Side Project, Work, DSA, Open Source) to the Goal Tracker widget so users can categorize goals and filter their view by a single tag, as requested in the issue.
Closes #2647
Type of Change
What Changed
supabase/migrations/20260713010000_add_goal_category.sql— adds a nullablecategorycolumn togoals(constrained toside-project,work,dsa,open-source) plus a supporting index; mirrored the same column/index insupabase/schema.sqlfor the canonical schema.src/app/api/goals/route.ts— validatescategoryonPOST /api/goals(falls back tonullfor unrecognized values), persists it on insert, and includes it in thegoal.createdwebhook payload.src/lib/goal-tracker.ts— extendedCreateGoalPayloadwith an optionalcategoryfield and exported aGoalCategorytype.src/components/GoalTracker.tsx:How to Test
supabase/migrations/20260713010000_add_goal_category.sql) against your local/dev Supabase instance.Expected result: Goals can optionally be tagged with one of four categories at creation time, tags render as badges on the goal card, and the filter pills let a user isolate goals by a single tag.
Screenshots / Recordings
Checklist
console.log, debug code, or commented-out blocksnpm run lintpasses locallynpm run type-check)Accessibility (UI changes only)
role="group",aria-label,aria-pressedon filter pills)Additional Context
Category is optional and additive — existing goals without a category continue to work unchanged, and the filter row only appears once at least one goal has a tag, so the UI stays uncluttered for users who don't use this feature. I haven't run
npm run lint/type-checkor added tests locally yet — please run those on your machine before merging, and let me know if you'd like me to add a unit test for the category validation logic in the API route.