Repository navigation
privacy(feat): split the consent gate by what each provider stores - #400
Conversation
The gate was all-or-nothing, which cost measurement it did not need to. Vercel Analytics and Speed Insights are cookieless and store no identifier, so they carry no consent requirement — gating them blinded Core Web Vitals on every visitor who had not clicked Accept, for no privacy gain. That is exactly the data this repo's perf guardrails depend on. Two tiers now, split on whether the provider writes to the visitor's device: - Vercel Analytics + Speed Insights mount for everyone. No cookies, no id. - GA4 (own _ga cookies, own auto-collected page views) and PostHog (persists pc_distinct_id) wait for an explicit opt-in, as before. trackEvent mirrors the same split: the Vercel call is unconditional, GA4 and PostHog stay behind analyticsAllowed(). Event names and fields are unchanged and remain the enumerated vocabulary, never free text. Preview routes are untouched — AnalyticsShell still returns null before either tier, so an embedded iframe mounts nothing at all. /privacy now states the split per provider with an "Always on, stores nothing" or "Needs your consent" marker rather than claiming nothing loads until you accept, and contributing.mdx documents the rule for adding a provider: the test is not whether the data feels sensitive, it is whether it writes to the device. Verified: lint clean, tsc clean, 379 int tests, and e2e — consent 9/9 (including a new spec pinning that Web Vitals still measure pre-consent), frontend 50/50 with landing baselines unchanged, a11y 10/10, templates 90/90. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Both axe suites deliberately skip granting consent so the undecided consent banner — sitewide chrome — is held to the same accessibility bar. That only works if axe waits for it, and it wasn't: the banner is client-rendered and lands 100-200ms AFTER document.fonts.ready, which is the point both suites analysed at. Measured per route, it was absent at fonts.ready on /, /components and /templates, and present on a warm /templates/<slug> — so the coverage the comments claimed was really down to how warm the server was, and inconsistent between routes in the same run. Both suites now wait for [data-consent-banner] (the hook consent.e2e.spec.ts already uses) before analysing. The wait doubles as an assertion that the banner is on those routes at all; it passes on every route in both suites, which is what makes the stated scope real rather than incidental. The template preview routes are exempt because AnalyticsShell returns null there, an exemption templates.e2e.spec.ts already pins. No violations surfaced once the banner was reliably in scope, including against the per-provider banner #400 reshaped — but that is now a checked fact rather than a coin toss. Co-authored-by: Claude Opus 5 <[email protected]>
…r adoption, template a11y (#409) Brings main level with dev (137 commits). Headline items: - the component wall no longer crops blocks: per-breakpoint zoom pins the twins' inner layout width at 1280px (#392), and the 640-1023px band gets a 256px frame plus a widened fade (#399). Production was cutting content-quote, content-feature-media and content-feature-split by 88/79/78px on a tablet; measured on the live site, not inferred. Three viewport tests now assert the fit so a curated-at-one-width regression cannot recur silently. - prettier is adopted: config matched to the house style (#402), the tree formatted, and format:check gated in test:release and the CI lint step (#408). - template a11y and layout fixes (#394, #398, #404), consent gate split by provider (#400), axe now waits for the consent banner (#405), CodeQL double-escaping fix (#391). Tree is identical to dev by construction: branched from dev, reparented onto main, so the diff is exactly the main..dev delta with no squash-divergence conflicts.
The consent gate shipped all-or-nothing, which cost measurement it did not need to.
Vercel Analytics and Speed Insights are cookieless — no cookies, no identifier, nothing written to the device. They carry no consent requirement, so gating them blinded Core Web Vitals on every visitor who hadn't clicked Accept, for zero privacy gain. That's the data this repo's own perf guardrails depend on.
Two tiers, split on what the provider writes to the device
_gacookies, auto-collects page viewspc_distinct_idin localStoragetrackEventmirrors the same split — the Vercel call is unconditional, GA4 and PostHog stay behindanalyticsAllowed(). Event names and fields are unchanged and remain the enumerated vocabulary, never free text.Preview routes are untouched.
AnalyticsShellstill returnsnullbefore either tier, so an embedded iframe mounts nothing at all — pinned by the existingtemplates.e2eassertion.Docs corrected, not just extended
/privacyclaimed "nothing on this list loads until you accept," which this change makes false. It now states the split per provider with an "Always on, stores nothing" / "Needs your consent" marker.contributing.mdxdocuments the rule for adding a provider: the test is not whether the data feels sensitive, it's whether it writes to the device.Verification
lint clean ·
tscclean · 379 int tests · e2e: consent 9/9 (including a new spec pinning that Web Vitals still measure before a choice is made), frontend 50/50 with the landing baselines unchanged, a11y 10/10, templates 90/90.No visual re-baselining needed — scripts aren't rendered, and the banner behaviour is unchanged.