Skip to content

feat(app): capture an account_deleted event on deletion completion - #22

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/feathub-add-self-serve-account-deletion-41eeff
Draft

feat(app): capture an account_deleted event on deletion completion#22
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/feathub-add-self-serve-account-deletion-41eeff

Conversation

@posthog

@posthog posthog Bot commented Aug 1, 2026

Copy link
Copy Markdown

Note

Scope is narrower than the report. The report asks to port Postshow's account-deletion flow into a separate hub app, update its PrivacyPage.tsx §10.3, and add a completion event. Two of those three do not apply to this repository — details under Agent context. The one piece that is a genuine, verifiable gap here is the missing completion event, and that is all this PR changes.

What changed

  • Fire track('account_deleted') once when a self-serve account deletion completes, right after the receipt is set, in AccountDeletionSection.
  • Event carries no properties: no email, token, or receipt id — the taxonomy only needs the count of completions.
  • Tests assert the event fires exactly once on success and not on the ownership-blocked failure path.

Why

  • The Postshow app already ships the full self-serve deletion flow wired into /settings, but it emitted no analytics event on completion, so the project's event taxonomy had no account-deletion event at all.
  • Result: real deletion demand can't be measured — the only visibility today is when someone writes in via feedback.
  • This closes that measurability gap, which the report explicitly calls for ("capture an event on completion so we can finally see how often this is used").

Verification

  • pnpm --filter @eventools/postshow test scope: npx vitest run src/components/settings/AccountDeletionSection.test.tsx → 6 passed
  • pnpm type-check → clean
  • pnpm lint → clean (--max-warnings 0)
  • pnpm format:check on changed files → clean
  • pnpm governance:check → passed

Safety and release impact

  • Capture stays consent-gated (track() no-ops unless analytics consent is accepted), identical to every other event in the app. The event fires with the still-authenticated (about-to-be-deleted) user id, before sign-out, which is exactly what's needed to attribute a completion.

  • No behavior change to the deletion itself: re-auth freshness, typed DELETE MY ACCOUNT confirmation, workspace-ownership guard, and downloadable receipt are untouched.

  • Connector access remains read-only unless the user explicitly approves a supported outbound action.

  • Credentials and private source records do not enter model prompts or hosted paths that are not explicitly documented.

  • Local-only and tenant boundaries remain intact.

  • Human approval still gates every outbound action.

  • New dependencies and redistributed assets have compatible licenses and preserved notices. (none)

  • Tests, documentation, and package metadata cover the changed behavior.

  • The change contains no credentials, customer data, generated build output, or unrelated edits.

Agent context

The report describes fixing a hub app; the assigned repository is Postshow, the app the report itself cites as the reference implementation. Mapping the report's three solution items onto this repo:

Report item State in this repo
Port the deletion flow into the hub's personal settings + a hub-side deletion function Not applicable — there is no apps/hub in this repo, and no hub/feathub repo in the org. Postshow already ships the complete flow (re-auth freshness, typed confirmation, ownership guard, downloadable receipt) wired into /settings.
Update PrivacyPage.tsx §10.3 ("contact support / 30 days") to point at the in-app control Already satisfied — Postshow's privacy policy §9 already documents in-app account deletion with support@eventools.io only as a fallback for cases that can't be completed in-product. There is no stale "email support to delete" text to update.
Capture an event on completion Genuine gap — fixed here.

Fabricating an entire hub app has no basis in this codebase, so this PR is scoped to the one change that faithfully applies. No competing open PR, branch, or assigned issue was found for account deletion.


Created with PostHog Desktop from this inbox report.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The self-serve account deletion flow completed without emitting any
analytics event, so the project's event taxonomy had no account-deletion
event at all and real deletion demand could not be measured. Fire
`track('account_deleted')` once, on confirmed completion, after the
receipt is set. No email, token, or receipt id is attached — the taxonomy
only needs the count of completions, and capture stays consent-gated like
every other event in the app.

Generated-By: PostHog Code
Task-Id: cf7cff07-af9c-4a84-93be-1832ed8d9e4b
@netlify

netlify Bot commented Aug 1, 2026

Copy link
Copy Markdown

Deploy Preview for postshow ready!

Name Link
🔨 Latest commit 9590130
🔍 Latest deploy log https://app.netlify.com/projects/postshow/deploys/6a6d5bc21f441d00080df2b6
😎 Deploy Preview https://deploy-preview-22--postshow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

0 participants