Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: |
Ducksss
pushed a commit
that referenced
this pull request
Jul 27, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Ducksss
pushed a commit
that referenced
this pull request
Jul 27, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Ducksss
added a commit
that referenced
this pull request
Jul 27, 2026
…#372) * privacy(feat): gate all third-party analytics behind explicit consent Closes the gap the PR audit left open: GA4, Vercel Analytics/Speed Insights and PostHog all loaded on first paint, so an EU visitor had GA4 cookies set before any interaction. Honouring GPC/DNT (shipped in #352) narrowed that but could not close it, because GA4 was mounted regardless. AnalyticsShell now renders nothing until consent is 'granted'. On a first visit there is no GA4 script, no Vercel bundle, no PostHog beacon and no stored identifier. State lives in src/lib/consent.ts under `pc_consent`; ConsentBanner collects the choice and /privacy documents the stack and can withdraw it. Three things worth calling out: - A browser privacy signal is a decision, not a prompt. GPC (binding under the CCPA) or DNT resolves to 'denied' and the banner never renders. - Withdrawal reloads. Unmounting AnalyticsShell does not unload a third party that is already running — gtag stays initialised on window and keeps collecting — so setConsent reloads on granted -> denied. It also clears pc_distinct_id, so opting out erases the identifier instead of freezing it. This was caught by the e2e spec, not by review. - The banner is fixed-positioned, so it costs no layout shift on the landing page's LCP content. Testing: specs that assert on analytics or capture visual baselines grant consent up-front via tests/e2e/consent.ts, which keeps the banner out of every snapshot — only the two landing baselines changed, and only because /privacy was added to the footer. The axe suites deliberately run without consent, so the banner is held to the same a11y bar as the rest of the site. Verified: lint clean, tsc clean, 341 int tests, and e2e — consent 6/6, a11y 10/10, frontend 39/39, templates 60/60, templates-visual 62/62, components-visual 69/69, blog 5/5, geo 13/13. blog-index visual baselines fail identically on clean origin/dev (stale darwin snapshots, unrelated to this change). Co-Authored-By: Claude Opus 5 <[email protected]> * test(chore): mint Linux visual baselines (frontend) (#373) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * privacy(fix): erase the identifier on a privacy signal and reload other tabs Both found by CodeRabbit on #372 — the first substantive AI review this repo has had on a dev-targeted PR since .coderabbit.yaml listed `dev` as a base branch. resolveConsent() returned 'denied' for a GPC/DNT visitor without clearing a pc_distinct_id that an earlier opt-in may have stored. It was never sent while denied, but it survived to re-link the visitor to their previous identity if they later opted back in. A signal is now treated exactly like an explicit withdrawal. subscribeToConsent() notified React on a cross-tab change but never reloaded. That is the same defect the reload in setConsent exists to prevent, one tab over: a tab that already mounted GA4 keeps gtag initialised on window and keeps collecting, because unmounting AnalyticsShell cannot unload it. A withdrawal elsewhere now tears this tab down too. Both are covered by new specs that fail without the fix: a privacy signal arriving after an opt-in must leave no identifier, and withdrawing in one tab must strip the Google tag from a second tab that already had it. Verified: lint clean, tsc clean, 341 int tests, consent e2e 8/8. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Ducksss
deleted the
visual-baselines/claude-analytics-consent-gate-30250481879
branch
August 3, 2026 08:49
This branch was successfully deployed
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.
Auto-generated by the
visual-baselinesworkflow. Commits the per-platformfrontendsnapshot baselines so the visual-regression suite compares (instead of skipping) on the CI gate.