Feat/new web - #7
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 Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe project moves to a Sentry-enabled Next.js structure. It adds reusable UI components, theme support, Sentry example flows, and a GitHub Actions workflow for semver-tagged Vercel production deployments. ChangesSentry-enabled Next.js deployment
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SentryExamplePage
participant Sentry
participant SentryExampleAPI
SentryExamplePage->>Sentry: log page load and check connectivity
SentryExamplePage->>SentryExampleAPI: invoke traced GET request
SentryExampleAPI->>Sentry: log request and throw SentryExampleAPIError
SentryExamplePage->>Sentry: report failed request or frontend error
sequenceDiagram
participant GitHubActions
participant VercelCLI
participant Sentry
GitHubActions->>GitHubActions: validate semver tag and main ancestry
GitHubActions->>VercelCLI: pull production environment
GitHubActions->>Sentry: provide release tag and credentials
GitHubActions->>VercelCLI: build and deploy prebuilt artifact
VercelCLI-->>GitHubActions: return deployment URL
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (1)
sentry.server.config.ts (1)
20-27: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winSet a production telemetry budget instead of full sampling.
All three runtime configurations use a 1.0 trace rate. The server and browser configurations also profile at 1.0. This creates maximum telemetry volume and profiling overhead for production traffic.
sentry.server.config.ts#L20-L27: Set production trace and profile rates from an explicit, lower telemetry budget.sentry.edge.config.ts#L11-L12: Set an Edge trace rate that matches the production telemetry budget.src/instrumentation-client.ts#L24-L30: Set browser trace and profile rates that match the production telemetry budget.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@sentry.server.config.ts` around lines 20 - 27, Replace the production 1.0 trace and profile sampling values in sentry.server.config.ts (lines 20-27) with one explicit lower telemetry budget, and apply that same budget to the Edge trace setting in sentry.edge.config.ts (lines 11-12) and the browser trace/profile settings in src/instrumentation-client.ts (lines 24-30); preserve the existing development behavior unless the shared configuration requires otherwise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-production.yml:
- Around line 27-30: Update the actions/checkout step to set persist-credentials
to false, preventing the GitHub token from being stored in local Git
configuration while preserving the existing full-history checkout behavior.
- Around line 32-38: The “Validate strict semver tag” step uses an incomplete
regex that permits empty dot-separated identifiers and leading-zero numeric
prerelease identifiers. Update its TAG validation pattern to enforce SemVer
rules: require nonempty prerelease/build components and reject numeric
prerelease identifiers beginning with zero, while preserving the existing
vMAJOR.MINOR.PATCH requirement.
- Around line 48-54: Update the production workflow’s “Setup Bun” step to use
Bun version 1.3.14 and replace the oven-sh/setup-bun@v2 tag with its full
immutable commit SHA; update the “Install Vercel CLI” step to install
vercel@58.9.4 instead of the latest release.
In `@package.json`:
- Around line 40-46: Update the package-manager configuration around
trustedDependencies to use a single Bun lifecycle-script policy: remove the
unsupported ignoreScripts array from package.json, and either rely on the
install flag or configure install.ignoreScripts in bunfig.toml. If these
packages must remain blocked, remove sharp and unrs-resolver from
trustedDependencies.
In `@src/app/api/sentry-example-api/route.ts`:
- Around line 11-16: Update the GET function to prevent the intentional Sentry
error from being triggered by unauthenticated production requests. Disable the
route by default when running in production, or gate it behind an authorized
test mechanism, while preserving its current behavior in non-production
environments.
In `@src/app/sentry-example-page/page.tsx`:
- Around line 219-228: Update the .connectivity-error style to remove the fixed
500px width and use a responsive maximum width, allowing the message container
to shrink within narrow viewports while preserving the existing appearance on
wider screens.
- Line 4: Replace the next/head usage in the page component with the App Router
static metadata export, keeping the route as a Server Component. Move any
interactive page content into a separate Client Component and render that
component from the server page.
In `@src/instrumentation-client.ts`:
- Line 22: Update the tracePropagationTargets configuration to include a matcher
for same-origin API routes beginning with /api, such as /^\/api/, while
preserving the existing targets.
---
Nitpick comments:
In `@sentry.server.config.ts`:
- Around line 20-27: Replace the production 1.0 trace and profile sampling
values in sentry.server.config.ts (lines 20-27) with one explicit lower
telemetry budget, and apply that same budget to the Edge trace setting in
sentry.edge.config.ts (lines 11-12) and the browser trace/profile settings in
src/instrumentation-client.ts (lines 24-30); preserve the existing development
behavior unless the shared configuration requires otherwise.
🪄 Autofix
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 Plus
Run ID: 37d2e461-b14c-417b-9838-3e566c01d68d
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.locksrc/app/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (38)
.github/workflows/deploy-production.yml.gitignore.mcp.json.vscode/mcp.jsonAGENTS.mdCLAUDE.md__tests__/home-page.test.tsx__tests__/smoke.test.tsapp/globals.cssapp/layout.tsxapp/page.tsxapp/privacy/page.tsxapp/terms/page.tsxcomponents.jsoncomponents/privacy-policy.tsxcomponents/terms-of-service.tsxjest.setup.tsnext.config.tspackage.jsonsentry.edge.config.tssentry.server.config.tssrc/app/api/sentry-example-api/route.tssrc/app/global-error.tsxsrc/app/globals.csssrc/app/layout.tsxsrc/app/page.tsxsrc/app/sentry-example-page/page.tsxsrc/components/theme-provider.tsxsrc/components/theme-switcher.tsxsrc/components/ui/button.tsxsrc/components/ui/dropdown-menu.tsxsrc/components/ui/input.tsxsrc/instrumentation-client.tssrc/instrumentation.tssrc/lib/utils.tstest/__mocks__/fileMock.tstsconfig.jsonvercel.json
💤 Files with no reviewable changes (11)
- test/mocks/fileMock.ts
- tests/home-page.test.tsx
- app/privacy/page.tsx
- app/terms/page.tsx
- jest.setup.ts
- app/globals.css
- app/page.tsx
- components/privacy-policy.tsx
- app/layout.tsx
- tests/smoke.test.ts
- components/terms-of-service.tsx
Summary by CodeRabbit
New Features
Monitoring
Deployment
Changes