Skip to content

Remove the Audience feature (org mass-email + Audience Hub) - #56

Merged
ralyodio merged 1 commit into
masterfrom
chore/remove-audience
Jun 18, 2026
Merged

ralyodio merged 1 commit into
masterfrom
chore/remove-audience

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

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 /audience and /projects/[id]/audience UI
  • /api/events ingest, /api/audience/export
  • GitHub install-audience installer + create-audience-pr route
  • org-unsubscribe route, audience tests, docs/audience-hub.md

Surgical edits (live features kept intact)

  • stats.js + /api/track: stripped identity/consent/lead-capture (the PII-collection path). Pageview + behavioral-event stats still work; window.crawlproof is now track-only.
  • dashboard: removed DataSources + Mass-email panels. Kept org read-only "viewer" role + Team-members panel.
  • actions/orgs.ts: removed org-audience actions; outreach sender config kept (still used by recent-outreach.ts).
  • lib/marketing.ts: dropped orphaned unsubscribeOrgAudienceByToken; global /unsubscribe/[token] untouched.

Database

Adds 20260618120000_drop_audience.sql which DROPs all 9 audience tables CASCADE.

⚠️ Not yet applied to prod — run npx supabase db push after merge to delete the existing contact data.

Verification

  • npm run typecheck clean
  • npm test — 318 passed, 7 skipped

🤖 Generated with Claude Code

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>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit 18d5bac into master Jun 18, 2026
8 checks passed
@ralyodio
ralyodio deleted the chore/remove-audience branch June 18, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant