Skip to content

Conversation

elie222
Copy link
Owner

@elie222 elie222 commented Oct 15, 2025

Summary by CodeRabbit

  • New Features
    • Client-side validation for About (max 2,000 chars) and Signature (max 10,000 chars).
  • Bug Fixes
    • Corrected HubSpot OAuth authorization flow.
    • Premium users finishing onboarding now go to setup instead of upgrade.
  • Refactor
    • Outlook subscription handling improved to reuse valid subscriptions and reduce unnecessary renewals.
  • Tests
    • Updated tests for subscription change detection.
  • Chores
    • App version bumped to v2.16.9.
    • Non-rate-limit Gmail errors logged as warnings.

Copy link

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
inbox-zero Ready Ready Preview Oct 15, 2025 11:47pm

Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Adds premium-aware onboarding routing, moves user validation schemas into a new module and wires Zod resolvers into forms, adjusts Gmail retry logging, updates HubSpot OAuth endpoint, refactors Outlook subscription manager (scoped logger, structured returns, ensureSubscription) with test updates, and bumps version to v2.16.9.

Changes

Cohort / File(s) Summary
Onboarding premium routing
apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
Uses usePremium to branch post-onboarding navigation: premium → /setup, non-premium → /welcome-upgrade; adds isPremium to effect deps.
User validation extraction
apps/web/utils/actions/user.ts, apps/web/utils/actions/user.validation.ts
Removed local saveAboutBody/saveSignatureBody and their type aliases from user.ts; introduced user.validation.ts exporting saveAboutBody, saveSignatureBody and inferred types.
Form Zod wiring
apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx, apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
Import schemas from user.validation and add zodResolver(...) to useForm for runtime validation; import paths for SaveAboutBody/SaveSignatureBody updated.
Gmail retry logging
apps/web/utils/gmail/retry.ts
Non-rate-limit errors now log at warn and include the full error object (plus status/reason); control flow and retry behavior unchanged.
MCP integrations config
apps/web/utils/mcp/integrations.ts
HubSpot OAuth authorization_endpoint changed to https://app.hubspot.com/oauth/authorize (old endpoint commented).
Outlook subscription manager refactor
apps/web/utils/outlook/subscription-manager.ts, apps/web/utils/outlook/subscription-manager.test.ts
Introduces scoped logger with emailAccountId; createSubscription returns `{ expirationDate, subscriptionId?, changed }
Version bump
version.txt
Updates version from v2.16.7 to v2.16.9.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Onboarding as OnboardingContent
  participant Premium as usePremium
  participant Router as Router

  User->>Onboarding: Finish onboarding
  Onboarding->>Premium: read isPremium
  alt isPremium == true
    Onboarding->>Router: navigate("/setup")
  else
    Onboarding->>Router: navigate("/welcome-upgrade")
  end
Loading
sequenceDiagram
  autonumber
  participant Caller as createManagedOutlookSubscription
  participant Manager as OutlookSubscriptionManager
  participant Store as Persistence
  participant Outlook as Microsoft API
  participant Logger as Scoped Logger

  Caller->>Manager: ensureSubscription()
  Manager->>Logger: init with { emailAccountId }
  Manager->>Store: getExistingSubscription()
  alt existing valid & not near expiry
    Manager->>Logger: info "reusing existing"
    Manager-->>Caller: expirationDate (changed=false)
  else
    opt existing present
      Manager->>Outlook: cancel subscription
      Manager->>Logger: info "canceled existing"
    end
    Manager->>Outlook: create subscription
    Outlook-->>Manager: { subscriptionId, expirationDate }
    Manager->>Store: persist subscription
    Manager-->>Caller: expirationDate (changed=true)
  end
  note over Manager,Caller: Errors are logged via scoped logger and propagated
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

A hop, a nibble, premium sights,
I guide new paths through onboarding nights.
Schemas moved to tidy burrows deep,
Softer logs, and subscriptions keep.
Version bumped — carrots gleam and leap! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly communicates the main change of redirecting premium users to the product workflow after completing onboarding, which matches the core update in the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/microsof-resub-less-often

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bbccc0 and 829ef55.

📒 Files selected for processing (4)
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx (3 hunks)
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx (3 hunks)
  • apps/web/utils/actions/user.ts (1 hunks)
  • apps/web/utils/actions/user.validation.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (20)
apps/web/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.{ts,tsx}: Use TypeScript with strict null checks
Path aliases: Use @/ for imports from project root
Use proper error handling with try/catch blocks
Format code with Prettier
Leverage TypeScript inference for better DX

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/utils/actions/**/*.ts

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/utils/actions/**/*.ts: Use server actions for all mutations (create/update/delete operations)
next-safe-action provides centralized error handling
Use Zod schemas for validation on both client and server
Use revalidatePath in server actions for cache invalidation

apps/web/utils/actions/**/*.ts: Use server actions (with next-safe-action) for all mutations (create/update/delete operations); do NOT use POST API routes for mutations.
Use revalidatePath in server actions to invalidate cache after mutations.

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
!{.cursor/rules/*.mdc}

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

Never place rule files in the project root, in subdirectories outside .cursor/rules, or in any other location

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/form-handling.mdc)

**/*.ts: The same validation should be done in the server action too
Define validation schemas using Zod

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
apps/web/utils/actions/*.validation.ts

📄 CodeRabbit inference engine (.cursor/rules/fullstack-workflow.mdc)

Define Zod schemas for validation in dedicated files and use them for both client and server validation.

Define input validation schemas using Zod in the corresponding .validation.ts file. These schemas are used by next-safe-action (.schema()) and can also be reused on the client for form validation.

Files:

  • apps/web/utils/actions/user.validation.ts
**/*.{ts,tsx}

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

**/*.{ts,tsx}: Use createScopedLogger for logging in backend TypeScript files
Typically add the logger initialization at the top of the file when using createScopedLogger
Only use .with() on a logger instance within a specific function, not for a global logger

Import Prisma in the project using import prisma from "@/utils/prisma";

**/*.{ts,tsx}: Don't use TypeScript enums.
Don't use TypeScript const enum.
Don't use the TypeScript directive @ts-ignore.
Don't use primitive type aliases or misleading types.
Don't use empty type parameters in type aliases and interfaces.
Don't use any or unknown as type constraints.
Don't use implicit any type on variable declarations.
Don't let variables evolve into any type through reassignments.
Don't use non-null assertions with the ! postfix operator.
Don't misuse the non-null assertion operator (!) in TypeScript files.
Don't use user-defined types.
Use as const instead of literal types and type annotations.
Use export type for types.
Use import type for types.
Don't declare empty interfaces.
Don't merge interfaces and classes unsafely.
Don't use overload signatures that aren't next to each other.
Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.
Don't use TypeScript namespaces.
Don't export imported variables.
Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.
Don't use parameter properties in class constructors.
Use either T[] or Array consistently.
Initialize each enum member value explicitly.
Make sure all enum members are literal values.

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/utils/actions/*.ts

📄 CodeRabbit inference engine (.cursor/rules/server-actions.mdc)

apps/web/utils/actions/*.ts: Implement all server actions using the next-safe-action library for type safety, input validation, context management, and error handling. Refer to apps/web/utils/actions/safe-action.ts for client definitions (actionClient, actionClientUser, adminActionClient).
Use actionClientUser when only authenticated user context (userId) is needed.
Use actionClient when both authenticated user context and a specific emailAccountId are needed. The emailAccountId must be bound when calling the action from the client.
Use adminActionClient for actions restricted to admin users.
Access necessary context (like userId, emailAccountId, etc.) provided by the safe action client via the ctx object in the .action() handler.
Server Actions are strictly for mutations (operations that change data, e.g., creating, updating, deleting). Do NOT use Server Actions for data fetching (GET operations). For data fetching, use dedicated GET API Routes combined with SWR Hooks.
Use SafeError for expected/handled errors within actions if needed. next-safe-action provides centralized error handling.
Use the .metadata({ name: "actionName" }) method to provide a meaningful name for monitoring. Sentry instrumentation is automatically applied via withServerActionInstrumentation within the safe action clients.
If an action modifies data displayed elsewhere, use revalidatePath or revalidateTag from next/cache within the action handler as needed.

Server action files must start with use server

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
apps/web/utils/**

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

Create utility functions in utils/ folder for reusable logic

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
apps/web/utils/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

apps/web/utils/**/*.ts: Use lodash utilities for common operations (arrays, objects, strings)
Import specific lodash functions to minimize bundle size

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
**/*.{js,jsx,ts,tsx}

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

**/*.{js,jsx,ts,tsx}: Don't use elements in Next.js projects.
Don't use elements in Next.js projects.
Don't use namespace imports.
Don't access namespace imports dynamically.
Don't use global eval().
Don't use console.
Don't use debugger.
Don't use var.
Don't use with statements in non-strict contexts.
Don't use the arguments object.
Don't use consecutive spaces in regular expression literals.
Don't use the comma operator.
Don't use unnecessary boolean casts.
Don't use unnecessary callbacks with flatMap.
Use for...of statements instead of Array.forEach.
Don't create classes that only have static members (like a static namespace).
Don't use this and super in static contexts.
Don't use unnecessary catch clauses.
Don't use unnecessary constructors.
Don't use unnecessary continue statements.
Don't export empty modules that don't change anything.
Don't use unnecessary escape sequences in regular expression literals.
Don't use unnecessary labels.
Don't use unnecessary nested block statements.
Don't rename imports, exports, and destructured assignments to the same name.
Don't use unnecessary string or template literal concatenation.
Don't use String.raw in template literals when there are no escape sequences.
Don't use useless case statements in switch statements.
Don't use ternary operators when simpler alternatives exist.
Don't use useless this aliasing.
Don't initialize variables to undefined.
Don't use the void operators (they're not familiar).
Use arrow functions instead of function expressions.
Use Date.now() to get milliseconds since the Unix Epoch.
Use .flatMap() instead of map().flat() when possible.
Use literal property access instead of computed property access.
Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.
Use concise optional chaining instead of chained logical expressions.
Use regular expression literals instead of the RegExp constructor when possible.
Don't use number literal object member names th...

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
!pages/_document.{js,jsx,ts,tsx}

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

!pages/_document.{js,jsx,ts,tsx}: Don't import next/document outside of pages/_document.jsx in Next.js projects.
Don't import next/document outside of pages/_document.jsx in Next.js projects.

Files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/app/**

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

NextJS app router structure with (app) directory

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/**/*.tsx

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.tsx: Follow tailwindcss patterns with prettier-plugin-tailwindcss
Prefer functional components with hooks
Use shadcn/ui components when available
Ensure responsive design with mobile-first approach
Follow consistent naming conventions (PascalCase for components)
Use LoadingContent component for async data
Use result?.serverError with toastError and toastSuccess
Use LoadingContent component to handle loading and error states consistently
Pass loading, error, and children props to LoadingContent

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/form-handling.mdc)

**/*.tsx: Use React Hook Form with Zod for validation
Validate form inputs before submission
Show validation errors inline next to form fields

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/app/(app)/*/**

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/app/(app)/*/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

If you need to use onClick in a component, that component is a client component and file must start with 'use client'

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/app/(app)/*/**/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

If we're in a deeply nested component we will use swr to fetch via API

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
apps/web/app/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

Components with onClick must be client components with use client directive

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
**/*.{jsx,tsx}

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

**/*.{jsx,tsx}: Don't destructure props inside JSX components in Solid projects.
Don't use both children and dangerouslySetInnerHTML props on the same element.
Don't use Array index in keys.
Don't assign to React component props.
Don't define React components inside other components.
Don't use event handlers on non-interactive elements.
Don't assign JSX properties multiple times.
Don't add extra closing tags for components without children.
Use <>...</> instead of ....
Don't insert comments as text nodes.
Don't use the return value of React.render.
Make sure all dependencies are correctly specified in React hooks.
Make sure all React hooks are called from the top level of component functions.
Don't use unnecessary fragments.
Don't pass children as props.
Use semantic elements instead of role attributes in JSX.

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
**/*.{html,jsx,tsx}

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

**/*.{html,jsx,tsx}: Don't use or elements.
Don't use accessKey attribute on any HTML element.
Don't set aria-hidden="true" on focusable elements.
Don't add ARIA roles, states, and properties to elements that don't support them.
Only use the scope prop on elements.
Don't assign non-interactive ARIA roles to interactive HTML elements.
Make sure label elements have text content and are associated with an input.
Don't assign interactive ARIA roles to non-interactive HTML elements.
Don't assign tabIndex to non-interactive HTML elements.
Don't use positive integers for tabIndex property.
Don't include "image", "picture", or "photo" in img alt prop.
Don't use explicit role property that's the same as the implicit/default role.
Make static elements with click handlers use a valid role attribute.
Always include a title element for SVG elements.
Give all elements requiring alt text meaningful information for screen readers.
Make sure anchors have content that's accessible to screen readers.
Assign tabIndex to non-interactive HTML elements with aria-activedescendant.
Include all required ARIA attributes for elements with ARIA roles.
Make sure ARIA properties are valid for the element's supported roles.
Always include a type attribute for button elements.
Make elements with interactive roles and handlers focusable.
Give heading elements content that's accessible to screen readers (not hidden with aria-hidden).
Always include a lang attribute on the html element.
Always include a title attribute for iframe elements.
Accompany onClick with at least one of: onKeyUp, onKeyDown, or onKeyPress.
Accompany onMouseOver/onMouseOut with onFocus/onBlur.
Include caption tracks for audio and video elements.
Make sure all anchors are valid and navigable.
Ensure all ARIA properties (aria-*) are valid.
Use valid, non-abstract ARIA roles for elements with ARIA roles.
Use valid ARIA state and property values.
Use valid values for the autocomplete attribute on input eleme...

Files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
🧠 Learnings (9)
📚 Learning: 2025-07-18T15:05:16.146Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/fullstack-workflow.mdc:0-0
Timestamp: 2025-07-18T15:05:16.146Z
Learning: Applies to apps/web/utils/actions/*.validation.ts : Define Zod schemas for validation in dedicated files and use them for both client and server validation.

Applied to files:

  • apps/web/utils/actions/user.validation.ts
  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/utils/actions/**/*.ts : Use Zod schemas for validation on both client and server

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-07-18T17:27:58.249Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/server-actions.mdc:0-0
Timestamp: 2025-07-18T17:27:58.249Z
Learning: Applies to apps/web/utils/actions/*.validation.ts : Define input validation schemas using Zod in the corresponding `.validation.ts` file. These schemas are used by `next-safe-action` (`.schema()`) and can also be reused on the client for form validation.

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-07-20T09:00:41.968Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/security-audit.mdc:0-0
Timestamp: 2025-07-20T09:00:41.968Z
Learning: Applies to apps/web/app/api/**/*.{ts,js} : Request bodies in API routes should use Zod schemas for validation.

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Always define a Zod schema for response validation

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-07-18T15:04:57.115Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/form-handling.mdc:0-0
Timestamp: 2025-07-18T15:04:57.115Z
Learning: Applies to **/*.ts : Define validation schemas using Zod

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Make Zod schemas as specific as possible to guide LLM output

Applied to files:

  • apps/web/utils/actions/user.validation.ts
📚 Learning: 2025-07-18T15:05:16.146Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: .cursor/rules/fullstack-workflow.mdc:0-0
Timestamp: 2025-07-18T15:05:16.146Z
Learning: Applies to apps/web/components/**/*Form.tsx : Use React Hook Form with Zod resolver for form handling and validation.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
PR: elie222/inbox-zero#0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/components/**/*.tsx : Use React Hook Form with Zod validation for form handling

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx
🧬 Code graph analysis (2)
apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx (1)
apps/web/utils/actions/user.validation.ts (1)
  • saveAboutBody (3-3)
apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx (1)
apps/web/utils/actions/user.validation.ts (1)
  • saveSignatureBody (6-8)
⏰ 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: cubic · AI code reviewer
🔇 Additional comments (4)
apps/web/utils/actions/user.validation.ts (1)

1-9: LGTM! Clean validation module setup.

The Zod schemas are well-defined with appropriate constraints (2,000 chars for about, 10,000 for signature). This centralizes validation logic for reuse across client and server, aligning with the project's validation architecture.

Based on coding guidelines.

apps/web/app/(app)/[emailAccountId]/settings/SignatureSectionForm.tsx (1)

20-21: Excellent! Client-side validation now matches server constraints.

The zodResolver integration ensures the signature field is validated against the same 10,000-character limit on both client and server, providing immediate feedback to users before submission.

Based on coding guidelines.

Also applies to: 32-32

apps/web/utils/actions/user.ts (1)

12-15: LGTM! Validation schemas properly centralized.

Moving schemas to the dedicated validation module eliminates duplication and enables consistent validation across client and server. The previous concern about matching signature length constraints end-to-end is now resolved—SignatureSectionForm.tsx uses zodResolver(saveSignatureBody), enforcing the same 10,000-character limit client-side.

Based on coding guidelines.

apps/web/app/(app)/[emailAccountId]/settings/AboutSectionForm.tsx (1)

18-22: LGTM! Zod validation properly wired.

The zodResolver integration ensures client-side validation matches the server's 2,000-character limit, providing immediate user feedback and preventing invalid submissions.

Based on coding guidelines.

Also applies to: 69-69


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
Contributor

@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: 2

🧹 Nitpick comments (7)
apps/web/utils/gmail/retry.ts (1)

40-46: Use error-level for 5xx, and log a safe subset to avoid cyclic JSON issues

  • Non-rate-limit 5xx should be error, not warn. 4xx can stay warn.
  • Logging the full error object can be circular; prefer a safe subset.
-      if (!isRateLimitError) {
-        logger.warn("Non-rate limit error encountered, not retrying", {
-          error,
-          status,
-          reason,
-        });
-        throw error;
-      }
+      if (!isRateLimitError) {
+        const isServerError = typeof status === "number" && status >= 500;
+        const safe = {
+          message: errorMessage,
+          status,
+          reason,
+          attemptNumber: (error as any)?.attemptNumber,
+          retriesLeft: (error as any)?.retriesLeft,
+        };
+        if (isServerError) {
+          logger.error("Non-rate limit server error, not retrying", safe);
+        } else {
+          logger.warn("Non-rate limit client error, not retrying", safe);
+        }
+        throw error;
+      }

If processErrorsInObject already guarantees safe serialization of cyclic structures, please confirm; otherwise the above change prevents logger failures. As per coding guidelines.

apps/web/utils/outlook/subscription-manager.test.ts (1)

58-60: Tests aligned with new return shape

Adapting assertions to include changed: true is correct.

Consider adding a test for the reuse path (existing subscription valid > 24h) expecting { changed: false } to cover the new branch.

Also applies to: 81-83, 109-111

apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx (1)

101-104: Remove console usage in client component

Avoid console.* per guidelines. Either remove (since failure is optional) or use a user-facing toast if needed.

As per coding guidelines.

apps/web/utils/outlook/subscription-manager.ts (4)

31-51: Reuse existing subscription when valid: good logic; consider extracting threshold

The 24h renewal window is inline; extract to a named constant/config for clarity and reuse.

-        const renewalThresholdMs = 24 * 60 * 60 * 1000; // 24 hours
+        const RENEWAL_THRESHOLD_MS = 24 * 60 * 60 * 1000; // 24h
...
-        if (timeUntilExpiry > renewalThresholdMs) {
+        if (timeUntilExpiry > RENEWAL_THRESHOLD_MS) {

60-76: Potential race: concurrent creators may produce multiple active subscriptions

Two concurrent calls can both cancel (one fails harmlessly) and create two subscriptions; only the last write persists. Consider a coarse lock or idempotency key per account to prevent duplicate creations.

Options:

  • DB-based mutex (row lock or “in-progress” flag with TTL).
  • Single-flight in-process keyed by emailAccountId (won’t protect across instances).
  • Update DB using compare-and-set (updateMany where old id matches) and unwatch the “losing” new subscription if write fails.

Also applies to: 83-99


135-153: Return type shaping is fine; minor typing cleanup

The explicit “as { … }” cast is unnecessary with proper return typing; you can define a private type alias to avoid repetition.

-  private async getExistingSubscription() {
+  private async getExistingSubscription(): { subscriptionId: string | null; expirationDate: Date | null } {
...
-    } as {
-      subscriptionId: string | null;
-      expirationDate: Date | null;
-    };
+    };

159-161: Redundant null-check

expirationDate is typed as Date; the null-check is unreachable. Remove or change param type to reflect reality.

-    if (!subscription.expirationDate) {
-      throw new Error("Subscription missing expiration date");
-    }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d43580 and 2bbccc0.

📒 Files selected for processing (7)
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx (2 hunks)
  • apps/web/utils/actions/user.ts (1 hunks)
  • apps/web/utils/gmail/retry.ts (1 hunks)
  • apps/web/utils/mcp/integrations.ts (1 hunks)
  • apps/web/utils/outlook/subscription-manager.test.ts (3 hunks)
  • apps/web/utils/outlook/subscription-manager.ts (3 hunks)
  • version.txt (1 hunks)
🧰 Additional context used
📓 Path-based instructions (23)
apps/web/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.{ts,tsx}: Use TypeScript with strict null checks
Path aliases: Use @/ for imports from project root
Use proper error handling with try/catch blocks
Format code with Prettier
Leverage TypeScript inference for better DX

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
!{.cursor/rules/*.mdc}

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

Never place rule files in the project root, in subdirectories outside .cursor/rules, or in any other location

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • version.txt
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/form-handling.mdc)

**/*.ts: The same validation should be done in the server action too
Define validation schemas using Zod

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
**/*.{ts,tsx}

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

**/*.{ts,tsx}: Use createScopedLogger for logging in backend TypeScript files
Typically add the logger initialization at the top of the file when using createScopedLogger
Only use .with() on a logger instance within a specific function, not for a global logger

Import Prisma in the project using import prisma from "@/utils/prisma";

**/*.{ts,tsx}: Don't use TypeScript enums.
Don't use TypeScript const enum.
Don't use the TypeScript directive @ts-ignore.
Don't use primitive type aliases or misleading types.
Don't use empty type parameters in type aliases and interfaces.
Don't use any or unknown as type constraints.
Don't use implicit any type on variable declarations.
Don't let variables evolve into any type through reassignments.
Don't use non-null assertions with the ! postfix operator.
Don't misuse the non-null assertion operator (!) in TypeScript files.
Don't use user-defined types.
Use as const instead of literal types and type annotations.
Use export type for types.
Use import type for types.
Don't declare empty interfaces.
Don't merge interfaces and classes unsafely.
Don't use overload signatures that aren't next to each other.
Use the namespace keyword instead of the module keyword to declare TypeScript namespaces.
Don't use TypeScript namespaces.
Don't export imported variables.
Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.
Don't use parameter properties in class constructors.
Use either T[] or Array consistently.
Initialize each enum member value explicitly.
Make sure all enum members are literal values.

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.test.{ts,js}

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

Include security tests in your test suites to verify authentication, authorization, and error handling.

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
apps/web/utils/**

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

Create utility functions in utils/ folder for reusable logic

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
apps/web/utils/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

apps/web/utils/**/*.ts: Use lodash utilities for common operations (arrays, objects, strings)
Import specific lodash functions to minimize bundle size

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
**/*.{js,jsx,ts,tsx}

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

**/*.{js,jsx,ts,tsx}: Don't use elements in Next.js projects.
Don't use elements in Next.js projects.
Don't use namespace imports.
Don't access namespace imports dynamically.
Don't use global eval().
Don't use console.
Don't use debugger.
Don't use var.
Don't use with statements in non-strict contexts.
Don't use the arguments object.
Don't use consecutive spaces in regular expression literals.
Don't use the comma operator.
Don't use unnecessary boolean casts.
Don't use unnecessary callbacks with flatMap.
Use for...of statements instead of Array.forEach.
Don't create classes that only have static members (like a static namespace).
Don't use this and super in static contexts.
Don't use unnecessary catch clauses.
Don't use unnecessary constructors.
Don't use unnecessary continue statements.
Don't export empty modules that don't change anything.
Don't use unnecessary escape sequences in regular expression literals.
Don't use unnecessary labels.
Don't use unnecessary nested block statements.
Don't rename imports, exports, and destructured assignments to the same name.
Don't use unnecessary string or template literal concatenation.
Don't use String.raw in template literals when there are no escape sequences.
Don't use useless case statements in switch statements.
Don't use ternary operators when simpler alternatives exist.
Don't use useless this aliasing.
Don't initialize variables to undefined.
Don't use the void operators (they're not familiar).
Use arrow functions instead of function expressions.
Use Date.now() to get milliseconds since the Unix Epoch.
Use .flatMap() instead of map().flat() when possible.
Use literal property access instead of computed property access.
Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.
Use concise optional chaining instead of chained logical expressions.
Use regular expression literals instead of the RegExp constructor when possible.
Don't use number literal object member names th...

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
!pages/_document.{js,jsx,ts,tsx}

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

!pages/_document.{js,jsx,ts,tsx}: Don't import next/document outside of pages/_document.jsx in Next.js projects.
Don't import next/document outside of pages/_document.jsx in Next.js projects.

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
  • apps/web/utils/gmail/retry.ts
  • apps/web/utils/mcp/integrations.ts
  • version.txt
  • apps/web/utils/outlook/subscription-manager.ts
  • apps/web/utils/actions/user.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.{test,spec}.{js,jsx,ts,tsx}

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

**/*.{test,spec}.{js,jsx,ts,tsx}: Don't use export or module.exports in test files.
Don't use focused tests.
Don't use disabled tests.
Make sure the assertion function, like expect, is placed inside an it() function call.
Don't nest describe() blocks too deeply in test files.
Don't use focused tests.
Don't use disabled tests.
Don't use export or module.exports in test files.

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
**/*.test.{ts,tsx}

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

**/*.test.{ts,tsx}: Use Vitest (vitest) as the testing framework
Colocate tests next to the file under test (e.g., dir/format.ts with dir/format.test.ts)
In tests, mock the server-only module with vi.mock("server-only", () => ({}));
When testing code that uses Prisma, mock it with vi.mock("@/utils/prisma") and use the mock from @/utils/__mocks__/prisma
Use provided helpers for mocks: import { getEmail, getEmailAccount, getRule } from @/__tests__/helpers
Each test should be independent
Use descriptive test names
Mock external dependencies in tests
Clean up mocks between tests (e.g., vi.clearAllMocks() in beforeEach)
Avoid testing implementation details; focus on observable behavior
Do not mock the Logger

Files:

  • apps/web/utils/outlook/subscription-manager.test.ts
apps/web/utils/gmail/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/gmail-api.mdc)

Keep provider-specific implementation details isolated in the appropriate utils subfolder (e.g., 'apps/web/utils/gmail/')

Files:

  • apps/web/utils/gmail/retry.ts
apps/web/utils/actions/**/*.ts

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/utils/actions/**/*.ts: Use server actions for all mutations (create/update/delete operations)
next-safe-action provides centralized error handling
Use Zod schemas for validation on both client and server
Use revalidatePath in server actions for cache invalidation

apps/web/utils/actions/**/*.ts: Use server actions (with next-safe-action) for all mutations (create/update/delete operations); do NOT use POST API routes for mutations.
Use revalidatePath in server actions to invalidate cache after mutations.

Files:

  • apps/web/utils/actions/user.ts
apps/web/utils/actions/*.ts

📄 CodeRabbit inference engine (.cursor/rules/server-actions.mdc)

apps/web/utils/actions/*.ts: Implement all server actions using the next-safe-action library for type safety, input validation, context management, and error handling. Refer to apps/web/utils/actions/safe-action.ts for client definitions (actionClient, actionClientUser, adminActionClient).
Use actionClientUser when only authenticated user context (userId) is needed.
Use actionClient when both authenticated user context and a specific emailAccountId are needed. The emailAccountId must be bound when calling the action from the client.
Use adminActionClient for actions restricted to admin users.
Access necessary context (like userId, emailAccountId, etc.) provided by the safe action client via the ctx object in the .action() handler.
Server Actions are strictly for mutations (operations that change data, e.g., creating, updating, deleting). Do NOT use Server Actions for data fetching (GET operations). For data fetching, use dedicated GET API Routes combined with SWR Hooks.
Use SafeError for expected/handled errors within actions if needed. next-safe-action provides centralized error handling.
Use the .metadata({ name: "actionName" }) method to provide a meaningful name for monitoring. Sentry instrumentation is automatically applied via withServerActionInstrumentation within the safe action clients.
If an action modifies data displayed elsewhere, use revalidatePath or revalidateTag from next/cache within the action handler as needed.

Server action files must start with use server

Files:

  • apps/web/utils/actions/user.ts
apps/web/app/**

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

NextJS app router structure with (app) directory

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
apps/web/**/*.tsx

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.tsx: Follow tailwindcss patterns with prettier-plugin-tailwindcss
Prefer functional components with hooks
Use shadcn/ui components when available
Ensure responsive design with mobile-first approach
Follow consistent naming conventions (PascalCase for components)
Use LoadingContent component for async data
Use result?.serverError with toastError and toastSuccess
Use LoadingContent component to handle loading and error states consistently
Pass loading, error, and children props to LoadingContent

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/form-handling.mdc)

**/*.tsx: Use React Hook Form with Zod for validation
Validate form inputs before submission
Show validation errors inline next to form fields

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
apps/web/app/(app)/*/**

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
apps/web/app/(app)/*/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

If you need to use onClick in a component, that component is a client component and file must start with 'use client'

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
apps/web/app/(app)/*/**/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

If we're in a deeply nested component we will use swr to fetch via API

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
apps/web/app/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

Components with onClick must be client components with use client directive

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.{jsx,tsx}

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

**/*.{jsx,tsx}: Don't destructure props inside JSX components in Solid projects.
Don't use both children and dangerouslySetInnerHTML props on the same element.
Don't use Array index in keys.
Don't assign to React component props.
Don't define React components inside other components.
Don't use event handlers on non-interactive elements.
Don't assign JSX properties multiple times.
Don't add extra closing tags for components without children.
Use <>...</> instead of ....
Don't insert comments as text nodes.
Don't use the return value of React.render.
Make sure all dependencies are correctly specified in React hooks.
Make sure all React hooks are called from the top level of component functions.
Don't use unnecessary fragments.
Don't pass children as props.
Use semantic elements instead of role attributes in JSX.

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
**/*.{html,jsx,tsx}

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

**/*.{html,jsx,tsx}: Don't use or elements.
Don't use accessKey attribute on any HTML element.
Don't set aria-hidden="true" on focusable elements.
Don't add ARIA roles, states, and properties to elements that don't support them.
Only use the scope prop on elements.
Don't assign non-interactive ARIA roles to interactive HTML elements.
Make sure label elements have text content and are associated with an input.
Don't assign interactive ARIA roles to non-interactive HTML elements.
Don't assign tabIndex to non-interactive HTML elements.
Don't use positive integers for tabIndex property.
Don't include "image", "picture", or "photo" in img alt prop.
Don't use explicit role property that's the same as the implicit/default role.
Make static elements with click handlers use a valid role attribute.
Always include a title element for SVG elements.
Give all elements requiring alt text meaningful information for screen readers.
Make sure anchors have content that's accessible to screen readers.
Assign tabIndex to non-interactive HTML elements with aria-activedescendant.
Include all required ARIA attributes for elements with ARIA roles.
Make sure ARIA properties are valid for the element's supported roles.
Always include a type attribute for button elements.
Make elements with interactive roles and handlers focusable.
Give heading elements content that's accessible to screen readers (not hidden with aria-hidden).
Always include a lang attribute on the html element.
Always include a title attribute for iframe elements.
Accompany onClick with at least one of: onKeyUp, onKeyDown, or onKeyPress.
Accompany onMouseOver/onMouseOut with onFocus/onBlur.
Include caption tracks for audio and video elements.
Make sure all anchors are valid and navigable.
Ensure all ARIA properties (aria-*) are valid.
Use valid, non-abstract ARIA roles for elements with ARIA roles.
Use valid ARIA state and property values.
Use valid values for the autocomplete attribute on input eleme...

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx
🧬 Code graph analysis (3)
apps/web/utils/gmail/retry.ts (1)
apps/web/app/api/outlook/webhook/logger.ts (1)
  • logger (3-3)
apps/web/utils/outlook/subscription-manager.ts (3)
apps/web/utils/logger.ts (2)
  • Logger (5-5)
  • createScopedLogger (17-80)
apps/web/utils/error.ts (1)
  • captureException (63-75)
apps/web/utils/email/provider.ts (1)
  • createEmailProvider (13-29)
apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx (3)
apps/web/providers/EmailAccountProvider.tsx (1)
  • useAccount (79-89)
apps/web/components/PremiumAlert.tsx (1)
  • usePremium (14-42)
apps/web/utils/premium/index.ts (1)
  • isPremium (14-22)
⏰ 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: cubic · AI code reviewer
🔇 Additional comments (4)
version.txt (1)

1-1: Version bump looks good

No issues found.

apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingContent.tsx (1)

85-89: Premium-aware redirect after onboarding

Clean, straightforward routing based on isPremium; deps updated correctly.

Also applies to: 91-91

apps/web/utils/outlook/subscription-manager.ts (2)

20-23: Scoped logger per-instance is good

Per-instance logger with emailAccountId context is appropriate.


180-190: Factory now delegates to ensureSubscription: LGTM

Clearer contract returning expiration date or null.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@johnlowe399-blip
Copy link

2d43580

@elie222 elie222 merged commit 7d19411 into main Oct 16, 2025
14 checks passed
@elie222 elie222 deleted the feat/microsof-resub-less-often branch October 16, 2025 06:35
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