Surface newsletter state on /api/auth/me (or self GET /api/people/:slug)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start with specs/api/auth.md#get-apiauthme and specs/screens/account.md, then trace the serializer used by GET /api/auth/me and the self view of GET /api/people/:slug. The change is done when the self response includes newsletter.optedIn and email, matching the documented PersonResponse and the newsletter PATCH response shape.
Written by the indexing model from the issue text.
Description
Follow-up from #38 (authoring-screens).
The Account settings screen has a working newsletter toggle that PATCHes /api/people/:slug/newsletter, but the read side never exposes the current opt-in state to the SPA. GET /api/auth/me returns the public Person shape (no newsletter); the people serializer hides newsletter from non-self callers.
Result: the Account screen defaults to optedIn=false and only reflects the server state after the user toggles once. That's a UX bug — a user who opted-in on a previous session sees a checkbox that lies until they touch it.
Fix
Add newsletter.optedIn (and probably email) to the self-view of GET /api/auth/me (and/or GET /api/people/:slug for self). The PATCH /api/people/:slug/newsletter response already returns the full newsletter shape, so the data is available — the serializer just needs to include it for self.
References
- specs/screens/account.md — Newsletter card spec
- specs/api/auth.md#get-apiauthme — "The PersonResponse for self includes
email(fetched from PrivateProfile) andnewsletterstate." (already in the spec; just unimplemented)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 1
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Contributor guide
No contributing guide indexed for this repository
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 CodeForPhilly/codeforphilly-ng
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
MarkdownEditor toolbar: use Radix Toolbar from radix-ui instead of the hand-rolled roving tabindex Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
All issues in CodeForPhilly/codeforphilly-ng
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·