Repository navigation
docs(campaigns): sync CHANGELOG/README for #250-#253 wave and fix 2 P3 review nits - #300
Conversation
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
PO acceptance: merge at 840858b Verified on GitHub:
|
Synchronizes
CHANGELOG.mdandREADME.mdwith the newly mergeddev/ Beta Campaigns wave (#250–#253, DB prerequisites#261–#264, and#292) and resolves 2 minor P3 review nits with unit test coverage.Refs #299
Summary
CHANGELOG.md:### Design system and screens: added entries for#253 / #298(co-organizers),#251 / #297(public organizer profile/u/[handle]&/meeditor),#250 / #296(campaign comments & comment report queue), and#252 / #295(organizer analytics &Thống kêtab).### Platform: added#292 / #293(CC-PO v2.18.0 parallel PO configuration).### Database (DOS.Me): added#264 / DOS/DOS.Me#1856(20261129170000_give_campaign_members),#261 / DOS/DOS.Me#1851(20261129160000_give_organizer_public_profile),#262 / DOS/DOS.Me#1853(20261129150000_give_campaign_comments), and#263 / DOS/DOS.Me#1852(20261129120000_give_campaign_analytics).README.md:## Routestable to cover/u/[handle],/me,/invites/[token],/admin/reports/comments,/api/analytics/event, and the expanded/campaigns/[slug],/me/campaigns, and/me/campaigns/[id]surfaces.apps/web/src/lib/analytics.ts+analytics.test.ts: replacedbucket in REFERRER_LABELSwithObject.hasOwn(REFERRER_LABELS, bucket)and added tests for prototype keys ("toString","constructor","__proto__").apps/web/src/lib/campaign-members.ts+campaign-members.test.ts: extendedmemberDisplayNameto neutralize DB's"Organizer"fallback (case-insensitive) alongside"co-organizer"using the existing exportedOWNER_FALLBACK_NAME("Người tổ chức", consistent with the entire Give UI) andCO_ORGANIZER_FALLBACK_NAME("Đồng tổ chức"), with unit tests covering case/whitespace variants andmemberInitial.Verification
pnpm format:check— PASSpnpm lint— PASSpnpm typecheck— PASSvitest run(analytics.test.ts,campaign-members.test.ts,CampaignTeam.test.ts,invites/[token]/page.test.ts) — 4/4 files, 52/52 tests PASSpnpm build— PASS📌 TL;DR
This PR introduces a comprehensive set of new features including co-organizer management, public organizer profiles, campaign comments with moderation, and privacy-safe analytics. It also includes a critical security fix to prevent prototype pollution in the analytics referrer label lookup.
🎯 Type of Change
🔍 Changes Walkthrough
CHANGELOG.mdREADME.md/u/[handle],/me,/invites/[token],/admin/reports/comments,/api/analytics/event) and updates descriptions for existing routes to reflect new capabilities (e.g., comments on public pages, co-organizer access).apps/web/src/lib/analytics.tsinoperator withObject.hasOwn()inreferrerLabelto prevent prototype pollution attacks (e.g.,__proto__,constructor) when looking up referrer buckets.apps/web/src/lib/analytics.test.tsreferrerLabelsafely handles prototype pollution keys liketoString,constructor, and__proto__by returning the default "other" label.apps/web/src/lib/campaign-members.tsmemberDisplayNameto handle the new database fallback value'Organizer'(in addition to'Co-organizer') for deleted/inactive accounts, ensuring zero PII leaks and correct role-based fallback names.apps/web/src/lib/campaign-members.test.tsmemberDisplayNameandmemberInitialcorrectly handle the new'Organizer'fallback string for both owner and editor roles.📊 Architectural Flow
flowchart TD subgraph "Frontend (Next.js)" A[Public Campaign Page<br>/campaigns/slug] --> B[CampaignComments] A --> C[CampaignTeam] A --> D[CampaignViewBeacon] E[Organizer Dashboard<br>/me/campaigns/id] --> F[AnalyticsTab] E --> G[TeamTab] H[Invite Page<br>/invites/token] --> I[Accept Invite] J[Profile Page<br>/u/handle] --> K[Public Organizer Profile] end subgraph "API / Server Actions" D -->|POST /api/analytics/event| L[Analytics Ingestion] L --> M{Bot Filter &<br>Rate Limit} M -->|Valid| N[dbService.rpc<br>record_campaign_event] B -->|dbAs token| O[Comment RPCs] G -->|dbAs token| P[Member RPCs] I -->|dbAs token| Q[Invite RPCs] F -->|dbAs token| R[Analytics RPCs] K -->|dbAs anonymous| S[Public Profile RPCs] end subgraph "Database (PostgreSQL)" N --> T[(give.campaign_daily_analytics)] O --> U[(give.campaign_comments)] P --> V[(give.campaign_members)] Q --> W[(give.campaign_member_invites)] R --> T S --> X[(give.organizers)] end