Skip to content

Upgrade packages#1068

Merged
elie222 merged 7 commits intomainfrom
staging
Dec 4, 2025
Merged

Upgrade packages#1068
elie222 merged 7 commits intomainfrom
staging

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Dec 4, 2025

Upgrade dependencies across web and CLI, switch date-fns to path-based named imports, and cap BulkUnsubscribeRowDesktop table cell width at 250px instead of 300px at ≥1550px

Updates repository dependencies and lockfile, replaces default date-fns imports with path-based named imports, removes prisma migrate deploy from the web build script, and adjusts a desktop bulk unsubscribe table cell width rule.

📍Where to Start

Start with the build script and dependency changes in package.json, then review the date-fns import pattern updates beginning at utils/date.ts.


Macroscope summarized f9484b2.

Summary by CodeRabbit

  • Chores

    • Updated dependencies across multiple packages to newer versions (AI SDKs, React/Next tooling, testing/dev tools, and type defs).
    • Removed Prisma migration step from the build process.
    • Bumped release version to v2.21.44.
  • Style

    • Adjusted table cell responsive sizing for improved display consistency.
  • Refactor

    • Internal module import styles standardized (no runtime behavior changes).

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

@vercel
Copy link

vercel bot commented Dec 4, 2025

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

Project Deployment Preview Updated (UTC)
inbox-zero Building Building Dec 4, 2025 7:16pm
inbox-zero (staging) Ready Ready Preview Dec 4, 2025 7:16pm

@socket-security
Copy link

socket-security bot commented Dec 4, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​radix-ui/​react-label@​2.1.7 ⏵ 2.1.81001006698100
Updated@​radix-ui/​react-separator@​1.1.7 ⏵ 1.1.81001006798100
Updated@​radix-ui/​react-progress@​1.1.7 ⏵ 1.1.81001006998100
Updated@​vitest/​coverage-v8@​3.2.4 ⏵ 4.0.1599 +110069 -399100
Added@​radix-ui/​react-slot@​1.2.41001006996100
Updated@​radix-ui/​react-avatar@​1.1.10 ⏵ 1.1.11991006998100
Updated@​serwist/​next@​9.2.1 ⏵ 9.2.39910072 +194 +4100
Added@​ai-sdk/​mcp@​0.0.11981007398100
Updated@​ai-sdk/​react@​2.0.76 ⏵ 2.0.106100 +110073 +198 +1100
Updated@​types/​nodemailer@​7.0.2 ⏵ 7.0.41001007690 +1100
Updatedvitest@​3.2.4 ⏵ 4.0.1597 -110079 +199100
Updated@​types/​lodash@​4.17.20 ⏵ 4.17.2110010080 +188100
Updated@​types/​node@​24.9.1 ⏵ 24.10.1100 +110081 +195100
Added@​vitest/​ui@​4.0.15991008299100
Updated@​next/​third-parties@​15.5.6 ⏵ 15.5.710010082 +199 +1100
Updated@​vercel/​analytics@​1.5.0 ⏵ 1.6.199100839270
Updated@​ai-sdk/​gateway@​2.0.0 ⏵ 2.0.1810010083 +198 +1100
Updated@​googleapis/​calendar@​12.0.0 ⏵ 14.0.0100 +110083 +190 +2100
Updated@​prisma/​adapter-pg@​7.0.0 ⏵ 7.1.01001008398100
Updated@​turbo/​gen@​2.5.8 ⏵ 2.6.2991008498 +2100
Updated@​googleapis/​gmail@​15.0.0 ⏵ 16.1.010010084 +190 +2100
Updated@​ai-sdk/​google@​2.0.23 ⏵ 2.0.4410010084 +198 +1100
Updated@​ai-sdk/​anthropic@​2.0.35 ⏵ 2.0.5310010085 +198 +1100
Updated@​ai-sdk/​openai@​2.0.53 ⏵ 2.0.7710010085 +198100
Updated@​vercel/​speed-insights@​1.2.0 ⏵ 1.3.199 +71008690 -2100
Updated@​tanstack/​react-query@​5.90.5 ⏵ 5.90.12100 +11008896 -1100
Updated@​sentry/​nextjs@​10.20.0 ⏵ 10.28.096100 +891 +196 -3100
Updated@​sanity/​client@​7.12.0 ⏵ 7.13.194 -5100100100100
Updated@​sanity/​image-url@​1.2.0 ⏵ 2.0.210010010095 +2100
Updated@​upstash/​redis@​1.35.6 ⏵ 1.35.798100100100 +1100
Updated@​ai-sdk/​amazon-bedrock@​3.0.45 ⏵ 3.0.6710010010098 +1100
Updated@​ai-sdk/​groq@​2.0.24 ⏵ 2.0.3210010010098100
Updated@​modelcontextprotocol/​sdk@​1.24.0 ⏵ 1.24.39910010099 +1100
See 3 more rows in the dashboard

View full report

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

This PR updates dependency versions across the monorepo, converts many date-fns default imports to named imports, moves the MCP client import to @ai-sdk/mcp, removes a Prisma build step, tweaks a table breakpoint, updates a marketing submodule pointer, and bumps the repo version.

Changes

Cohort / File(s) Summary
Package dependency updates
apps/unsubscriber/package.json, apps/web/package.json, package.json, packages/cli/package.json, packages/loops/package.json, packages/resend/package.json, packages/tinybird-ai-analytics/package.json, packages/tinybird/package.json
Multiple dependency and devDependency version bumps (e.g., @types/node, tsx, @ai-sdk/*, ai, fastify, React/Next, tooling). apps/web build script removed prisma migrate deploy.
Date-fns import refactoring
apps/web/app/(app)/[emailAccountId]/assistant/SetDateDropdown.tsx, apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx, apps/web/app/(app)/[emailAccountId]/stats/Stats.tsx, apps/web/app/api/reply-tracker/disable-unused-auto-draft/disable-unused-auto-drafts.ts, apps/web/app/api/resend/digest/all/route.ts, apps/web/app/api/resend/summary/all/route.ts, apps/web/app/api/resend/summary/route.ts, apps/web/app/api/user/stats/by-period/route.ts, apps/web/app/api/user/stats/sender-emails/route.ts, apps/web/components/DatePickerWithRange.tsx, apps/web/components/LegalPage.tsx, apps/web/utils/date.ts, apps/web/utils/outlook/watch.ts, apps/web/utils/unsubscribe.ts, apps/web/utils/ai/reply/reply-context-collector.ts
Replaced default imports from date-fns modules with named imports (e.g., format, subDays, subHours, subMonths, parseISO, addDays, formatDistanceToNow) with no call-site changes.
AI SDK import migration
apps/web/utils/ai/mcp/mcp-tools.ts
Switched import source for experimental_createMCPClient from "ai" to "@ai-sdk/mcp"; usage unchanged.
UI layout adjustment
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeDesktop.tsx
Removed min-[1550px]:max-w-[300px] breakpoint from a TableCell, leaving a constant max-w-[250px] with truncation.
Submodule and metadata
apps/web/app/(marketing), version.txt
Updated marketing submodule pointer and bumped version from v2.21.43 to v2.21.44.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Homogeneous date-fns import changes across many files reduce per-file reasoning.
  • Pay attention to: apps/web/package.json build script change; apps/web/utils/ai/mcp/mcp-tools.ts MCP import source; the UI tweak in BulkUnsubscribeDesktop.tsx.

Possibly related PRs

  • Upgrade packages #1067 — Similar coordinated dependency upgrades and matching code updates (MCP import, date-fns changes).
  • Update packages #858 — Overlapping dependency/version bumps and date-fns import-style conversions across the same files.
  • Update packages #381 — Related @ai-sdk and dependency version updates in apps/unsubscriber and apps/web.

Poem

🐰
I hopped through imports, tidy and spry,
Named functions found where defaults used to lie.
Packages updated, the MCP found home,
A tiny breakpoint trimmed as I roam.
Version bumped — a celebratory hop and sigh.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
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.
Title check ❓ Inconclusive The title 'Upgrade packages' is generic and vague, lacking specificity about the main changes in the changeset. Consider a more specific title that highlights the primary change, such as 'Migrate date-fns imports to named imports and upgrade dependencies' or 'Update dependencies and refactor date-fns imports'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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 staging

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: 0

🧹 Nitpick comments (4)
apps/web/app/api/user/stats/sender-emails/route.ts (1)

3-50: Named format import + minor date filter nuance

Switching to import { format } from "date-fns/format" is consistent with other files and keeps the format(d.startOfPeriod, "LLL dd, y") call unchanged.

As a small robustness tweak, consider changing the if (fromDate) / if (toDate) checks to explicit null/undefined checks (e.g., if (fromDate != null)) so that a value of 0—if ever valid in your timestamp domain—is not treated as “no filter”. Also, please confirm your date-fns version supports named imports from "date-fns/format" as used here.

apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeDesktop.tsx (1)

114-121: Slightly reduced max width for sender column

Dropping the min-[1550px]:max-w-[300px] breakpoint in favor of a constant max-w-[250px] will increase truncation on very wide screens but keeps the layout simpler and consistent. If you still see overly aggressive truncation on large desktops, consider reintroducing a wider max width only at high breakpoints.

apps/web/components/DatePickerWithRange.tsx (1)

96-107: Specify radix when using Number.parseInt for robustness

On Line 104, Number.parseInt(value) is called without a radix. While your current values are decimal day offsets, omitting the radix is against the stated guidelines and can be brittle.

Consider tightening this to something like:

const days = Number.parseInt(value, 10);
// ...
from: subDays(now, days),

or simply const days = Number(value) if you only ever expect base‑10 numbers.

apps/web/utils/date.ts (1)

73-79: Double‑check UTC labeling in formatDateForLLM

formatDateForLLM formats the provided Date with format(date, "EEEE, yyyy-MM-dd HH:mm:ss 'UTC'"). Unless callers are guaranteed to pass a Date already normalized to UTC, this will output local time while appending the string “UTC”, which can be misleading.

Consider either:

  • Converting date to UTC before formatting, or
  • Dropping the hardcoded 'UTC' suffix and letting the consumer handle timezone labeling.

This isn’t introduced by this PR but is worth verifying while you’re standardizing date handling.

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 28 files

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

📜 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 5172ed9 and 5b4fc02.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • apps/web/package.json (6 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/package.json

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

Use pnpm as the package manager

Files:

  • apps/web/package.json
apps/web/package.json

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

Don't install packages in root; install in apps/web workspace instead

Files:

  • apps/web/package.json
!(pages/_document).{jsx,tsx}

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

Don't use the next/head module in pages/_document.js on Next.js projects

Files:

  • apps/web/package.json
🧠 Learnings (5)
📚 Learning: 2025-11-25T14:42:08.869Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-11-25T14:42:08.869Z
Learning: Applies to **/*.{jsx,tsx} : Make sure all dependencies are correctly specified in React hooks

Applied to files:

  • apps/web/package.json
📚 Learning: 2025-11-25T14:38:37.508Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/prisma-enum-imports.mdc:0-0
Timestamp: 2025-11-25T14:38:37.508Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Always import Prisma enums from `@/generated/prisma/enums` instead of `@/generated/prisma/client` to avoid Next.js bundling errors in client components

Applied to files:

  • apps/web/package.json
📚 Learning: 2025-11-25T14:42:11.919Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-25T14:42:11.919Z
Learning: Applies to utils/**/*.{js,ts,jsx,tsx} : The `utils` folder contains core app logic such as Next.js Server Actions and Gmail API requests

Applied to files:

  • apps/web/package.json
📚 Learning: 2025-11-25T14:40:13.649Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-11-25T14:40:13.649Z
Learning: Applies to **/*.{tsx,ts,jsx,js} : Use Shadcn UI and Tailwind for components and styling

Applied to files:

  • apps/web/package.json
📚 Learning: 2025-11-25T14:40:15.063Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-11-25T14:40:15.063Z
Learning: Applies to **/*.{tsx,ts} : Use Shadcn UI and Tailwind for components and styling

Applied to files:

  • apps/web/package.json
⏰ 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 (3)
apps/web/package.json (3)

144-146: Verify React 19 breaking changes are addressed in the codebase.

React is upgraded to 19.2.1 and React DOM to 19.2.1 (major version bump from 18.x). React 19 introduces breaking changes such as removed propTypes and defaultProps for function components, deprecated string refs, removed legacy Context APIs, and changes to useRef and ref callbacks. Ensure that the codebase has been updated to handle these breaking changes, particularly in TypeScript ref callbacks and hook usage.


95-95: Verify ai package version compatibility with @AI-SDK modules.

The ai package is updated to 5.0.106, and multiple @ai-sdk/* packages are also updated to new versions. Ensure that version compatibility across the AI SDK ecosystem is maintained, as version mismatches can lead to runtime errors or unexpected behavior.


7-7: No action required—prisma migrate is correctly handled outside the build script.

The build script properly runs only next build. Database migrations are intentionally handled through separate deployment mechanisms: Docker containers run prisma migrate deploy on startup (via docker/scripts/start.sh and apps/web/entrypoint.sh), and AWS deployments use the DIRECT_URL environment variable configured in AWS Copilot. This separation of concerns is the correct approach—migrations should not run during the build phase but rather during container initialization or in a separate deployment step.

Likely an incorrect or invalid review comment.

"@ai-sdk/gateway": "2.0.18",
"@ai-sdk/google": "2.0.44",
"@ai-sdk/groq": "2.0.32",
"@ai-sdk/mcp": "0.0.11",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

@ai-sdk/mcp npm package versions releases

💡 Result:

Brief summary — @ai-sdk/mcp npm package:

  • Package exists and is published under the @AI-SDK scope (used by the AI SDK). [1]
  • Latest published version (most recent release) appears to be 0.0.11 (listed as released ~6 hours ago in the package index snapshot). [1]
  • The AI SDK docs reference importing from "@ai-sdk/mcp" (API: experimental_createMCPClient). [2]

Sources:
[1] Ecosyste.ms / npm package summary for @ai-sdk/mcp.
[2] AI SDK documentation referencing @ai-sdk/mcp (experimental_createMCPClient).


🏁 Script executed:

# Check the package.json file for context and comments around this dependency
cd apps/web && head -30 package.json

Repository: elie222/inbox-zero

Length of output: 1160


🏁 Script executed:

# Search for any comments or documentation about @ai-sdk/mcp version pinning
rg -i "mcp|migration" --type json --type md --type ts --type tsx apps/web/ -A 2 -B 2 | head -50

Repository: elie222/inbox-zero

Length of output: 89


🏁 Script executed:

# Search for recent commits or PRs mentioning @ai-sdk/mcp or MCP
git log --oneline --all -- apps/web/package.json | head -20

Repository: elie222/inbox-zero

Length of output: 149


🏁 Script executed:

# Search for MCP usage in the codebase to understand the context
rg "@ai-sdk/mcp|experimental_createMCPClient" --type ts --type tsx -l | head -10

Repository: elie222/inbox-zero

Length of output: 89


🏁 Script executed:

# Check if there are any CHANGELOG or documentation files explaining MCP integration
fd -e md -e txt | xargs grep -l -i "mcp\|@ai-sdk/mcp" 2>/dev/null | head -5

Repository: elie222/inbox-zero

Length of output: 44


Address the pre-release version of @ai-sdk/mcp.

@ai-sdk/mcp is pinned to version 0.0.11, which is a pre-release version marked as experimental by the AI SDK team. While this appears to be the latest available version (and intentionally updated in a recent "fix versions" commit), pre-release versions lack stability guarantees and may introduce breaking changes. Consider documenting why this pre-release version is necessary, or plan for a migration path once a stable release becomes available.

🤖 Prompt for AI Agents
In apps/web/package.json at line 24, the dependency "@ai-sdk/mcp": "0.0.11" pins
a pre-release experimental version; update the package.json and repository
metadata to either (a) document why this pre-release is required by adding a
comment or README entry referencing the feature/bugfix that necessitates 0.0.11
and its risks, or (b) change the dependency strategy to be more future-proof
(e.g., use a semver range or Git tag that can be migrated) and add an open issue
or TODO in the repo tracking migration to a stable release; ensure the
package.json change is accompanied by a short PR description referencing the
documentation or issue for traceability.

"@formkit/auto-animate": "0.9.0",
"@googleapis/calendar": "^12.0.0",
"@googleapis/gmail": "15.0.0",
"@googleapis/calendar": "^14.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Resolve version constraint inconsistency for @googleapis/calendar.

@googleapis/calendar uses a caret range ^14.0.0, while similar Google API packages use fixed versions (e.g., @googleapis/gmail at 16.1.0, @googleapis/people at 6.0.0). This inconsistency could allow unexpected minor/patch version bumps and potential compatibility issues. Align with the fixed-version pattern used elsewhere in the dependency graph.

Suggested change:

-    "@googleapis/calendar": "^14.0.0",
+    "@googleapis/calendar": "14.0.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@googleapis/calendar": "^14.0.0",
"@googleapis/calendar": "14.0.0",
🤖 Prompt for AI Agents
In apps/web/package.json at line 33, the dependency "@googleapis/calendar":
"^14.0.0" uses a caret range while other Google API packages are pinned; change
it to a fixed version (remove the caret, e.g., "14.0.0" or the specific tested
patch you want to pin) to match the project's fixed-version pattern, then
regenerate the lockfile by running your package manager install (npm/yarn/pnpm)
so the lockfile is updated.

@elie222 elie222 merged commit 83f6aa8 into main Dec 4, 2025
22 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Dec 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 31, 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.

1 participant

Comments