Skip to content

Comments

Add meeting brief onboarding#1142

Merged
elie222 merged 8 commits intomainfrom
feat/meeting-briefs-onboarding
Dec 31, 2025
Merged

Add meeting brief onboarding#1142
elie222 merged 8 commits intomainfrom
feat/meeting-briefs-onboarding

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Dec 31, 2025

User description

Add meeting briefs onboarding flow and refactor page.tsx to render BriefsOnboarding and UpcomingMeetings with enable and calendar connection actions

Introduce BriefsOnboarding for calendar connection or enabling briefs, move upcoming events and send-history into dedicated components, and gate initial load with a wrapper; bump Next.js and Serwist packages.

📍Where to Start

Start with the route composition in page.tsx, then review BriefsOnboarding in Onboarding.tsx and UpcomingMeetings in UpcomingMeetings.tsx.


Macroscope summarized c2c34f3.


Generated description

Below is a concise technical summary of the changes proposed in this PR:

graph LR
MeetingBriefsPage_("MeetingBriefsPage"):::modified
BriefsOnboarding_("BriefsOnboarding"):::added
UpcomingMeetings_("UpcomingMeetings"):::added
MEETING_BRIEFS_API_("MEETING_BRIEFS_API"):::modified
CALENDAR_API_("CALENDAR_API"):::modified
SEND_BRIEF_API_("SEND_BRIEF_API"):::modified
SendHistoryLink_("SendHistoryLink"):::added
MeetingBriefsPage_ -- "Now renders onboarding when calendars missing or briefs disabled." --> BriefsOnboarding_
MeetingBriefsPage_ -- "Now delegates event list rendering and test sends to component." --> UpcomingMeetings_
MeetingBriefsPage_ -- "Toggles enabled flag via updateMeetingBriefsEnabledAction API call." --> MEETING_BRIEFS_API_
MEETING_BRIEFS_API_ -- "Returns enabled state used to conditionally render onboarding or main view." --> MeetingBriefsPage_
UpcomingMeetings_ -- "Requests upcoming events (id, title, times, attendees) from calendar." --> CALENDAR_API_
CALENDAR_API_ -- "Returns event list consumed to render meetings and enable sends." --> UpcomingMeetings_
UpcomingMeetings_ -- "Sends full event payload (id,title,times,attendees,links) when triggered." --> SEND_BRIEF_API_
SEND_BRIEF_API_ -- "Responds with success/error so component shows toasts and resets state." --> UpcomingMeetings_
UpcomingMeetings_ -- "Adds send-history dialog link to show past briefings." --> SendHistoryLink_
SendHistoryLink_ -- "Fetches briefing history records to populate the history dialog." --> MEETING_BRIEFS_API_
MEETING_BRIEFS_API_ -- "Returns brief histories (titles, guest counts, statuses) for display." --> SendHistoryLink_
classDef added stroke:#15AA7A
classDef removed stroke:#CD5270
classDef modified stroke:#EDAC4C
linkStyle default stroke:#CBD5E1,font-size:13px
Loading

Introduce a new client-side BriefsOnboarding component to guide users through enabling meeting briefs, which conditionally renders a ConnectCalendar component when no calendars are connected, and refactor existing UI elements like UpcomingMeetings and SendHistoryLink into standalone components for better organization. Update core dependencies including next and serwist to their latest versions.

TopicDetails
Dependency Updates Update various package dependencies, including next, @next/mdx, @next/third-parties, @serwist/next, serwist, and pnpm, to their latest versions to ensure compatibility and leverage new features.
Modified files (3)
  • pnpm-lock.yaml
  • package.json
  • apps/web/package.json
Latest Contributors(2)
UserCommitDate
elie222fixesDecember 31, 2025
joshwerner001@gmail.comUse-tldts-to-parse-dom...November 25, 2025
Briefs Onboarding & UI Introduce a new client-side BriefsOnboarding component to guide users through enabling meeting briefs, which conditionally renders a ConnectCalendar component when no calendars are connected, and refactor existing UI elements like UpcomingMeetings and SendHistoryLink into standalone components for better organization.
Modified files (3)
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
Latest Contributors(1)
UserCommitDate
elie222fixesDecember 15, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@vercel
Copy link

vercel bot commented Dec 31, 2025

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

Project Deployment Review Updated (UTC)
inbox-zero Ready Ready Preview Dec 31, 2025 9:08am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds two new Meeting Briefs components (onboarding and upcoming meetings), refactors the briefs page to use them with early-return logic, and bumps several package dependency versions and the top-level package manager spec.

Changes

Cohort / File(s) Summary
Meeting Briefs UI components
apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx, apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
New client React components: BriefsOnboarding (card UI, calendar connect flow, enable action) and UpcomingMeetings (fetch upcoming events, per-event "Send test brief" with ConfirmDialog, send history dialog, loading/empty states).
Page refactor
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
Replaced inline onboarding/meetings UI with imports of the new components; added early return to render onboarding when calendar not connected; wires action status into onboarding (isEnabling).
Dependency bumps
apps/web/package.json
Updated Next/related packages: next 16.0.10 → 16.1.1, @next/mdx 16.0.10 → 16.1.1, @next/third-parties 16.0.10 → 16.1.1, @serwist/next 9.2.3 → 9.4.2, dev serwist 9.2.3 → 9.4.2.
Package manager spec
package.json
Updated top-level packageManager from pnpm@10.24.0pnpm@10.27.0.

Sequence Diagram(s)

sequenceDiagram
  %% Styling note: new/changed interactions highlighted with light green notes
  participant User
  participant Client as Frontend
  participant CalAPI as Calendar API
  participant Server as App Server
  participant DB as Database

  rect rgba(220,255,220,0.25)
    note right of Client: New components\nBriefsOnboarding & UpcomingMeetings
  end

  User->>Client: Open Briefs page
  Client->>Server: GET calendars / account metadata
  Server->>CalAPI: (if needed) fetch linked calendar events
  CalAPI-->>Server: event list
  Server-->>Client: calendars + events
  Client->>User: render UpcomingMeetings / Onboarding

  alt User clicks "Send test brief"
    User->>Client: confirm send
    Client->>Server: POST /sendBrief (eventId)
    Server->>DB: record brief send (history)
    Server->>CalAPI: (optional) fetch event details
    Server-->>Client: 200 OK / result
    Client->>User: show toast success / update history dialog
  else User connects calendar via onboarding
    User->>Client: click ConnectCalendar
    Client->>Server: OAuth/initiate connect
    Server->>CalAPI: redirect / token exchange
    CalAPI-->>Server: token
    Server->>DB: persist calendar link
    Server-->>Client: connected status
    Client->>User: render enabled onboarding footer
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • baz-reviewer
  • anakarentorosserrano-star

Poem

🐰 wiggles nose
New briefs sprout where calendars play,
Steps to connect and meetings on display.
A test brief sent with one brave click,
Hooray — the rabbit did the trick! 🥕✨

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 'Add meeting brief onboarding' directly and clearly describes the main objective of the PR—introducing a new onboarding component (BriefsOnboarding) for the meeting briefs feature.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@socket-security
Copy link

socket-security bot commented Dec 31, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​next/​third-parties@​16.0.10 ⏵ 16.1.1100 +11008299100
Updated@​next/​mdx@​16.0.10 ⏵ 16.1.110010010099100

View full report

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.

2 issues found across 6 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/app/(app)/[emailAccountId]/briefs/page.tsx">

<violation number="1" location="apps/web/app/(app)/[emailAccountId]/briefs/page.tsx:52">
P2: Add a check for `calendarsData` existence before rendering the onboarding component. Currently, if the calendars API call fails, `hasCalendarConnected` will be falsy (since it&#39;s derived from optional chaining on `calendarsData`), which will incorrectly show the onboarding screen instead of handling the error state.</violation>
</file>

<file name="apps/web/package.json">

<violation number="1" location="apps/web/package.json:130">
P2: Consider updating `@next/mdx` and `@next/third-parties` to 16.1.1 to match the new Next.js version. The `@next/*` packages are typically released alongside Next.js and keeping them in sync helps avoid potential compatibility issues.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

},
);

if (!isLoadingCalendars && !hasCalendarConnected) {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 31, 2025

Choose a reason for hiding this comment

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

P2: Add a check for calendarsData existence before rendering the onboarding component. Currently, if the calendars API call fails, hasCalendarConnected will be falsy (since it's derived from optional chaining on calendarsData), which will incorrectly show the onboarding screen instead of handling the error state.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/app/(app)/[emailAccountId]/briefs/page.tsx, line 52:

<comment>Add a check for `calendarsData` existence before rendering the onboarding component. Currently, if the calendars API call fails, `hasCalendarConnected` will be falsy (since it&#39;s derived from optional chaining on `calendarsData`), which will incorrectly show the onboarding screen instead of handling the error state.</comment>

<file context>
@@ -66,34 +49,17 @@ export default function MeetingBriefsPage() {
     },
   );
 
+  if (!isLoadingCalendars &amp;&amp; !hasCalendarConnected) {
+    return &lt;BriefsOnboarding emailAccountId={emailAccountId} /&gt;;
+  }
</file context>

✅ Addressed in c2c34f3

Copy link
Contributor

Choose a reason for hiding this comment

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

Commit c2c34f3 addressed this comment by adding explicit error handling before the onboarding check. The new code includes a separate condition that checks for error state and renders LoadingContent with error handling, preventing failed API calls from incorrectly showing the onboarding screen.

"lucide-react": "0.555.0",
"motion": "12.23.25",
"next": "16.0.10",
"next": "16.1.1",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 31, 2025

Choose a reason for hiding this comment

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

P2: Consider updating @next/mdx and @next/third-parties to 16.1.1 to match the new Next.js version. The @next/* packages are typically released alongside Next.js and keeping them in sync helps avoid potential compatibility issues.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/package.json, line 130:

<comment>Consider updating `@next/mdx` and `@next/third-parties` to 16.1.1 to match the new Next.js version. The `@next/*` packages are typically released alongside Next.js and keeping them in sync helps avoid potential compatibility issues.</comment>

<file context>
@@ -127,7 +127,7 @@
     &quot;lucide-react&quot;: &quot;0.555.0&quot;,
     &quot;motion&quot;: &quot;12.23.25&quot;,
-    &quot;next&quot;: &quot;16.0.10&quot;,
+    &quot;next&quot;: &quot;16.1.1&quot;,
     &quot;next-axiom&quot;: &quot;1.9.3&quot;,
     &quot;next-safe-action&quot;: &quot;8.0.11&quot;,
</file context>

✅ Addressed in d43cae5

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 (1)
apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx (1)

181-189: Consider extracting status badge styling.

The inline conditional className on lines 182-186 is complex and reduces maintainability. Consider using clsx or extracting to a helper function.

🔎 Proposed refactor
+const getStatusBadgeClasses = (status: string) => {
+  return status === "SENT"
+    ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"
+    : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";
+};
+
 <ItemActions>
   <span
-    className={`text-xs px-2 py-1 rounded ${
-      briefing.status === "SENT"
-        ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"
-        : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"
-    }`}
+    className={`text-xs px-2 py-1 rounded ${getStatusBadgeClasses(briefing.status)}`}
   >
     {briefing.status}
   </span>
 </ItemActions>

Alternatively, if clsx is preferred:

+import clsx from "clsx";
+
 <span
-  className={`text-xs px-2 py-1 rounded ${
-    briefing.status === "SENT"
-      ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"
-      : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"
-  }`}
+  className={clsx(
+    "text-xs px-2 py-1 rounded",
+    briefing.status === "SENT"
+      ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"
+      : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"
+  )}
 >
   {briefing.status}
 </span>
📜 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 4278c08 and 6a5661d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/package.json
  • package.json
🧰 Additional context used
📓 Path-based instructions (18)
**/*.{ts,tsx}

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

**/*.{ts,tsx}: For API GET requests to server, use the swr package
Use result?.serverError with toastError from @/components/Toast for error handling in async operations

**/*.{ts,tsx}: Use wrapper functions for Gmail message operations (get, list, batch, etc.) from @/utils/gmail/message.ts instead of direct API calls
Use wrapper functions for Gmail thread operations from @/utils/gmail/thread.ts instead of direct API calls
Use wrapper functions for Gmail label operations from @/utils/gmail/label.ts instead of direct API calls

**/*.{ts,tsx}: For early access feature flags, create hooks using the naming convention use[FeatureName]Enabled that return a boolean from useFeatureFlagEnabled("flag-key")
For A/B test variant flags, create hooks using the naming convention use[FeatureName]Variant that define variant types, use useFeatureFlagVariantKey() with type casting, and provide a default "control" fallback
Use kebab-case for PostHog feature flag keys (e.g., inbox-cleaner, pricing-options-2)
Always define types for A/B test variant flags (e.g., type PricingVariant = "control" | "variant-a" | "variant-b") and provide type safety through type casting

**/*.{ts,tsx}: Don't use primitive type aliases or misleading types
Don't use empty type parameters in type aliases and interfaces
Don't use this and super in static contexts
Don't use any or unknown as type constraints
Don't use the TypeScript directive @ts-ignore
Don't use TypeScript enums
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 TypeScript namespaces
Don't use non-null assertions with the ! postfix operator
Don't use parameter properties in class constructors
Don't use user-defined types
Use as const instead of literal types and type annotations
Use either T[] or Array<T> consistently
Initialize each enum member value explicitly
Use export type for types
Use `impo...

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/app/(app)/**/*.{ts,tsx}

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

apps/web/app/(app)/**/*.{ts,tsx}: Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder
If we're in a deeply nested component we will use swr to fetch via API
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]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{ts,tsx,js,jsx}

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

Always import Prisma enums from @/generated/prisma/enums instead of @/generated/prisma/client to avoid Next.js bundling errors in client components

Import Prisma using the project's centralized utility: import prisma from '@/utils/prisma'

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/**/*.{ts,tsx}

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

Import specific lodash functions rather than entire lodash library to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

apps/web/**/*.{ts,tsx}: Use TypeScript with strict null checks
Do not export types/interfaces that are only used within the same file. Export later if needed

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{tsx,ts}

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

**/*.{tsx,ts}: Use Shadcn UI and Tailwind for components and styling
Use next/image package for images
For API GET requests to server, use the swr package with hooks like useSWR to fetch data
For text inputs, use the Input component with registerProps for form integration and error handling

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{tsx,ts,css}

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

Implement responsive design with Tailwind CSS using a mobile-first approach

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.tsx

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

**/*.tsx: Use the LoadingContent component to handle loading states instead of manual loading state management
For text areas, use the Input component with type='text', autosizeTextarea prop set to true, and registerProps for form integration

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{js,jsx,ts,tsx}

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

**/*.{js,jsx,ts,tsx}: 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
Don't use distracting elements like <marquee> or <blink>
Only use the scope prop on <th> 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
Use semantic elements instead of role attributes in JSX
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 AR...

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{jsx,tsx}

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

**/*.{jsx,tsx}: Don't use unnecessary fragments
Don't pass children as props
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 forget key props in iterators and collection literals
Don't define React components inside other components
Don't use event handlers on non-interactive elements
Don't assign to React component props
Don't use both children and dangerouslySetInnerHTML props on the same element
Don't use dangerous JSX props
Don't use Array index in keys
Don't insert comments as text nodes
Don't assign JSX properties multiple times
Don't add extra closing tags for components without children
Use <>...</> instead of <Fragment>...</Fragment>
Watch out for possible "wrong" semicolons inside JSX elements
Make sure void (self-closing) elements don't have children
Don't use target="_blank" without rel="noopener"
Don't use <img> elements in Next.js projects
Don't use <head> elements in Next.js projects

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
!(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/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/package.json
  • package.json
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/*.{js,ts,jsx,tsx}

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

**/*.{js,ts,jsx,tsx}: Use lodash utilities for common operations (arrays, objects, strings)
Import specific lodash functions to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/**/*.{ts,tsx,js,jsx}

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

apps/web/**/*.{ts,tsx,js,jsx}: Use @/ path aliases for imports from project root
Prefer self-documenting code over comments; use descriptive variable and function names instead of explaining intent with comments
Add helper functions to the bottom of files, not the top
All imports go at the top of files, no mid-file dynamic imports

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/app/**/*.{ts,tsx}

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

Follow NextJS app router structure with (app) directory

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/**/*.{tsx,jsx}

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

apps/web/**/*.{tsx,jsx}: Follow tailwindcss patterns with prettier-plugin-tailwindcss for class sorting
Prefer functional components with hooks in React
Use shadcn/ui components when available
Ensure responsive design with mobile-first approach in components
Follow consistent naming conventions using PascalCase for components
Use LoadingContent component for async data with loading and error states
Use React Hook Form with Zod validation for form handling
Use result?.serverError with toastError and toastSuccess for error handling in forms

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
apps/web/**/*.{ts,tsx,js,jsx,json,css}

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

Format code with Prettier

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx
  • apps/web/package.json
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
**/package.json

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

Use pnpm as the package manager

Files:

  • apps/web/package.json
  • 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
apps/web/**/*.{example,ts,json}

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

Add environment variables to .env.example, env.ts, and turbo.json

Files:

  • apps/web/package.json
🧠 Learnings (12)
📚 Learning: 2025-07-08T13:14:07.449Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 537
File: apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx:30-34
Timestamp: 2025-07-08T13:14:07.449Z
Learning: The clean onboarding page in apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx is intentionally Gmail-specific and should show an error for non-Google email accounts rather than attempting to support multiple providers.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Main Next.js application is located in `apps/web`

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
📚 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 `next/image` package for images

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 `next/image` package for images

Applied to files:

  • apps/web/package.json
📚 Learning: 2025-11-25T14:37:45.660Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/installing-packages.mdc:0-0
Timestamp: 2025-11-25T14:37:45.660Z
Learning: Applies to **/package.json : Use `pnpm` as the package manager

Applied to files:

  • package.json
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Use Turborepo with pnpm workspaces for project dependency management

Applied to files:

  • package.json
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Components with `onClick` handlers must be client components marked with the `use client` directive

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-11-25T14:38:18.874Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:18.874Z
Learning: Applies to apps/web/app/(app)/**/*.tsx : If you need to use `onClick` in a component, that component must be a client component and file must start with `use client` directive

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-11-25T14:38:23.265Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:23.265Z
Learning: Applies to apps/web/app/(app)/**/*.{ts,tsx} : If you need to use `onClick` in a component, that component is a client component and file must start with `use client`

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 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/app/(app)/[emailAccountId]/briefs/page.tsx
🧬 Code graph analysis (2)
apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx (5)
apps/web/utils/actions/meeting-briefs.ts (1)
  • sendBriefAction (40-94)
apps/web/components/Typography.tsx (1)
  • TypographyH3 (125-125)
apps/web/components/LoadingContent.tsx (1)
  • LoadingContent (13-31)
apps/web/components/ui/item.tsx (7)
  • Item (183-183)
  • ItemMedia (184-184)
  • ItemContent (185-185)
  • ItemTitle (189-189)
  • ItemGroup (187-187)
  • ItemDescription (190-190)
  • ItemActions (186-186)
apps/web/hooks/useMeetingBriefs.ts (1)
  • useMeetingBriefsHistory (9-13)
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx (1)
apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx (1)
  • BriefsOnboarding (20-74)
⏰ 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). (3)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Macroscope - Correctness Check
  • GitHub Check: test
🔇 Additional comments (5)
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx (1)

52-54: LGTM! Clean early-return pattern for onboarding.

The conditional rendering logic correctly shows the onboarding component when no calendar is connected, providing a clear user flow.

apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx (1)

20-74: LGTM! Well-structured onboarding component.

The component follows best practices with:

  • Clean functional component structure
  • Proper TypeScript typing
  • Mobile-first responsive design
  • Good reuse of existing components (IconCircle)
  • Clear visual hierarchy with Shadcn UI components
apps/web/app/(app)/[emailAccountId]/briefs/UpcomingMeetings.tsx (2)

38-75: LGTM! Proper hook usage and error handling.

The component correctly:

  • Uses hooks at the top level
  • Implements error handling with result?.serverError and toastError as per guidelines
  • Properly types the event parameter with NonNullable
  • Manages loading state with sendingEventId
  • Includes correct useCallback dependencies

77-134: LGTM! Well-structured UI with proper loading states.

The component correctly uses LoadingContent as per guidelines and provides appropriate empty states and loading indicators. The ConfirmDialog adds good UX for the send action.

package.json (1)

28-28: pnpm@10.27.0 is a valid, stable release and is the latest available version as of December 2025. The version update from 10.24.0 to 10.27.0 is a routine minor release. This aligns with the project's coding guidelines to use pnpm as the package manager.

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

♻️ Duplicate comments (1)
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx (1)

50-59: Add guard for calendarsData existence before rendering onboarding.

If the useCalendars() call completes without loading or error but calendarsData is undefined, hasCalendarConnected will be falsy (due to optional chaining at line 24-25), causing the onboarding component to render incorrectly instead of handling the missing data state.

🔎 Recommended fix
- if (!hasCalendarConnected || !data?.enabled) {
+ if (calendarsData && (!hasCalendarConnected || !data?.enabled)) {
    return (
      <BriefsOnboarding
        emailAccountId={emailAccountId}
        hasCalendarConnected={hasCalendarConnected}
        onEnable={() => execute({ enabled: true })}
        isEnabling={status === "executing"}
      />
    );
  }
📜 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 6a5661d and c2c34f3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/package.json
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{ts,tsx}

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

**/*.{ts,tsx}: For API GET requests to server, use the swr package
Use result?.serverError with toastError from @/components/Toast for error handling in async operations

**/*.{ts,tsx}: Use wrapper functions for Gmail message operations (get, list, batch, etc.) from @/utils/gmail/message.ts instead of direct API calls
Use wrapper functions for Gmail thread operations from @/utils/gmail/thread.ts instead of direct API calls
Use wrapper functions for Gmail label operations from @/utils/gmail/label.ts instead of direct API calls

**/*.{ts,tsx}: For early access feature flags, create hooks using the naming convention use[FeatureName]Enabled that return a boolean from useFeatureFlagEnabled("flag-key")
For A/B test variant flags, create hooks using the naming convention use[FeatureName]Variant that define variant types, use useFeatureFlagVariantKey() with type casting, and provide a default "control" fallback
Use kebab-case for PostHog feature flag keys (e.g., inbox-cleaner, pricing-options-2)
Always define types for A/B test variant flags (e.g., type PricingVariant = "control" | "variant-a" | "variant-b") and provide type safety through type casting

**/*.{ts,tsx}: Don't use primitive type aliases or misleading types
Don't use empty type parameters in type aliases and interfaces
Don't use this and super in static contexts
Don't use any or unknown as type constraints
Don't use the TypeScript directive @ts-ignore
Don't use TypeScript enums
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 TypeScript namespaces
Don't use non-null assertions with the ! postfix operator
Don't use parameter properties in class constructors
Don't use user-defined types
Use as const instead of literal types and type annotations
Use either T[] or Array<T> consistently
Initialize each enum member value explicitly
Use export type for types
Use `impo...

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/app/(app)/**/*.{ts,tsx}

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

apps/web/app/(app)/**/*.{ts,tsx}: Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder
If we're in a deeply nested component we will use swr to fetch via API
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]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{ts,tsx,js,jsx}

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

Always import Prisma enums from @/generated/prisma/enums instead of @/generated/prisma/client to avoid Next.js bundling errors in client components

Import Prisma using the project's centralized utility: import prisma from '@/utils/prisma'

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/**/*.{ts,tsx}

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

Import specific lodash functions rather than entire lodash library to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

apps/web/**/*.{ts,tsx}: Use TypeScript with strict null checks
Do not export types/interfaces that are only used within the same file. Export later if needed

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{tsx,ts}

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

**/*.{tsx,ts}: Use Shadcn UI and Tailwind for components and styling
Use next/image package for images
For API GET requests to server, use the swr package with hooks like useSWR to fetch data
For text inputs, use the Input component with registerProps for form integration and error handling

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{tsx,ts,css}

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

Implement responsive design with Tailwind CSS using a mobile-first approach

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.tsx

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

**/*.tsx: Use the LoadingContent component to handle loading states instead of manual loading state management
For text areas, use the Input component with type='text', autosizeTextarea prop set to true, and registerProps for form integration

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{js,jsx,ts,tsx}

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

**/*.{js,jsx,ts,tsx}: 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
Don't use distracting elements like <marquee> or <blink>
Only use the scope prop on <th> 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
Use semantic elements instead of role attributes in JSX
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 AR...

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{jsx,tsx}

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

**/*.{jsx,tsx}: Don't use unnecessary fragments
Don't pass children as props
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 forget key props in iterators and collection literals
Don't define React components inside other components
Don't use event handlers on non-interactive elements
Don't assign to React component props
Don't use both children and dangerouslySetInnerHTML props on the same element
Don't use dangerous JSX props
Don't use Array index in keys
Don't insert comments as text nodes
Don't assign JSX properties multiple times
Don't add extra closing tags for components without children
Use <>...</> instead of <Fragment>...</Fragment>
Watch out for possible "wrong" semicolons inside JSX elements
Make sure void (self-closing) elements don't have children
Don't use target="_blank" without rel="noopener"
Don't use <img> elements in Next.js projects
Don't use <head> elements in Next.js projects

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
!(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/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
**/*.{js,ts,jsx,tsx}

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

**/*.{js,ts,jsx,tsx}: Use lodash utilities for common operations (arrays, objects, strings)
Import specific lodash functions to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/**/*.{ts,tsx,js,jsx}

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

apps/web/**/*.{ts,tsx,js,jsx}: Use @/ path aliases for imports from project root
Prefer self-documenting code over comments; use descriptive variable and function names instead of explaining intent with comments
Add helper functions to the bottom of files, not the top
All imports go at the top of files, no mid-file dynamic imports

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/app/**/*.{ts,tsx}

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

Follow NextJS app router structure with (app) directory

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/**/*.{tsx,jsx}

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

apps/web/**/*.{tsx,jsx}: Follow tailwindcss patterns with prettier-plugin-tailwindcss for class sorting
Prefer functional components with hooks in React
Use shadcn/ui components when available
Ensure responsive design with mobile-first approach in components
Follow consistent naming conventions using PascalCase for components
Use LoadingContent component for async data with loading and error states
Use React Hook Form with Zod validation for form handling
Use result?.serverError with toastError and toastSuccess for error handling in forms

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
apps/web/**/*.{ts,tsx,js,jsx,json,css}

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

Format code with Prettier

Files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
🧠 Learnings (5)
📚 Learning: 2025-07-08T13:14:07.449Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 537
File: apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx:30-34
Timestamp: 2025-07-08T13:14:07.449Z
Learning: The clean onboarding page in apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx is intentionally Gmail-specific and should show an error for non-Google email accounts rather than attempting to support multiple providers.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
  • apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx
📚 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 **/*.{js,jsx,ts,tsx} : Don't have unused imports

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-11-25T14:36:36.276Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/data-fetching.mdc:0-0
Timestamp: 2025-11-25T14:36:36.276Z
Learning: Applies to **/*.{ts,tsx} : Import error and success toast utilities from '@/components/Toast' for displaying notifications

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Components with `onClick` handlers must be client components marked with the `use client` directive

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
📚 Learning: 2025-12-21T12:21:37.794Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-12-21T12:21:37.794Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Use LoadingContent component for async data with loading and error states

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/briefs/page.tsx
🧬 Code graph analysis (1)
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx (2)
apps/web/components/LoadingContent.tsx (1)
  • LoadingContent (13-31)
apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx (1)
  • BriefsOnboarding (38-117)
⏰ 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). (4)
  • GitHub Check: Baz Reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: test
  • GitHub Check: Macroscope - Correctness Check
🔇 Additional comments (2)
apps/web/app/(app)/[emailAccountId]/briefs/page.tsx (1)

40-48: LGTM: Loading and error states handled correctly.

The early return properly wraps the loading and error states in the PageWrapper with LoadingContent component, following the project's established patterns.

apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx (1)

97-113: LGTM: Conditional logic handles both calendar states correctly.

The component properly handles both the connected state (showing the enable button with loading state) and the unconnected state (showing the ConnectCalendar component with appropriate return path).

Comment on lines +3 to +36
import {
Card,
CardContent,
CardHeader,
CardFooter,
CardTitle,
CardDescription,
} from "@/components/ui/card";
import {
SectionHeader,
SectionDescription,
MessageText,
} from "@/components/Typography";
import { ConnectCalendar } from "@/app/(app)/[emailAccountId]/calendars/ConnectCalendar";
import { IconCircle } from "@/app/(app)/[emailAccountId]/onboarding/IconCircle";
import {
User,
Mail,
Lightbulb,
UserIcon,
MailIcon,
LightbulbIcon,
InboxIcon,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Item,
ItemActions,
ItemContent,
ItemDescription,
ItemGroup,
ItemMedia,
ItemTitle,
} from "@/components/ui/item";
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

Remove unused imports.

Several imports are unused and should be removed to comply with the project's coding guidelines:

  • SectionHeader (line 12)
  • SectionDescription (line 13)
  • IconCircle (line 17)
  • User, Mail, Lightbulb (lines 19-21) — the *Icon variants are used instead
  • InboxIcon (line 25)
🔎 Proposed fix
 import {
   Card,
   CardContent,
   CardHeader,
   CardFooter,
   CardTitle,
   CardDescription,
 } from "@/components/ui/card";
 import {
-  SectionHeader,
-  SectionDescription,
   MessageText,
 } from "@/components/Typography";
 import { ConnectCalendar } from "@/app/(app)/[emailAccountId]/calendars/ConnectCalendar";
-import { IconCircle } from "@/app/(app)/[emailAccountId]/onboarding/IconCircle";
 import {
-  User,
-  Mail,
-  Lightbulb,
   UserIcon,
   MailIcon,
   LightbulbIcon,
-  InboxIcon,
 } from "lucide-react";
🤖 Prompt for AI Agents
In apps/web/app/(app)/[emailAccountId]/briefs/Onboarding.tsx around lines 3 to
36, there are several unused imports listed in the review (SectionHeader,
SectionDescription, IconCircle, User, Mail, Lightbulb, InboxIcon); remove those
unused named imports from their respective import statements so only the
actually used symbols remain (keep the *Icon variants and other used components
like Card, Button, Item pieces and ConnectCalendar), update the import lines to
a minimal set and run a quick lint/type check to ensure no other references
remain.

@elie222 elie222 merged commit ffaf603 into main Dec 31, 2025
33 checks passed
@elie222 elie222 deleted the feat/meeting-briefs-onboarding branch December 31, 2025 09:21
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