Skip to content

Packages and sentry updates#1623

Merged
prxt6529 merged 12 commits intomainfrom
packages-sentry-updates-01-12
Dec 1, 2025
Merged

Packages and sentry updates#1623
prxt6529 merged 12 commits intomainfrom
packages-sentry-updates-01-12

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented Dec 1, 2025

Summary by CodeRabbit

  • New Features

    • Improved IndexedDB error detection and user-facing messaging; security-probe tagging to reduce telemetry noise; new browser/server Sentry config with filtering hooks.
  • Bug Fixes

    • More reliable push notification initialization tied to the active profile with improved listener, permission, and error handling.
    • Fetch error handling now clears stale data; safer socket listener cleanup.
  • Chores

    • Dependency updates (Lexical, autoprefixer) and added zod-validation-error.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: prxt6529 <prxt@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 1, 2025

Warning

Rate limit exceeded

@prxt6529 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 596f0da and 8fd0b0e.

📒 Files selected for processing (2)
  • config/sentryProbes.ts (1 hunks)
  • sentry.client.config.ts (1 hunks)

Walkthrough

Per-profile, once-only Capacitor push-notification initialization with listeners registered before permission prompts; handle registration/register errors with granular logging; propagate profile to push action handler. Added IndexedDB error detection and user-facing messaging, tightened fetch error handling in multiple components, guarded WebSocket listener cleanup, updated Sentry instrumentation and a few dependencies.

Changes

Cohort / File(s) Summary
Push Notification Initialization
components/notifications/NotificationsContext.tsx
Added initializationRef to ensure initializePushNotifications runs once per connectedProfile.id on Capacitor; register listeners (registration, registrationError, pushNotificationReceived, pushNotificationActionPerformed) before permission prompts; centralized try/catch; handlePushNotificationAction now accepts profile.
Component fetch error handling
components/rememes/RememeAddPage.tsx, components/the-memes/MemePage.tsx
Added .catch handlers to async fetches to set related state to undefined on failure; MemePage effect now depends on connectedProfile?.consolidation_key and requires the key for API calls.
Socket listener cleanup
hooks/useWaveIsTyping.ts
Cache socket as currentSocket when attaching "message" listener and remove the listener in cleanup only if that cached reference exists.
IndexedDB detection & sanitizer
utils/error-sanitizer.ts, utils/appkit-initialization.utils.ts
Added INDEXEDDB_ERROR_MESSAGE and exported isIndexedDBError(error); detect IndexedDB errors early and short-circuit adapter creation with a user-facing storage-connection error.
Sentry instrumentation & runtime handlers
instrumentation-client.ts, config/sentryProbes.ts, sentry.client.config.ts, sentry.edge.config.ts, sentry.server.config.ts
Added beforeSend probe tagging via tagSecurityProbes; reclassified IndexedDB errors as warnings with tags/fingerprint; added global error and unhandledrejection listeners to detect IndexedDB errors; introduced browser Sentry config and adjusted enablement/flags.
Dependency updates
package.json
Bumped @lexical/react & lexical to ^0.14.5, autoprefixer to ^10.4.22; added zod-validation-error@^4.0.0; removed @types/react and @types/react-dom from dependencies/overrides.
User subscriptions fetches
components/user/subscriptions/UserPageSubscriptions.tsx
Added catch handlers to fetchDetails and fetchAirdropAddress to set state to undefined on fetch failure.

Sequence Diagram(s)

sequenceDiagram
  participant App as NotificationsContext
  participant Cap as Capacitor.PushNotifications
  participant Server as Backend (registerPushNotification)
  participant Router as Router

  Note over App: initializePushNotifications(profile) — guarded by initializationRef
  App->>Cap: removeAllListeners()
  App->>Cap: addListener('registration')
  App->>Cap: addListener('registrationError')
  App->>Cap: addListener('pushNotificationReceived')
  App->>Cap: addListener('pushNotificationActionPerformed')
  Cap-->>App: registration(token)
  App->>Server: registerPushNotification(stableDeviceId, deviceInfo, token, profile)
  Server-->>App: OK / Err
  App->>Cap: requestPermissions()
  Cap-->>App: permission status
  alt permission granted
    App->>App: (iOS small delay)
    App->>Cap: register()
    Cap-->>App: register result / error
    alt known iOS callback message
      App-->>App: log warning (iOS callback)
    else other error
      App-->>App: throw/log error
    end
  else permission denied
    App-->>App: log warning
  end
  Cap->>App: pushNotificationActionPerformed(notification)
  App->>App: handlePushNotificationAction(notification, profile)
  App->>Router: navigate based on action
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • components/notifications/NotificationsContext.tsx — lifecycle guard correctness, listener ordering, permission/register error handling, profile propagation.
    • utils/error-sanitizer.ts & utils/appkit-initialization.utils.ts — IndexedDB detection patterns and user-facing message.
    • instrumentation-client.ts and Sentry configs — beforeSend changes and global error listeners.
    • components/the-memes/MemePage.tsx — consolidation key usage and effect dependencies.
    • Dependency removals/additions for build/type impacts.

Possibly related PRs

Suggested reviewers

  • simo6529
  • GelatoGenesis
  • ragnep

Poem

🐇 I nudged listeners into tidy rows,

one init per profile, no duplicate woes.
I sniff IndexedDB with a careful nose,
hush noisy errors so Sentry softly knows.
A hop, a patch — the app now gently grows.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The PR title 'Packages and sentry updates' is vague and generic. While it mentions two broad categories (packages and sentry), it fails to highlight the primary changes or specific improvements made, using non-descriptive terms that don't convey meaningful information about the changeset. Consider a more specific title that captures the main purpose, such as 'Add IndexedDB error handling and security probe detection' or 'Improve error handling and Sentry instrumentation with IndexedDB support'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/the-memes/MemePage.tsx (1)

228-244: Potential issue: API call with undefined consolidation_key.

The effect runs when connectedWallets.length > 0, but the API endpoint uses connectedProfile?.consolidation_key which could be undefined. This would result in a malformed API request to /tdh/consolidation/undefined.

Consider adding connectedProfile?.consolidation_key to the condition:

 useEffect(() => {
-  if (connectedWallets.length > 0 && nftId) {
+  if (connectedWallets.length > 0 && nftId && connectedProfile?.consolidation_key) {
     commonApiFetch<ConsolidatedTDH>({
       endpoint: `tdh/consolidation/${connectedProfile?.consolidation_key}`,
     })
🧹 Nitpick comments (2)
utils/error-sanitizer.ts (1)

75-83: Consider tightening patterns to reduce false positives.

Some patterns may match non-IndexedDB errors:

  • /idb/i - Could match strings containing "idb" in other contexts
  • /connection.*lost/i - Would match any "connection lost" error (e.g., WebSocket, SQL)
  • /database.*server.*lost/i - Could match SQL database connection errors

Consider making patterns more specific to IndexedDB:

 const indexedDBPatterns = [
   /indexed\s*database/i,
   /indexeddb/i,
-  /idb/i,
-  /connection.*lost/i,
-  /database.*server.*lost/i,
+  /\bIDB\b/, // Case-sensitive, word boundary
+  /IndexedDB.*connection.*lost/i,
+  /Internal error opening backing store/i, // Common Chrome IndexedDB error
   /DOMException.*QuotaExceeded/i,
   /DOMException.*UnknownError/i,
 ];
components/notifications/NotificationsContext.tsx (1)

210-216: Empty dependency array in useMemo may cause stale closures.

The useMemo has an empty dependency array [], but the returned object references removeWaveDeliveredNotifications and removeAllDeliveredNotifications which capture isIos from the outer scope. If isIos could change (unlikely but possible), the memoized functions would use stale values.

Since isIos is stable after initial render, this is likely fine in practice, but consider adding isIos to the dependency array for correctness.

  const value = useMemo(
    () => ({
      removeWaveDeliveredNotifications,
      removeAllDeliveredNotifications,
    }),
-   []
+   [isIos]
  );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 396dc3b and 409841c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • components/notifications/NotificationsContext.tsx (3 hunks)
  • components/rememes/RememeAddPage.tsx (1 hunks)
  • components/the-memes/MemePage.tsx (1 hunks)
  • hooks/useWaveIsTyping.ts (1 hunks)
  • instrumentation-client.ts (2 hunks)
  • package.json (4 hunks)
  • utils/appkit-initialization.utils.ts (2 hunks)
  • utils/error-sanitizer.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • components/rememes/RememeAddPage.tsx
  • utils/error-sanitizer.ts
  • instrumentation-client.ts
  • hooks/useWaveIsTyping.ts
  • components/the-memes/MemePage.tsx
  • utils/appkit-initialization.utils.ts
  • components/notifications/NotificationsContext.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

Files:

  • components/rememes/RememeAddPage.tsx
  • components/the-memes/MemePage.tsx
  • components/notifications/NotificationsContext.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • components/rememes/RememeAddPage.tsx
  • utils/error-sanitizer.ts
  • instrumentation-client.ts
  • hooks/useWaveIsTyping.ts
  • components/the-memes/MemePage.tsx
  • utils/appkit-initialization.utils.ts
  • components/notifications/NotificationsContext.tsx
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions; do not add `// eslint-disable` comments unless explicitly instructed
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Use TypeScript and React functional components with hooks

Applied to files:

  • components/notifications/NotificationsContext.tsx
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions; do not add `// eslint-disable` comments unless explicitly instructed

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:35:58.721Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.721Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use NextJS features that match the current version

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:36.715Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:36.715Z
Learning: Ensure linting passes with `npm run lint` and type-checking passes with `npm run type-check` alongside tests

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx} : All code must pass TypeScript type checking via `npm run type-check` (`tsc --noEmit`)

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via `npm run lint`

Applied to files:

  • package.json
🧬 Code graph analysis (3)
instrumentation-client.ts (1)
utils/error-sanitizer.ts (1)
  • isIndexedDBError (64-88)
utils/appkit-initialization.utils.ts (1)
utils/error-sanitizer.ts (2)
  • isIndexedDBError (64-88)
  • logErrorSecurely (247-274)
components/notifications/NotificationsContext.tsx (1)
components/notifications/stable-device-id.ts (1)
  • getStableDeviceId (10-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (15)
components/rememes/RememeAddPage.tsx (1)

125-141: LGTM! Error handling added to TDH fetch.

The catch block gracefully handles API failures by resetting userTDH to undefined, which correctly triggers the existing UI logic (Line 82-86) to display "You need to have some TDH before you can add Rememes" message. This provides implicit user feedback without additional error UI.

hooks/useWaveIsTyping.ts (1)

107-114: LGTM! Improved socket listener cleanup.

Capturing socket in a local currentSocket variable ensures the cleanup function removes the listener from the correct socket instance, even if the socket reference changes before cleanup runs. This is a robust pattern for event listener management in React effects.

instrumentation-client.ts (1)

56-76: Verify: preventDefault() may suppress Sentry's automatic error capture.

Calling event.preventDefault() on error and unhandledrejection events prevents the errors from propagating to Sentry's automatic error capture. This means IndexedDB errors won't be recorded in Sentry at all (not even as warnings), despite the beforeSend handler being configured for them.

If the intent is to still report these errors to Sentry as warnings, consider explicitly capturing them:

 window.addEventListener("error", (event) => {
   if (isIndexedDBError(event.error)) {
     event.preventDefault();
+    Sentry.captureException(event.error);
     console.warn(
       "[IndexedDB] Connection lost. This is usually recoverable by refreshing the page.",
       event.error
     );
   }
 });

 window.addEventListener("unhandledrejection", (event) => {
   if (isIndexedDBError(event.reason)) {
     event.preventDefault();
+    Sentry.captureException(event.reason);
     console.warn(
       "[IndexedDB] Unhandled promise rejection due to IndexedDB connection loss. This is usually recoverable by refreshing the page.",
       event.reason
     );
   }
 });

If the intent is to completely suppress these errors from Sentry, the current implementation is correct.

utils/error-sanitizer.ts (1)

202-205: LGTM! IndexedDB error prioritization in sanitization flow.

Checking for IndexedDB errors before adapter-specific errors ensures these recoverable storage errors get a clear, actionable user message.

utils/appkit-initialization.utils.ts (2)

6-6: LGTM!

The import of isIndexedDBError and logErrorSecurely from the error-sanitizer module is appropriate for the new IndexedDB error handling functionality.


50-58: LGTM! Well-structured IndexedDB error handling.

The early return pattern for IndexedDB errors is appropriate - it catches storage-related failures before falling through to generic adapter errors. The user-facing message is clear and actionable.

One consideration: the error message instructs users to refresh, but IndexedDB connection issues can sometimes persist across refreshes (e.g., private browsing mode, storage quota exceeded). You may want to consider providing more specific guidance in the future.

package.json (3)

66-66: Lexical package updates look good.

The update from ^0.14.2 to ^0.14.5 for @lexical/react and lexical is a minor patch version bump that should be backward compatible.

Also applies to: 108-108


160-160: LGTM!

Patch version update for autoprefixer dev dependency.


200-200: Remove the zod-validation-error override—it appears unnecessary.

The package already declares peer dependency support for both ^3.5.0 || ^4.0.0, and npm would naturally resolve to a compatible version (currently 4.0.2) without explicit override. Since the override doesn't resolve a conflict and the package isn't directly used in the codebase, it can be removed to simplify dependency management.

Likely an incorrect or invalid review comment.

components/notifications/NotificationsContext.tsx (6)

3-9: LGTM!

Import reorganization with useRef addition is appropriate for the new initialization guard pattern.


49-60: Good use of ref-based guard for initialization.

The initializationRef pattern correctly prevents redundant push notification initialization when the profile hasn't changed. Storing the profile ID (or null) ensures re-initialization occurs when switching profiles.

Minor note: the isIos value is used within initializePushNotifications but isn't listed in the dependency array. This works because isIos comes from useCapacitor and is stable, but if it could ever change dynamically, you'd want to include it.


73-88: LGTM! Clean listener setup pattern.

Removing all listeners before re-registering prevents listener accumulation. The registration listener correctly passes all required parameters.


90-110: LGTM!

Error listener and notification action listeners are properly set up. Passing profile to handlePushNotificationAction enables profile-aware notification handling.


145-175: LGTM!

The profile parameter addition enables proper validation that the notification belongs to the connected profile before processing. The early return when profile IDs don't match is correct behavior.


112-142: This iOS workaround appropriately handles a documented Capacitor issue; no changes needed.

The 500ms delay and error message detection target a known, documented Capacitor iOS callback issue where capacitorDidRegisterForRemoteNotifications may not fire properly due to missing AppDelegate handlers or provisioning configuration. These error message strings are tied to Capacitor's official iOS plugin implementation and are unlikely to change without major version upgrades. The console.warn message already documents the issue inline, and adding additional comments would violate the project's coding guidelines (no comments in TypeScript/TSX files). This code appropriately handles a platform-specific problem within project constraints.

Comment thread package.json Outdated
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
instrumentation-client.ts (1)

54-74: Consider centralizing the IndexedDB error message.

The error messages for IndexedDB issues are duplicated across multiple locations:

  • Lines 59-60 and 68-70 in this file
  • Lines 202 and 217 in utils/error-sanitizer.ts

Consider extracting this to a shared constant to improve maintainability.

Example refactor in utils/error-sanitizer.ts:

+export const INDEXEDDB_ERROR_MESSAGE =
+  "Browser storage connection lost. Please refresh the page to try again.";
+
 export const isIndexedDBError = (error: unknown): boolean => {

Then import and use it in both files:

 import { publicEnv } from "@/config/env";
-import { isIndexedDBError } from "@/utils/error-sanitizer";
+import { isIndexedDBError, INDEXEDDB_ERROR_MESSAGE } from "@/utils/error-sanitizer";
     if (isIndexedDBError(event.error)) {
       event.preventDefault();
       console.warn(
-        "[IndexedDB] Connection lost. This is usually recoverable by refreshing the page.",
+        `[IndexedDB] ${INDEXEDDB_ERROR_MESSAGE}`,
         event.error
       );
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 409841c and bfc3fa5.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • components/the-memes/MemePage.tsx (1 hunks)
  • instrumentation-client.ts (3 hunks)
  • package.json (4 hunks)
  • utils/error-sanitizer.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/the-memes/MemePage.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • instrumentation-client.ts
  • utils/error-sanitizer.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • instrumentation-client.ts
  • utils/error-sanitizer.ts
🧠 Learnings (5)
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions; do not add `// eslint-disable` comments unless explicitly instructed

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:35:58.721Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.721Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use NextJS features that match the current version

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:36.715Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:36.715Z
Learning: Ensure linting passes with `npm run lint` and type-checking passes with `npm run type-check` alongside tests

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx} : All code must pass TypeScript type checking via `npm run type-check` (`tsc --noEmit`)

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via `npm run lint`

Applied to files:

  • package.json
🧬 Code graph analysis (1)
instrumentation-client.ts (1)
utils/error-sanitizer.ts (1)
  • isIndexedDBError (64-100)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
instrumentation-client.ts (3)

5-7: LGTM!

The imports are correctly structured and all are utilized in the file.


37-51: LGTM!

The beforeSend handler correctly identifies IndexedDB errors and appropriately downgrades them to warnings with proper tagging and fingerprinting.


18-18: No changes needed. The Sentry.replayIntegration() API is fully compatible with @sentry/nextjs@^10.27.0 in use. This version is well beyond the v8+ requirement for this integration.

utils/error-sanitizer.ts (3)

64-100: LGTM!

The isIndexedDBError function is well-structured with comprehensive error type handling and appropriate pattern matching for IndexedDB-related issues.


199-203: LGTM!

The IndexedDB error pattern is appropriately added to ERROR_PATTERNS. While the connection.*lost portion is somewhat broad, it serves as a useful fallback since the more specific isIndexedDBError check is prioritized earlier in the flow.


215-218: LGTM!

The prioritization of IndexedDB error detection early in the sanitization flow is correct and ensures these errors are handled consistently before falling through to adapter-specific or generic error handling.

package.json (3)

155-156: Inconsistency: @types/react and @types/react-dom present with React 19.2.

React 19+ includes built-in type definitions; having separate @types/react and @types/react-dom packages can cause type conflicts or confusion. The AI summary indicates these should have been removed. Confirm whether they're intentionally retained or if they should be deleted.


199-199: No action needed. zod-validation-error in overrides without a corresponding entry in dependencies is correct—it's a transitive dependency being pinned to a specific version. This is standard npm override usage for managing nested package versions.

Likely an incorrect or invalid review comment.


66-66: Verify dependency changes are compatible with the codebase.

The lexical packages (^0.14.2 → ^0.14.5) and autoprefixer (^10.4.19 → ^10.4.22) are patch-level bumps and should be backward compatible. The removal of @types/react and @types/react-dom from the overrides section is correct for React 19.2 (which includes built-in types). Verify the changes by running:

npm run type-check
npm run lint
npm run test

Also applies to: 108-108, 160-160

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
instrumentation-client.ts (1)

1-3: Consider removing comments per coding guidelines.

The coding guidelines specify that code should be self-explanatory without comments. While these are helpful configuration comments, consider whether they add value beyond what the code itself conveys.

Also applies to: 20-38

utils/error-sanitizer.ts (3)

90-98: Consider narrowing the UnknownError pattern to reduce false positives.

The pattern /DOMException.*UnknownError/i at line 97 is quite broad and may match non-IndexedDB DOMExceptions. Consider whether this pattern should be more specific or if it's acceptable to classify all DOMException UnknownErrors as IndexedDB-related.

If you want to be more conservative, you could remove this pattern or make it more specific by requiring additional context:

  const indexedDBPatterns = [
    /indexed\s*database/i,
    /indexeddb/i,
    /\bIDB\b/,
    /IndexedDB.*connection.*lost/i,
    /Internal error opening backing store/i,
    /DOMException.*QuotaExceeded/i,
-   /DOMException.*UnknownError/i,
  ];

202-205: Consider whether this ERROR_PATTERNS entry is still needed.

Since sanitizeErrorForUser now has an early return for IndexedDB errors (lines 217-220) that uses isIndexedDBError, this pattern in ERROR_PATTERNS appears redundant. The early return will catch IndexedDB errors before reaching the pattern matching loop.

If the early return is sufficient, this pattern could be removed:

-  {
-    pattern: /indexed\s*database|indexeddb|connection.*lost/i,
-    message: INDEXEDDB_ERROR_MESSAGE,
-  },

However, keeping it provides defense-in-depth if the early return logic changes.


1-4: Consider removing comments per coding guidelines.

The coding guidelines specify that code should be self-explanatory without comments. While these JSDoc-style comments and inline comments are helpful for understanding the utility functions, consider whether they're necessary given the guideline to avoid comments.

Also applies to: 42-44, 64-66, 105-107, 140-142, 167-169, 208-211, 257-261

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfc3fa5 and e7addef.

📒 Files selected for processing (2)
  • instrumentation-client.ts (3 hunks)
  • utils/error-sanitizer.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • utils/error-sanitizer.ts
  • instrumentation-client.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • utils/error-sanitizer.ts
  • instrumentation-client.ts
🧬 Code graph analysis (1)
instrumentation-client.ts (1)
utils/error-sanitizer.ts (2)
  • isIndexedDBError (67-103)
  • INDEXEDDB_ERROR_MESSAGE (8-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
instrumentation-client.ts (3)

5-9: LGTM!

The imports are correctly structured and all symbols are used appropriately in the file.


40-54: LGTM! Appropriate IndexedDB error handling in Sentry.

The beforeSend hook correctly identifies IndexedDB errors and reclassifies them as warnings with appropriate tags and fingerprinting. This approach is suitable if IndexedDB errors are expected to be recoverable, allowing users to refresh the page as suggested by the user-facing message.


57-74: Verify that preventing default error handling won't interfere with error monitoring.

The global error listeners call event.preventDefault() for IndexedDB errors, which suppresses the default browser error handling and prevents the error from propagating to other error handlers. While these errors are still captured by Sentry's beforeSend hook and logged to the console, this approach might interfere with other error monitoring tools or error boundaries.

Consider whether preventDefault() is necessary, or if the console warning alone would suffice while allowing the error to propagate normally.

utils/error-sanitizer.ts (2)

8-9: LGTM!

The exported constant provides a clear, actionable message for users and enables consistent messaging across the codebase.


217-220: LGTM!

The early return appropriately prioritizes IndexedDB error detection and ensures consistent user-facing messaging.

Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
sentry.server.config.ts (1)

1-32: Remove comments per coding guidelines.

The coding guidelines specify: "Do not include any comments in the code; it should be self-explanatory." This file contains multiple comments (lines 1-3, 13-14, 16, 19, 22-24, 26-28) that should be removed.

Based on coding guidelines.

sentry.edge.config.ts (1)

1-32: Remove comments per coding guidelines.

Similar to the server config, this file contains multiple comments that should be removed per the coding guidelines: "Do not include any comments in the code; it should be self-explanatory."

Based on coding guidelines.

sentry.client.config.ts (1)

1-50: Remove comments per coding guidelines.

This file contains multiple comments (lines 1-5, 15, 18, 22-24) that should be removed. The coding guidelines specify: "Do not include any comments in the code; it should be self-explanatory."

Based on coding guidelines.

config/sentryProbes.ts (1)

14-27: Use Sentry's Event type instead of any for better type safety.

The event parameter has a well-defined shape from Sentry's type system. Replace any with the proper Event type:

import type { Event } from "@sentry/types";

export function tagSecurityProbes(event: Event) {
  const url = (event?.request?.url || "").toLowerCase();

  if (PROBE_PATTERNS.some((p) => url.includes(p))) {
    event.level = "info";
    event.tags = {
      ...(event.tags || {}),
      security_probe: "true",
      probe_type: "generic-exploit-scan",
    };
  }

  return event;
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb9502 and be71868.

📒 Files selected for processing (4)
  • config/sentryProbes.ts (1 hunks)
  • sentry.client.config.ts (1 hunks)
  • sentry.edge.config.ts (1 hunks)
  • sentry.server.config.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • config/sentryProbes.ts
  • sentry.edge.config.ts
  • sentry.client.config.ts
  • sentry.server.config.ts
{.env*,*.env,**/config/**}

📄 CodeRabbit inference engine (.cursor/rules/dev_workflow.mdc)

Configure Task Master behavior via environment variables: ANTHROPIC_API_KEY (required), MODEL, MAX_TOKENS, TEMPERATURE, DEBUG, LOG_LEVEL, DEFAULT_SUBTASKS, DEFAULT_PRIORITY, PROJECT_NAME, PROJECT_VERSION, PERPLEXITY_API_KEY, and PERPLEXITY_MODEL

Files:

  • config/sentryProbes.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • config/sentryProbes.ts
  • sentry.edge.config.ts
  • sentry.client.config.ts
  • sentry.server.config.ts
🧠 Learnings (1)
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to {middleware,proxy}.ts : Request boundary logic using `middleware.ts` should be renamed to `proxy.ts` with exported `proxy` function (Node runtime); legacy `middleware.ts` is only for edge-only cases

Applied to files:

  • sentry.edge.config.ts
🧬 Code graph analysis (1)
sentry.server.config.ts (2)
next.config.mjs (2)
  • publicEnv (217-217)
  • publicEnv (275-275)
config/sentryProbes.ts (1)
  • tagSecurityProbes (14-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
sentry.server.config.ts (3)

5-6: LGTM: Clean import organization.

The imports are well-structured and support the new security probe tagging functionality.


9-14: LGTM: DSN configuration is clear and consistent.

The use of Boolean(dsn) is more explicit than !!dsn and improves readability.


29-31: LGTM: beforeSend implementation is correct.

The delegation to tagSecurityProbes properly filters security probe events and is consistent with the edge configuration.

config/sentryProbes.ts (2)

1-12: LGTM: Probe patterns cover common exploit attempts.

The patterns effectively identify common security probes targeting Java, PHP, ASP, and WordPress vulnerabilities.


15-24: LGTM: URL matching logic is sound.

The case-insensitive pattern matching using toLowerCase() and includes() appropriately catches probe attempts regardless of case variations.

sentry.edge.config.ts (1)

7-8: LGTM: Edge configuration is consistent with server configuration.

The security probe tagging is properly implemented and maintains consistency with the server-side Sentry configuration.

Also applies to: 29-31

sentry.client.config.ts (2)

9-20: LGTM: Client configuration aligns with server/edge configs.

The DSN handling, tracing, and PII settings are consistent with the server and edge configurations.


25-49: LGTM: Noise filtering logic handles browser quirks appropriately.

The beforeSend implementation correctly:

  • Extracts messages from multiple exception sources
  • Filters out common browser noise (ResizeObserver, Safari quirks)
  • Returns null to drop noisy events

The multi-source message extraction (exception value, string originalException, Error instance) properly handles different error reporting patterns.

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/user/subscriptions/UserPageSubscriptions.tsx (1)

120-120: Fix incorrect dependency reference.

The dependency should be fetchingAirdropAddress (the state variable) rather than fetchAirdropAddress (the function). This typo would prevent the isFetching state from updating correctly when the airdrop address fetch state changes.

Apply this diff:

-    fetchAirdropAddress,
+    fetchingAirdropAddress,
🧹 Nitpick comments (1)
sentry.client.config.ts (1)

1-5: Consider removing comments per coding guidelines.

The coding guidelines specify that code should be self-explanatory without comments. The file name and imports already make the purpose clear.

Apply this diff to remove the comments:

-// sentry.client.config.ts
-// This file configures the initialization of Sentry in the browser.
-// It is auto-discovered by @sentry/nextjs at build time.
-// https://docs.sentry.io/platforms/javascript/guides/nextjs/
-
 import { publicEnv } from "@/config/env";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be71868 and d4d95ef.

📒 Files selected for processing (3)
  • components/user/subscriptions/UserPageSubscriptions.tsx (2 hunks)
  • config/sentryProbes.ts (1 hunks)
  • sentry.client.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • components/user/subscriptions/UserPageSubscriptions.tsx
  • sentry.client.config.ts
  • config/sentryProbes.ts
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

Files:

  • components/user/subscriptions/UserPageSubscriptions.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • components/user/subscriptions/UserPageSubscriptions.tsx
  • sentry.client.config.ts
  • config/sentryProbes.ts
{.env*,*.env,**/config/**}

📄 CodeRabbit inference engine (.cursor/rules/dev_workflow.mdc)

Configure Task Master behavior via environment variables: ANTHROPIC_API_KEY (required), MODEL, MAX_TOKENS, TEMPERATURE, DEBUG, LOG_LEVEL, DEFAULT_SUBTASKS, DEFAULT_PRIORITY, PROJECT_NAME, PROJECT_VERSION, PERPLEXITY_API_KEY, and PERPLEXITY_MODEL

Files:

  • config/sentryProbes.ts
🪛 GitHub Check: SonarCloud Code Analysis
config/sentryProbes.ts

[warning] 20-20: The empty object is useless.

See more on https://sonarcloud.io/project/issues?id=6529-Collections_6529seize-frontend&issues=AZraE4WHjQ63EVEUtXlK&open=AZraE4WHjQ63EVEUtXlK&pullRequest=1623

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
components/user/subscriptions/UserPageSubscriptions.tsx (2)

138-140: LGTM - Explicit error state management.

The explicit undefined assignment on error ensures the details state is cleared when the fetch fails, preventing stale data from being displayed.


157-159: LGTM - Consistent error handling.

The error handling mirrors the pattern used in fetchDetails, ensuring state is explicitly cleared on failure.

config/sentryProbes.ts (2)

1-12: LGTM - Well-chosen probe patterns.

The pattern list covers common exploit probes targeting non-Next.js platforms (JSP, PHP, WordPress, Tomcat). The lowercase values align with the URL normalization in the function.


14-27: LGTM - Sound probe detection logic.

The function correctly normalizes the URL, checks for probe patterns, and tags matching events. The SonarCloud warning on line 20 is a false positive—the empty object {} is necessary as a fallback for the spread operator when event.tags is nullish.

sentry.client.config.ts (2)

16-16: Verify if 100% performance tracing is intended for production.

Setting tracesSampleRate: 1 captures 100% of transactions, which can be expensive in high-traffic production environments. Typical production values range from 0.1 to 0.01 depending on traffic volume.


25-50: LGTM - Effective noise filtering.

The beforeSend hook correctly handles both string and Error types for originalException, and filters out known noisy browser messages. The pattern-matching approach is consistent with the probe detection utility.

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
sentry.server.config.ts (1)

20-20: Verify the impact of enabling log transmission and implement filtering.

Setting enableLogs: true will send application logs to Sentry, significantly increasing data volume and costs against your Logs quota. Each log captures level, message, timestamp, and attributes—all counted toward billing. Without filtering, this can quickly exceed plan limits.

Implement beforeSendLog to filter low-value log levels (e.g., debug, info) or redact large payloads before ingestion, or disable enableLogs until needed for specific troubleshooting.

🧹 Nitpick comments (2)
components/user/subscriptions/UserPageSubscriptions.tsx (1)

138-140: Inconsistent error handling across fetch functions.

Only fetchDetails and fetchAirdropAddress have catch blocks that reset state to undefined, while other fetch functions (fetchTopUpHistory, fetchRedeemHistory, fetchMemeSubscriptions, fetchLogs) lack explicit error handling. Additionally, these failures are silent—users receive no feedback when API calls fail, and errors aren't logged for debugging.

Consider either:

  1. Adding consistent error handling across all fetch functions with user-facing error messages
  2. Deferring error handling to a centralized mechanism

Based on coding guidelines, the component should use react-query for data fetching, which provides built-in error handling, loading states, and retry logic:

const { data: details, isLoading: fetchingDetails, refetch: refetchDetails } = useQuery({
  queryKey: ['subscriptionDetails', profileKey],
  queryFn: () => commonApiFetch<SubscriptionDetails>({
    endpoint: `subscriptions/consolidation/details/${profileKey}`,
  }),
  enabled: !!profileKey,
});

Also applies to: 157-159

sentry.server.config.ts (1)

26-31: Add defensive error handling in beforeSend hook.

The beforeSend hook should handle potential errors in tagSecurityProbes to prevent Sentry initialization failures. If tagSecurityProbes throws an exception, events won't be sent.

  beforeSend(event) {
-   return tagSecurityProbes(event);
+   try {
+     return tagSecurityProbes(event);
+   } catch (error) {
+     console.error('Error in tagSecurityProbes:', error);
+     return event;
+   }
  },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4d95ef and 596f0da.

📒 Files selected for processing (5)
  • components/user/subscriptions/UserPageSubscriptions.tsx (3 hunks)
  • config/sentryProbes.ts (1 hunks)
  • instrumentation-client.ts (3 hunks)
  • sentry.edge.config.ts (1 hunks)
  • sentry.server.config.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • config/sentryProbes.ts
  • sentry.edge.config.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Enforce ≥ 80% line coverage for files changed since main via npm run test
All code must pass ESLint (Next's Core Web Vitals + React Hooks rules) via npm run lint
Use <Link> from Next.js for internal navigation instead of <a> tags or HTML anchors
Use <Image> from next/image instead of HTML <img> elements

Files:

  • instrumentation-client.ts
  • components/user/subscriptions/UserPageSubscriptions.tsx
  • sentry.server.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: All code must pass TypeScript type checking via npm run type-check (tsc --noEmit)
Use 'use cache' directive at the top of Server Components or functions to explicitly opt-in to caching in Next.js 16

Files:

  • instrumentation-client.ts
  • components/user/subscriptions/UserPageSubscriptions.tsx
  • sentry.server.config.ts
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

Files:

  • components/user/subscriptions/UserPageSubscriptions.tsx
🧬 Code graph analysis (2)
instrumentation-client.ts (1)
utils/error-sanitizer.ts (2)
  • isIndexedDBError (67-110)
  • INDEXEDDB_ERROR_MESSAGE (8-9)
sentry.server.config.ts (2)
next.config.mjs (2)
  • publicEnv (217-217)
  • publicEnv (275-275)
config/sentryProbes.ts (1)
  • tagSecurityProbes (19-30)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
instrumentation-client.ts (3)

5-9: LGTM: Imports are properly structured.

The new imports support the IndexedDB error handling functionality and are correctly utilized throughout the file.


40-54: LGTM: IndexedDB error reclassification is well-implemented.

The beforeSend handler correctly identifies IndexedDB errors and downgrades them to warnings with appropriate tags. The fingerprint ["indexeddb-connection-lost"] intentionally groups all such errors together in Sentry, which reduces noise while maintaining visibility.


57-74: LGTM: Global error listeners appropriately suppress IndexedDB noise.

The implementation correctly:

  • Guards browser-only code with globalThis.window check
  • Handles both synchronous errors and unhandled promise rejections
  • Uses preventDefault() to suppress default handling and reduce noise
  • Provides clear console warnings for developers

Note that preventDefault() means other error handlers won't see these errors, and they won't appear in the browser console except as warnings—this is intentional to reduce IndexedDB error noise while maintaining developer visibility.

components/user/subscriptions/UserPageSubscriptions.tsx (1)

120-120: LGTM: Correct dependency fix.

The dependency array now correctly references fetchingAirdropAddress (the boolean state) instead of fetchAirdropAddress (the function). This properly tracks when the airdrop address fetch completes.

sentry.server.config.ts (1)

5-14: LGTM: Centralized configuration.

Using publicEnv.SENTRY_DSN centralizes configuration management, and Boolean(dsn) is more explicit than the double-bang operator. The conditional enabling ensures Sentry only initializes when properly configured.

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 1, 2025

@prxt6529 prxt6529 merged commit 7f51d9c into main Dec 1, 2025
8 checks passed
This was referenced Dec 3, 2025
This was referenced Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants