refactor(web): remove the unread playground funnel analytics - #956
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Independent review (read-only, one pass): APPROVEReviewer: separate read-only gate-review agent (did not write the change).
Verified by the reviewer: every |
Removes the browser analytics adapter, the same-origin /api/funnel collector, and every track() call site in the playground controller. Nothing in the repository read the Upstash counters and the campaign enum was still pinned to the 2026-09-07 launch. Server-side observability for pro-monitor, checkout UTM forwarding, and audit receipts are unchanged.
45d2516 to
09f464b
Compare
Summary
Removes the playground's aggregate funnel analytics: the browser adapter (
playground/analytics.js), the same-origin collector/api/funnel(api/funnel.jsandsrc/funnel-analytics.js), and everytrack(...)call site inplayground/chatgpt.js. Nothing in the repository read the Upstash counters, and the campaign enum was still pinned to the 2026-09-07 launch. Policy:docs/WORKFLOW.mdNo Issue: the owner approved this removal in the 2026-09-26 dead-feature sweep.
api/funnel.js,src/funnel-analytics.js,playground/analytics.js,tests/unit/funnel-analytics.test.js,tests/unit/playground-analytics.test.js, and the runbook for the removed measurement,docs/operations/multilingual-funnel-20260907.md.playground/chatgpt.js: removedtrack, the bucket helpers (inputBucket,latencyBucket,scoreBand),rewriteData,failureOutcome, thetelemetryattempt field, theterminalTrackeddedupe,trackInputStarted, and the arrival hook. Rewrite, refine, verify, cancel, retry, result actions, and the pricing and tier controls behave as before.playground/index.htmldrops the analytics script.scripts/dev-server.mjsdrops the/api/funnelroute and the/analytics.jsalias.scripts/check-architecture.mjs,docs/ARCHITECTURE.md,playground/DESIGN.md,playground/README.md, anddocs/operations/README.mdfollow.the playground calls no analytics hook during initialization, input, or a rewrite, failed on the old controller (73 pass / 1 fail) and passes now. The locale test no longer asserts funnel arrivals. The dev-server and deploy-invariant tests drop the endpoint and the script.Scope and risk
/api/funnelendpoint disappears on the next deploy. The CLI, the npm package, and the public HTTP API are unchanged.src/web-observability.js,PATINA_OBSERVABILITY_REST_API_*), checkout UTM forwarding (captureUtm), audit receipts, and rewrite behavior.patina:funnel:v1:*Upstash counters expire on their 35-day TTL; no cleanup is needed.Verification
npm test→ 0 (2111 tests: 2110 pass, 1 skipped, 0 fail)npm run lint→ 0 (architecture: 107 modules, 361 edges, 0 violations)npm run test:browser→ 0 (Playwright playground suite, 9/9; not part of CI)npm run release:check,npm run check:no-private-assets,npm run dogfood,git diff --check→ 0origin/dev9108a63. A later rebase on the Pro-packs PR (feat!: remove Pro pack delivery (patina pack, /api/packs) #953) is expected: both touch neighbouring lines indocs/ARCHITECTURE.mdandscripts/check-architecture.mjs.Release and rollback