Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughCentralizes Sentry configuration into a shared options module, refactors client/edge/server init to use it, always captures exceptions in error pages, removes Sentry build-time args from the Dockerfile, adds wallet lifecycle Sentry tracking, enables Sentry tunnel routing, and documents Sentry setup in README. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant NextServer as Next.js Server
participant Edge as Edge Runtime
participant Sentry
Client->>NextServer: app requests / (includes Sentry init using sharedOptions)
Note over Client,NextServer: client uses getSentryBaseOptions('client') and replay rates
NextServer->>Edge: server/edge inits call getSentryBaseOptions('server'/'edge')
NextServer->>Sentry: send errors/traces via tunnelRoute (/monitoring)
Client->>Sentry: browser events (DSN configured via shared options)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Comment |
|
✅ All snapshot tests passed |
Playwright test resultsDetails
Flaky testschromium › landingPage.spec.ts › Landing page and navigation › Should navigate to the homepage and change tabs (Qase ID: 2) Skipped testschromium › themeManipulation.spec.ts › Switch between dark and light theme and check the background color › Partner theme should appear in theme menu and apply background color (Qase ID: 49) |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@new-types.d.ts`:
- Around line 12-21: The ProcessEnv type currently marks environmental keys like
SENTRY_SPOTLIGHT, NEXT_PUBLIC_SENTRY_DSN, SENTRY_TRACES_SAMPLE,
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE, NEXT_PUBLIC_SENTRY_REPLAY_SESSION,
NEXT_PUBLIC_SENTRY_REPLAY_ON_ERROR, NEXT_PUBLIC_SENTRY_ENABLE_LOGS,
NEXT_PUBLIC_SENTRY_CONSOLE, STORYBOOK and NEXT_PUBLIC_STORYBOOK as required
strings; change their declarations in the ProcessEnv augmentation so they are
optional (e.g., SENTRY_SPOTLIGHT?: string or string | undefined) to match
runtime code that treats them as possibly absent and uses fallbacks—update the
type definitions around ProcessEnv to reflect optionality for those specific
symbols.
In `@src/providers/WalletProvider/WalletProvider.tsx`:
- Around line 115-117: Update handleWalletDisconnected to also clear the wallet
chain tags so Sentry doesn't retain stale context: after calling setUser(null)
invoke Sentry.setTag for the tags named "wallet.chainType" and "wallet.chainId"
(or otherwise set the local wallet state fields wallet.chainType and
wallet.chainId to undefined) rather than using sentinel values, ensuring both
Sentry tags and any wallet state are cleared on disconnect.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 372f2288-ed6b-477a-93cf-b4a5f6d64ded
📒 Files selected for processing (13)
DockerfileREADME.mdinstrumentation-client.tsnew-types.d.tsnext.config.mjspackage.jsonsentry.edge.config.tssentry.server.config.tssrc/app/[lng]/error.tsxsrc/app/global-error.tsxsrc/config/env-config.tssrc/providers/WalletProvider/WalletProvider.tsxsrc/sentry/sharedOptions.ts
💤 Files with no reviewable changes (1)
- package.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
chmanie
left a comment
There was a problem hiding this comment.
Seems good, let's try this one! Few tiny comments only!
| reset: () => void; | ||
| }) { | ||
| useEffect(() => { | ||
| if (isProduction) { |
There was a problem hiding this comment.
Does this mean we also capture on develop and staging as well?
| process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? '', | ||
| NEXT_PUBLIC_NOTIFICATIONS_URL: | ||
| process.env.NEXT_PUBLIC_NOTIFICATIONS_URL ?? '', | ||
| NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN ?? '', |
There was a problem hiding this comment.
Yes, that's origin blocked and the common way of setting it up
There was a problem hiding this comment.
Is this really shared? I want to prepare a package that we can share between the backend and the notification system. I am expecting to also integrate Sentry there as well at some point. Maybe we can move that file there as well?
| const isClient = runtime === 'client'; | ||
| const tracesSampleRate = getTracesSampleRate(isClient, prod); | ||
|
|
||
| const enableLogs = prod |
|
|
||
| // Setting this option to true will print useful information to the console while you're setting up Sentry. | ||
| debug: !isProduction, | ||
| init({ |
There was a problem hiding this comment.
🤔 Hmm, can't this just be init(base)? Or is init modifying the base object?
Which Jira task belongs to this PR?
Why did I implement it this way?
Checklist before requesting a review
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores