Repository navigation
feat(frontend): Sentry React SDK + Router v7 tracing + replay - #876
Conversation
PR D of the observability rollout. Adds browser-side error reporting + performance tracing to the dashboard SPA, completing the data-layer coverage across bot (#873), backend (#875), and frontend. What - Sentry.init on app boot via initSentry() called from main.tsx before React mounts so early errors are captured - reactRouterV7BrowserTracingIntegration wired to react-router-dom v7 so route changes become Sentry transactions (LCP, CLS, INP, INP attribution captured automatically per transaction) - replayIntegration: 10% of sessions, 100% of error sessions Configuration (all VITE_ env vars, all optional) - VITE_SENTRY_DSN: enables Sentry. Missing → initSentry is a no-op (dev, preview, self-hosted without telemetry) - VITE_SENTRY_ENVIRONMENT: defaults to import.meta.env.MODE - VITE_SENTRY_RELEASE: defaults to VITE_COMMIT_SHA - VITE_SENTRY_TRACES_SAMPLE_RATE (default 0.1) - VITE_SENTRY_REPLAYS_SESSION_SAMPLE_RATE (default 0.1) - VITE_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE (default 1.0) Helper - captureFrontendException(err, context?) for catch-block reporting where the existing UI already surfaces the error state Tests - sentry.test.ts (7 cases): no-op without DSN, init shape with DSN + env + release, integrations wired, custom + default sample rates, captureFrontendException with and without context Out of scope - Source maps upload (config via @sentry/vite-plugin) — wire in PR E once release pipeline is firmed up - Web Vitals collection beyond what browserTracingIntegration already records (web-vitals package not added — Sentry already captures the core vitals on the first navigation transaction)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR introduces frontend error tracking via Sentry. It adds the ChangesFrontend Sentry Error Tracking
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/frontend/src/lib/sentry.test.tsOops! Something went wrong! :( ESLint: 10.2.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'eslint-plugin-react-hooks' imported from /packages/frontend/eslint.config.js packages/frontend/src/lib/sentry.tsOops! Something went wrong! :( ESLint: 10.2.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'eslint-plugin-react-hooks' imported from /packages/frontend/eslint.config.js packages/frontend/src/main.tsxOops! Something went wrong! :( ESLint: 10.2.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'eslint-plugin-react-hooks' imported from /packages/frontend/eslint.config.js 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 |
|
Failed to generate code suggestions for PR |
) ## Summary Fixes #874 by: 1. **Bumping the pinned ref of the org reusable \`quality.yml\`** to the merge commit of [LucasSantana-Dev/.github#2](LucasSantana-Dev/.github#2). That PR adds \`GITHUB_TOKEN\` + \`YOUTUBE_DL_SKIP_DOWNLOAD=true\` to the install step in the \`lint\` and \`deadcode\` jobs, eliminating the 60 req/hr unauthenticated cap that's been failing PRs since the observability rollout started. 2. **Applying the same env vars to local \`release.yml\`** for parity. Release builds don't strictly need the yt-dlp binary, so skipping the fetch is harmless. ## Why this scope | Workflow | npm ci flags | Status | |---|---|---| | \`ci.yml\` | \`--legacy-peer-deps --ignore-scripts\` | already safe | | \`sonarcloud.yml\` | \`--legacy-peer-deps --ignore-scripts\` | already safe | | \`bundle-size.yml\` | runs postinstall | already sets both env vars | | \`release.yml\` | bare \`npm ci\` | **fixed here** | | reusable \`quality.yml\` | runs postinstall | **fixed via SHA bump** | ## Closes - #874 ## Unblocks - PR #873 (bot observability metrics) - PR #875 (backend observability) - PR #876 (frontend Sentry) - PR #877 (paired Lucky-side network for homelab #135) ## Test plan - [ ] \`quality / Lint\` passes on this PR's first run - [ ] After merge: re-run failed \`quality / Lint\` on #873 / #875 / #876 — they should pass without retry
There was a problem hiding this comment.
LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
vi.fn() with no args defaults to a zero-arg signature; the forwarding wrappers in vi.mock spread `...args: unknown[]` into the mocks, which TS2556's because the inferred parameter list doesn't accept rest args. Widen each mock to `(...args: unknown[]) => unknown` so the forwarders typecheck without changing runtime behavior. Caught by quality / Lint + compressed-size + Vercel — all three share the same root cause (tsc failure cascades into build).
There was a problem hiding this comment.
LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Size Change: 0 B Total Size: 422 kB ℹ️ View Unchanged
|
|
## Summary Cut v2.13.0 of Lucky. Bumps root + 4 workspaces from `2.11.0` → `2.13.0` (skipping the archived `2.12.0`) and promotes the CHANGELOG `[Unreleased]` block to `[2.13.0] - 2026-05-21`. ## Headline changes since v2.11.0 **Added** - Guild Automation Module Executor seam + AutoMessages pilot (#901) - Sentry React SDK + Router v7 tracing/replay on frontend (#876) - Prometheus `/metrics` on backend (#875) + bot (#873) - Guild join/leave history tracking (#872) - Trivy image-scan on docker-publish, Phase A audit-only (#883) - Self-hosted developer-tooling register on landing page (#868) **Changed** - Backend migrated to Zod 4 API (#919) — unblocked the CVE patch + ended the lockfile fragility loop - 3 bot circular-deps clusters broken (#885, #886, #888) **Fixed** - brace-expansion DoS + ws uninit-memory CVEs patched (#921) - nginx-alpine CVEs (#881) - CI postinstall rate limit + madge actionlint (#878, #905) Full list in CHANGELOG.md. ## Next steps (after this PR merges) 1. Open `release/v2.13.0 → main` PR with merge-commit method 2. Tag `v2.13.0` on the merge commit 3. Cut next `release` (homelab-style bare branch) — Lucky's bare-release migration is still pending the user removing protection on `release/v2.11.0`
## Release v2.13.0 Promotes \`release/v2.13.0\` to \`main\` for the v2.13.0 cut. **$AHEAD commits across all merged PRs since v2.11.0 ship.** (Skipping v2.12.0 — the branch existed but its work was rolled forward into v2.13.0 alongside this session's Zod migration + CVE patches + standards adoption.) ## Headline changes **Added** — Guild Automation Module Executor pilot (#901), Sentry frontend (#876), Prometheus metrics on bot+backend (#873, #875), guild membership history (#872), Trivy image-scan Phase A (#883), landing redesign (#868). **Changed** — Backend migrated to Zod 4 API (#919), 3 bot circular-deps clusters broken (#885/#886/#888). **Fixed** — brace-expansion + ws moderate CVEs (#921), nginx-alpine CVEs (#881), CI postinstall rate limit (#878), madge actionlint (#905). **Internal** — shared coverageThreshold gate (#909/#914), Feature-removal sweep checklist + dangerfile guard (#908/#913), monitoring network, AI-doc policy, 4 new ADRs. Full list in [CHANGELOG.md](./CHANGELOG.md). ## Merge method This PR should land via **merge commit** (NOT squash) to preserve the individual PR SHAs in main's history. After merge: 1. Tag \`v2.13.0\` on the merge commit 2. Create GitHub release with notes from CHANGELOG.md 3. Fast-forward \`release/v2.13.0\` to match the new main HEAD ## Test plan - [ ] All 30 checks green except infra (snyk plan cap) - [ ] Verify \`gh pr view 922 --json mergeCommit\` shows the chore-bump commit on release tip - [ ] After merge: confirm \`origin/main\` contains the full $AHEAD commits



Summary
PR D of the observability rollout. Adds browser-side error reporting + performance tracing to the dashboard SPA, completing the data-layer coverage across bot (#873), backend (#875), and frontend.
What
Sentry.initon app boot viainitSentry()called frommain.tsxbefore React mounts so early errors are capturedreactRouterV7BrowserTracingIntegrationwired toreact-router-domv7 so route changes become Sentry transactions; LCP / CLS / INP captured automatically per transactionreplayIntegration: 10% of sessions, 100% of sessions that hit an errorcaptureFrontendException(err, context?)helper for catch-block reporting where the existing UI already surfaces the error stateConfiguration
All optional Vite env vars — missing
VITE_SENTRY_DSNmakesinitSentrya no-op (dev / preview / self-hosted without telemetry):VITE_SENTRY_DSNVITE_SENTRY_ENVIRONMENTimport.meta.env.MODEVITE_SENTRY_RELEASEVITE_COMMIT_SHAVITE_SENTRY_TRACES_SAMPLE_RATE0.1VITE_SENTRY_REPLAYS_SESSION_SAMPLE_RATE0.1VITE_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE1.0Test plan
sentry.test.ts(7 cases):Sentry.initshape with DSN + env + releasecaptureFrontendExceptionwith and without extra contextDeployment notes
Known CI hazard
The yt-dlp postinstall flake (#874) may trip the quality / Lint job. Re-run or land #874's fix first.
Out of scope
Summary by CodeRabbit
Release Notes
New Features
Tests