Ben Senescu cdd729ec0d feat: add hosted-only PostHog error tracking (#51)
* refactor: move lighthouse audits to dataforseo (#43)

* refactor: move lighthouse audits to dataforseo

* chore: remove obsolete audit settings modal

* refactor: rename psi flows to lighthouse

* save

* refactor: simplify audit lighthouse storage flow

* fix: separate lighthouse metrics from actionable audits

* refactor: remove redundant audit project inputs

* feat: redesign lighthouse issues screen with score gauges and table layout

Replace flat score cards with circular SVG gauges, condense metrics into
a compact grid, and switch issue list from cards to an expandable table
with fixed column widths.


* test: harden lighthouse regression coverage

* fix: restore project-scoped audit inputs

* refactor: simplify lighthouse payload handling

* refactor: inline lighthouse server handlers

* refactor: share audit workflow types

* refactor: simplify lighthouse payload flows

* save

* refactor: drop project pagespeed api key

* fix: restore lighthouse issues loading with resilient project context

* fix: restore audit issues back navigation

* refactor: simplify project context and lighthouse error handling

* fix: tolerate DataForSEO lighthouse payload drift

* refactor: route audit lighthouse through dataforseo client

---------


* feat: add PostHog error tracking for client and server

Integrate posthog-js and posthog-node to capture unhandled errors in
both the client error boundary and server function middleware, skipping
expected errors like auth and 404s.

* fix: improve PostHog error tracking setup

- Fix captureExceptionImmediate args (pass undefined as distinctId, not request path)
- Rename VITE_POSTHOG_KEY/POSTHOG_KEY to POSTHOG_PUBLIC_KEY (single env var for both client and server)
- Expose POSTHOG_PUBLIC_KEY and POSTHOG_HOST via Vite envPrefix instead of VITE_ prefix
- Enable capture_exceptions in client posthog-js init for error tracking
- Use waitUntil() instead of await for server error capture (non-blocking)
- Add try/catch around client captureException to prevent unhandled rejections

* fix: align PostHog setup with lint rules

* fix: gate PostHog to hosted mode

* docs: remove hosted PostHog README note

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 00:44:14 -04:00
..
2026-03-19 19:24:34 -04:00