Remove the Audience feature (org mass-email + Audience Hub) - #56
Merged
Merged
Conversation
Retire the Audience feature entirely — it collected contact PII (emails, consent, identities) that was unused and an information-handling risk. Deletes all audience code: lib/audience/*, the /audience and /projects/[id]/audience UI, /api/events ingest, /api/audience/export, the GitHub installer + create-audience-pr route, the org-unsubscribe route, audience tests, and docs/audience-hub.md. Surgically strips audience from shared, still-live code while keeping core analytics intact: - stats.js + /api/track: drop identify/consent/lead-capture; pageview and behavioral-event stats still work, window.crawlproof is track-only - dashboard: remove DataSources + Mass-email panels (org viewer role and Team-members panel kept) - actions/orgs.ts: remove org-audience actions (outreach sender config kept) - lib/marketing.ts: drop orphaned unsubscribeOrgAudienceByToken Adds migration 20260618120000_drop_audience.sql to DROP all 9 audience tables CASCADE (apply with `supabase db push` to delete the data). typecheck clean; 318 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
Retire the Audience feature entirely — it collected contact PII (emails, consent, identities) that was unused and an information-handling risk.
Deleted outright (~4,200 lines)
lib/audience/*, the/audienceand/projects/[id]/audienceUI/api/eventsingest,/api/audience/exportinstall-audienceinstaller +create-audience-prroutedocs/audience-hub.mdSurgical edits (live features kept intact)
/api/track: stripped identity/consent/lead-capture (the PII-collection path). Pageview + behavioral-event stats still work;window.crawlproofis now track-only.actions/orgs.ts: removed org-audience actions; outreach sender config kept (still used byrecent-outreach.ts).lib/marketing.ts: dropped orphanedunsubscribeOrgAudienceByToken; global/unsubscribe/[token]untouched.Database
Adds
20260618120000_drop_audience.sqlwhich DROPs all 9 audience tables CASCADE.npx supabase db pushafter merge to delete the existing contact data.Verification
npm run typecheckcleannpm test— 318 passed, 7 skipped🤖 Generated with Claude Code