Sentry wired up, tests everywhere
2026-03-02
Observability and housekeeping
- Integrated Sentry for production error tracking and merged it (PR #315). Wired up client/server/edge, enabled source maps via
withSentryConfig, added a/monitoringtunnel, and routed error boundaries throughcaptureException. - Tightened privacy and noise: scrubbed PII (email, journal content) in
beforeSend/beforeBreadcrumb, disabled locally, and filtered expected 401/403s. Also updated CSPconnect-srcfor Sentry ingest. - Dropped in Dependabot config and CODEOWNERS to keep things tidy.
Testing and hardening
- Big coverage push across the app: added page-level snapshots/action tests for previously untested pages/layouts plus a sweep over settings, integration sub-components, onboarding, journals, middleware, i18n, manifest/robots, and OG image utils. Ended at 123 test files, 848 tests, all green.
- Killed a date-based flake by freezing time in a snapshot test (
vi.useFakeTimers). Also bumped a snapshot for the March 1 → 2 rollover to keep CI calm. - Patched tests for Node 22 by stubbing
localStorage/sessionStorage(fixed token and theme tests). Corrected a few API expectation mismatches in journal tests (DELETE for unpublish, regenerate/status paths). - Fixed a subtle markdown excerpt bug by stripping images before links so images don’t leak into summaries (commit).