Skip to content

docs(campaigns): sync CHANGELOG/README for #250-#253 wave and fix 2 P3 review nits - #300

Merged
JOY (JOY) merged 2 commits into
devfrom
antigravity/299-changelog-p3-cleanup
Nov 22, 2026
Merged

JOY (JOY) merged 2 commits into
devfrom
antigravity/299-changelog-p3-cleanup

Conversation

@JOY

@JOY JOY (JOY) commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Synchronizes CHANGELOG.md and README.md with the newly merged dev / 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] & /me editor), #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).
    • Zero edits to earlier entries.
  • README.md:
    • Updated the ## Routes table 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.
  • P3 review nits & unit tests:
    • apps/web/src/lib/analytics.ts + analytics.test.ts: replaced bucket in REFERRER_LABELS with Object.hasOwn(REFERRER_LABELS, bucket) and added tests for prototype keys ("toString", "constructor", "__proto__").
    • apps/web/src/lib/campaign-members.ts + campaign-members.test.ts: extended memberDisplayName to neutralize DB's "Organizer" fallback (case-insensitive) alongside "co-organizer" using the existing exported OWNER_FALLBACK_NAME ("Người tổ chức", consistent with the entire Give UI) and CO_ORGANIZER_FALLBACK_NAME ("Đồng tổ chức"), with unit tests covering case/whitespace variants and memberInitial.

Verification

  • pnpm format:check — PASS
  • pnpm lint — PASS
  • pnpm typecheck — PASS
  • vitest run (analytics.test.ts, campaign-members.test.ts, CampaignTeam.test.ts, invites/[token]/page.test.ts) — 4/4 files, 52/52 tests PASS
  • pnpm 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

  • 🚀 New feature
  • 🐛 Bugfix
  • 📚 Documentation
  • 🧹 Refactor
  • ⚡ Performance
  • ⚙️ CI / Configuration

🔍 Changes Walkthrough

File Summary of Changes
CHANGELOG.md Documents the new features: co-organizers/invites, public organizer profiles, campaign comments/moderation, and campaign analytics. Also notes the parallel PO configuration update.
README.md Updates the route table to include new endpoints (/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.ts Security Fix: Replaces the in operator with Object.hasOwn() in referrerLabel to prevent prototype pollution attacks (e.g., __proto__, constructor) when looking up referrer buckets.
apps/web/src/lib/analytics.test.ts Adds test cases to verify that referrerLabel safely handles prototype pollution keys like toString, constructor, and __proto__ by returning the default "other" label.
apps/web/src/lib/campaign-members.ts Updates memberDisplayName to 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.ts Adds test cases to verify memberDisplayName and memberInitial correctly 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
Loading

@JOY JOY (JOY) added line:campaigns Product line: campaigns po:agy Owned by Antigravity PO (mutual-exclusion parallel PO label) labels Nov 22, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
give Ready Ready Preview Nov 22, 2026 3:05am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6797fa49-50f1-4368-955e-de9e03d5b5c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

dos[bot]
dos Bot approved these changes Nov 22, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (6 eligible files · 27,388 chars · 1 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 4a07a3d / head d941575.

✅ CLEAN_PASS: Complete diff reviewed

dos[bot]
dos Bot approved these changes Nov 22, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ Code Review completed (6 eligible files · 27,388 chars · 1 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 4a07a3d / head 840858b.

✅ CLEAN_PASS: Complete diff reviewed

@JOY

Copy link
Copy Markdown
Contributor Author

PO acceptance: merge at 840858b

Verified on GitHub:

  • Required checks green: Verify build/Lint, Verify build/Build all apps (plus Vercel preview & DOS Code Review green)
  • mergeStateStatus: CLEAN, 0 unresolved review threads
  • Two independent fresh-context reviews approved at 840858bf1446005b964b07078afca385772319f0 (confirmed OWNER_FALLBACK_NAME = "Người tổ chức" matches Give codebase convention, all CHANGELOG/README citations exact, both P3 fixes tested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

line:campaigns Product line: campaigns po:agy Owned by Antigravity PO (mutual-exclusion parallel PO label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant