fix(analytics): exclude private Burn content from PostHog - #30
Draft
aviyashchin wants to merge 1 commit into
Draft
aviyashchin wants to merge 1 commit into
aviyashchin wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
CI status at candidate e259f9a: 30 passed, 0 failed, 22 skipped, 3 queued image-build jobs. The web image job requests the existing RunsOn labels The two planted-content regressions, quality checks, Jest, Storybook, CodeQL, and Vercel pass. Live company-provider activation and read-back remain outstanding. Full type-check errors match the unchanged base exactly (587); no unrelated UI changes were introduced. |
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.
Outcome
Before enabling company analytics, keep private chat content out of the existing PostHog SDK. Disable autocapture, replay and automatic page-leave capture. Strip URL query strings/fragments from pageview and initial/referrer properties. Extension chat emits only a context-present boolean, not raw source text.
Tracks #21 (safe UX/MCP monitoring). Reuses the native analytics initialization and event registry. No new SDK, dashboard, UI flow or monitoring framework.
Validation
Focused Jest regression failed before the fix: automatic capture was enabled by default and planted private customer text appeared in the emitted event. After the fix:
Command:
bun run test --runInBand --no-watchman --no-coverage --runTestsByPath src/app/providers.test.tsx.Focused oxlint exited 0 (two existing warnings on the unchanged generic assertion), oxfmt and
git diff --checkpassed.Full
bun run types:checkfails on the base as well as this candidate:Do not treat focused tests as a full build pass. Keep this draft pending CI and deployment/provider read-back. No company PostHog configuration was enabled by this PR.