feat(app): capture an account_deleted event on deletion completion - #22
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
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
✅ Deploy Preview for postshow ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
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
track('account_deleted')once when a self-serve account deletion completes, right after the receipt is set, inAccountDeletionSection.Why
/settings, but it emitted no analytics event on completion, so the project's event taxonomy had no account-deletion event at all.Verification
pnpm --filter @eventools/postshow testscope:npx vitest run src/components/settings/AccountDeletionSection.test.tsx→ 6 passedpnpm type-check→ cleanpnpm lint→ clean (--max-warnings 0)pnpm format:checkon changed files → cleanpnpm governance:check→ passedSafety and release impact
Capture stays consent-gated (
track()no-ops unless analytics consent isaccepted), 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 ACCOUNTconfirmation, 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:
apps/hubin 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.PrivacyPage.tsx §10.3("contact support / 30 days") to point at the in-app controlsupport@eventools.ioonly as a fallback for cases that can't be completed in-product. There is no stale "email support to delete" text to update.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.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.