[Plan Sharing] Map a shared-plan public response
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Create src/lib/sharing/publicPlan.ts with toPublicPlan(row) returning only title, term (from academicPeriod) and crns. Use src/supabase/server.ts as the reference for the row shape, and check that the issues listed under "Before starting" (#803 and #805) are resolved first. Done when the test in src/lib/sharing/publicPlan.test.ts passes for the sample row with private fields, and pnpm test, pnpm lint and pnpm typecheck all succeed.
Written by the indexing model from the issue text.
Description
What to build
Choose exactly which plan fields a shared link may reveal. Return the title, semester and registration numbers, and leave out owner identity and private saved-record information.
Files
src/lib/sharing/publicPlan.ts(new file)- Starting example: src/supabase/server.ts
Code to add or extend:toPublicPlan(row): {title:string;term:number;crns:number[]}.
Steps
- Add toPublicPlan(row) returning {title:
row.title, term:row.academicPeriod, crns:row.crns}. - Return only those three fields. Leave userId, saved-plan ID, shareId, courseIds, pinned and timestamps out.
- Check the exact returned keys using a row with private fields present.
Example
{title:"Sample",academicPeriod:202702,crns:[12345],userId:"private"} → only{title,term,crns}.
Check it works
In src/lib/sharing/publicPlan.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/lib/sharing/publicPlan.test.ts, pnpm lint and pnpm typecheck.
Before starting
- #803 — Add nullable unique shareId to saved plans
- #805 — Record trusted shared-plan lookup and rate-limit evidence
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DevDogsUGA/DogDays
-
map
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DevDogsUGA/DogDays#868 ·
-
map
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DevDogsUGA/DogDays#865 ·
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DevDogsUGA/DogDays#850 ·
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DevDogsUGA/DogDays#842 ·
-
import-export
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DevDogsUGA/DogDays#841 ·
All issues in DevDogsUGA/DogDays
Similar issues
-
ai-driven-qa bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
linagora/twake-contacts-frontend#241 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result countOpen
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ahmedkhaleel2004/gitdiagram#228 ·