Skip to content

Imrpove mobile#929

Merged
elie222 merged 4 commits intomainfrom
feat/improve-mobile
Nov 8, 2025
Merged

Imrpove mobile#929
elie222 merged 4 commits intomainfrom
feat/improve-mobile

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Nov 8, 2025

Summary by CodeRabbit

  • New Features

    • Added Calendars navigation option
  • Bug Fixes

    • Fixed image alt text for accuracy
  • Improvements

    • Enhanced mobile responsiveness across assistant, onboarding, and admin sections
    • Improved layout spacing and sizing for better readability on all devices
    • Refined page structure and navigation design
    • Disabled unsupported action options in onboarding workflows
  • Removed Features

    • Removed Compose page and Cold Email navigation entry
  • Chores

    • Version updated to v2.18.7

@vercel
Copy link

vercel bot commented Nov 8, 2025

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

Project Deployment Preview Updated (UTC)
inbox-zero Ready Ready Preview Nov 8, 2025 5:13pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 8, 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

This PR introduces mobile-responsive design improvements, refactors sidebar state management using a useSidebar hook for desktop/mobile awareness, restructures the Rules component to remove size constraints and improve responsiveness, replaces TopSection components with PageWrapper/PageHeader across multiple pages, and removes the compose page entirely. Additionally, it disables certain onboarding actions and updates navigation items.

Changes

Cohort / File(s) Summary
Mobile-aware sidebar state management
apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx, apps/web/components/SidebarRight.tsx
Updated to use useSidebar hook, detecting mobile via isMobile and managing separate desktop/mobile open states (openMobile) for proper sidebar behavior across viewport sizes.
Assistant page responsive design
apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx, apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx, apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
Applied responsive visibility and layout adjustments: AvailableActionsPanel hidden on small screens, Rules component removes size prop and restructures columns/padding for responsiveness, RulesPromptNew changes from horizontal to vertical layout on small screens.
Onboarding page responsive updates
apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx, apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx, apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx, apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
Updated responsive padding, text sizing, and spacing; disabled specific onboarding actions (moved\_folder\_delayed for Microsoft, label\_archive\_delayed for Google); updated alt text and typography spacing.
Layout component refactoring
apps/web/app/(app)/[emailAccountId]/usage/page.tsx, apps/web/app/(app)/admin/page.tsx, apps/web/app/(app)/license/page.tsx
Replaced TopSection with PageWrapper and PageHeader components for consistent page structure and responsive layout across admin, usage, and license pages.
Navigation and header updates
apps/web/components/NavBottom.tsx, apps/web/components/PageHeader.tsx
Removed Cold Email blocker link and added Calendars; updated PageHeader with responsive description layout and adjusted button spacing.
Page removal and version update
apps/web/app/(app)/[emailAccountId]/compose/page.tsx, version.txt
Removed entire ComposePage component; bumped version from v2.18.6 to v2.18.7.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Rules.tsx: Substantial restructuring with layout changes across headers, cells, and ActionBadges; verify responsive behavior and column alignment at all breakpoints.
  • AIChatButton.tsx & SidebarRight.tsx: Mobile state management logic using useSidebar—ensure isMobile and openMobile checks work correctly across all screen sizes.
  • compose/page.tsx: Complete page removal requires confirming no orphaned routes or dependencies.
  • PageWrapper/PageHeader adoption: Review consistency of the new layout pattern across admin, usage, and license pages.

Possibly related PRs

Poem

🐰 Responsive whiskers in the wind,
Mobile sidebars, screens rescind,
Rules reshaped in layouts new,
Pages wrapped in patterns true,
Version bumps and actions thinned,
From v2.18.6, fresh begin!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Imrpove mobile' contains a typo ('Imrpove' should be 'Improve') and is vague. While it references the main direction of changes (mobile improvements), it doesn't convey specific meaningful information about what mobile aspects were improved. Correct the typo and provide a more specific title describing the key mobile improvements, such as 'Improve mobile responsiveness across assistant and onboarding pages' or 'Add responsive design improvements for mobile screens'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/improve-mobile

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.

@elie222 elie222 changed the base branch from main to feat/logger-improvement November 8, 2025 16:38
@elie222 elie222 changed the base branch from feat/logger-improvement to main November 8, 2025 16:41
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.

3 issues found across 12 files

Prompt for AI agents (all 3 issues)

Understand the root cause of the following 3 issues and fix them.


<file name="apps/web/components/PageHeader.tsx">

<violation number="1" location="apps/web/components/PageHeader.tsx:27">
Setting this subheading to `hidden` removes the description for mobile users, so the header loses its descriptive text on small screens. Please keep the description visible below `sm`.</violation>
</file>

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

<violation number="1" location="apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx:36">
Adding `hidden sm:block` hides the AvailableActionsPanel for all small-screen users, removing their only view of the available actions list. Please keep it visible on mobile to avoid this regression.</violation>
</file>

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

<violation number="1" location="apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx:15">
Routing mobile clicks through setOpenMobile means `state` never receives &quot;chat-sidebar&quot;, so components like CrispChat that check `state.includes(&quot;chat-sidebar&quot;)` never see the chat as open and keep the Crisp widget visible. Please update the handler so `setOpen` still runs when the chat opens on mobile.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

variant="outline"
onClick={() => setOpen((arr) => [...arr, "chat-sidebar"])}
onClick={() => {
const setter = isMobile ? setOpenMobile : setOpen;
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 8, 2025

Choose a reason for hiding this comment

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

Routing mobile clicks through setOpenMobile means state never receives "chat-sidebar", so components like CrispChat that check state.includes("chat-sidebar") never see the chat as open and keep the Crisp widget visible. Please update the handler so setOpen still runs when the chat opens on mobile.

Prompt for AI agents
Address the following comment on apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx at line 15:

<comment>Routing mobile clicks through setOpenMobile means `state` never receives &quot;chat-sidebar&quot;, so components like CrispChat that check `state.includes(&quot;chat-sidebar&quot;)` never see the chat as open and keep the Crisp widget visible. Please update the handler so `setOpen` still runs when the chat opens on mobile.</comment>

<file context>
@@ -5,13 +5,16 @@ import { useSidebar } from &quot;@/components/ui/sidebar&quot;;
       variant=&quot;outline&quot;
-      onClick={() =&gt; setOpen((arr) =&gt; [...arr, &quot;chat-sidebar&quot;])}
+      onClick={() =&gt; {
+        const setter = isMobile ? setOpenMobile : setOpen;
+        setter((arr) =&gt; [...arr, &quot;chat-sidebar&quot;]);
+      }}
</file context>

✅ Addressed in c76ec8e

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

Caution

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

⚠️ Outside diff range comments (1)
apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx (1)

259-272: Fix inconsistency: delayed action options commented in OnboardingCategories.tsx but active in CategoriesSetup.tsx.

The delayed actions move_folder_delayed and label_archive_delayed are:

  • Commented out in OnboardingCategories.tsx (lines 259–261, 270–272)
  • Still active in CategoriesSetup.tsx (lines 233, 244)
  • Fully implemented in backend (rule.ts, rule.validation.ts)

Either uncomment these options in OnboardingCategories.tsx or remove them from CategoriesSetup.tsx to maintain consistency across the onboarding flow. The current state creates a confusing user experience where the same actions are available in one flow but not the other.

♻️ Duplicate comments (2)
apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx (1)

36-36: Mobile users lose access to available actions list.

This change hides the AvailableActionsPanel on small screens, removing mobile users' view of the available actions list. This concern has already been raised in a previous review.

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

27-29: Description hidden on mobile removes context for mobile users.

The hidden sm:block class on PageSubHeading means mobile users won't see page descriptions at all, even when pages provide meaningful descriptions. This reduces discoverability and context on mobile devices.

Consider keeping the description visible on all screen sizes, or use a responsive text size adjustment instead of hiding it entirely.

-        <PageSubHeading className="hidden sm:block">
+        <PageSubHeading className="text-sm sm:text-base">
           {description}
         </PageSubHeading>
🧹 Nitpick comments (2)
apps/web/app/(app)/[emailAccountId]/usage/page.tsx (1)

58-65: Consider adding a meaningful description for desktop users.

While the description is hidden on mobile devices, desktop users would benefit from seeing context. Consider adding a description like: "View your API usage and unsubscribe credits" instead of an empty string.

       <PageHeader
         title={
           isOwnAccount
             ? "Credits and Usage"
             : `Credits and Usage for ${emailAccount.name || emailAccount.email}`
         }
-        description=""
+        description="View your API usage and unsubscribe credits"
       />
apps/web/app/(app)/license/page.tsx (1)

25-40: Consistent page structure, but consider adding a description.

The migration to PageWrapper/PageHeader maintains consistency with other pages. However, the empty description="" on Line 26 misses an opportunity to provide context for desktop users.

Consider adding a meaningful description:

-      <PageHeader title="Activate your license" description="" />
+      <PageHeader title="Activate your license" description="Enter your license key to activate premium features" />
📜 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 0e940c0 and d468051.

📒 Files selected for processing (16)
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx (1 hunks)
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx (1 hunks)
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx (4 hunks)
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx (2 hunks)
  • apps/web/app/(app)/[emailAccountId]/compose/page.tsx (0 hunks)
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx (3 hunks)
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx (1 hunks)
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx (1 hunks)
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx (2 hunks)
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx (2 hunks)
  • apps/web/app/(app)/admin/page.tsx (3 hunks)
  • apps/web/app/(app)/license/page.tsx (3 hunks)
  • apps/web/components/NavBottom.tsx (2 hunks)
  • apps/web/components/PageHeader.tsx (2 hunks)
  • apps/web/components/SidebarRight.tsx (1 hunks)
  • version.txt (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/web/app/(app)/[emailAccountId]/compose/page.tsx
🧰 Additional context used
📓 Path-based instructions (16)
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/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.tsx
apps/web/app/**

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

NextJS app router structure with (app) directory

Files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.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/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.tsx
  • version.txt
**/*.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.tsx
**/*.{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/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
**/*.{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/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.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/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.tsx
  • version.txt
**/*.{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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.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/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/license/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
  • apps/web/components/NavBottom.tsx
apps/web/components/**/*.tsx

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

Use React Hook Form with Zod validation for form handling

Use the LoadingContent component to handle loading and error states consistently in data-fetching components.

Use PascalCase for components (e.g. components/Button.tsx)

Files:

  • apps/web/components/SidebarRight.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/components/NavBottom.tsx
apps/web/app/(app)/*/page.tsx

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

apps/web/app/(app)/*/page.tsx: Create new pages at: apps/web/app/(app)/PAGE_NAME/page.tsx
Pages are Server components so you can load data into them directly

apps/web/app/(app)/*/page.tsx: Create new pages at: apps/web/app/(app)/PAGE_NAME/page.tsx
Pages are Server components for direct data loading

Files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/license/page.tsx
🧠 Learnings (42)
📓 Common learnings
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/**/*.tsx : Ensure responsive design with mobile-first approach
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-07-19T17:50:22.078Z
Learning: Applies to components/**/*.tsx : Implement responsive design with Tailwind CSS using a mobile-first approach
📚 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]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-07-18T15:05:34.899Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/gmail-api.mdc:0-0
Timestamp: 2025-07-18T15:05:34.899Z
Learning: Applies to apps/web/utils/gmail/**/*.ts : Keep provider-specific implementation details isolated in the appropriate utils subfolder (e.g., 'apps/web/utils/gmail/')

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/{ai,llms}/**/*.{ts,tsx} : Keep related AI functions co-located and extract common patterns into utilities; document complex AI logic with clear comments

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCategories.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepCustomRules.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/**/*.tsx : Ensure responsive design with mobile-first approach

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-07-19T17:50:22.078Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-07-19T17:50:22.078Z
Learning: Applies to components/**/*.tsx : Implement responsive design with Tailwind CSS using a mobile-first approach

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/components/SidebarRight.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Remove excessive whitespace and truncate long inputs in prompts

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : System prompt should define the LLM's role and task specifications

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : User prompt should contain the actual data and context

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Keep system prompts and user prompts separate

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : LLM feature functions should follow the provided TypeScript pattern (separate system/user prompts, use createGenerateObject, Zod schema validation, early validation, return result.object)

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Use XML-like tags to structure data in prompts

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/AvailableActionsPanel.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
  • apps/web/components/PageHeader.tsx
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-20T09:00:16.505Z
Learning: Applies to apps/web/app/(app)/*/ : Components for the page are either in `page.tsx` or in the `apps/web/app/(app)/PAGE_NAME` folder

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-18T15:07:00.269Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-07-18T15:07:00.269Z
Learning: Applies to apps/web/app/(app)/*/** : Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-20T09:00:16.505Z
Learning: Applies to apps/web/app/(app)/*/page.tsx : Create new pages at: `apps/web/app/(app)/PAGE_NAME/page.tsx`

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-18T15:07:00.269Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-07-18T15:07:00.269Z
Learning: Applies to apps/web/app/(app)/*/page.tsx : Create new pages at: apps/web/app/(app)/PAGE_NAME/page.tsx

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-20T09:00:16.505Z
Learning: Applies to apps/web/app/(app)/*/page.tsx : Pages are Server components for direct data loading

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-18T15:07:00.269Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-07-18T15:07:00.269Z
Learning: Applies to apps/web/app/(app)/*/page.tsx : Pages are Server components so you can load data into them directly

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-18T17:27:58.249Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/server-actions.mdc:0-0
Timestamp: 2025-07-18T17:27:58.249Z
Learning: Applies to apps/web/utils/actions/*.ts : Use `adminActionClient` for actions restricted to admin users.

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
📚 Learning: 2025-07-19T17:50:28.270Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-19T17:50:28.270Z
Learning: The `utils` folder also contains core app logic such as Next.js Server Actions and Gmail API requests.

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
📚 Learning: 2025-09-20T18:24:34.280Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-09-20T18:24:34.280Z
Learning: Applies to **/*.test.{ts,tsx} : Use provided helpers for mocks: import `{ getEmail, getEmailAccount, getRule }` from `@/__tests__/helpers`

Applied to files:

  • apps/web/app/(app)/admin/page.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/**/*.tsx : Follow consistent naming conventions (PascalCase for components)

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
📚 Learning: 2025-07-20T09:03:06.318Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-07-20T09:03:06.318Z
Learning: Applies to **/*.{jsx,tsx} : Use semantic elements instead of role attributes in JSX.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-20T09:00:16.505Z
Learning: Applies to apps/web/app/**/*.tsx : Components with `onClick` must be client components with `use client` directive

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Define clear interfaces for complex input/output structures in LLM features

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/ai/**/*.{ts,tsx} : Format prompt data consistently across similar functions

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-20T09:00:16.505Z
Learning: Applies to apps/web/components/**/*.tsx : Use PascalCase for components (e.g. `components/Button.tsx`)

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx
📚 Learning: 2025-09-17T22:05:28.646Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/llm.mdc:0-0
Timestamp: 2025-09-17T22:05:28.646Z
Learning: Applies to apps/web/utils/usage.ts : Implement usage tracking and monitoring in apps/web/utils/usage.ts

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/app/api/**/route.ts : Use `withEmailAccount` for email-account-level operations

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-08-10T22:03:30.507Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 667
File: apps/web/app/(app)/[emailAccountId]/onboarding/page.tsx:18-25
Timestamp: 2025-08-10T22:03:30.507Z
Learning: In Next.js 15, both `params` and `searchParams` passed to page components in the App Router are Promises that need to be awaited. They should be typed as `Promise<{...}>` and accessed using `await` in server components or React's `use()` hook in client components. This is different from Next.js 14 where they were plain objects.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-06-05T09:49:12.168Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 485
File: apps/web/app/(landing)/login/page.tsx:41-43
Timestamp: 2025-06-05T09:49:12.168Z
Learning: In Next.js App Router, components that use the `useSearchParams` hook require a Suspense boundary to handle the asynchronous nature of search parameter access. The Suspense wrapper is necessary and should not be removed when a component uses useSearchParams.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-20T09:00:41.968Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 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} : All Prisma queries in API routes must include user/account filtering (e.g., emailAccountId or userId in WHERE clauses) to prevent unauthorized data access.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/usage/page.tsx
📚 Learning: 2025-07-20T09:03:06.318Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-07-20T09:03:06.318Z
Learning: Applies to **/*.{html,jsx,tsx} : Give heading elements content that's accessible to screen readers (not hidden with aria-hidden).

Applied to files:

  • apps/web/components/PageHeader.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 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)/license/page.tsx
📚 Learning: 2025-07-18T15:04:57.115Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/form-handling.mdc:0-0
Timestamp: 2025-07-18T15:04:57.115Z
Learning: Applies to **/*.tsx : Validate form inputs before submission

Applied to files:

  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-19T17:50:22.078Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-07-19T17:50:22.078Z
Learning: Applies to components/**/*.tsx : Use the `Input` component for text inputs, passing `registerProps` and `error` props for form handling

Applied to files:

  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-18T15:04:57.115Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/form-handling.mdc:0-0
Timestamp: 2025-07-18T15:04:57.115Z
Learning: Applies to **/*.tsx : Use React Hook Form with Zod for validation

Applied to files:

  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-18T15:05:16.146Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 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)/license/page.tsx
📚 Learning: 2025-07-18T15:05:16.146Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 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 `result?.serverError` with `toastError` and `toastSuccess` for error and success notifications in form submission handlers.

Applied to files:

  • apps/web/app/(app)/license/page.tsx
📚 Learning: 2025-07-20T09:03:06.318Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-07-20T09:03:06.318Z
Learning: Applies to **/*.{jsx,tsx} : Don't pass children as props.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-07-20T09:03:06.318Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-07-20T09:03:06.318Z
Learning: Applies to **/*.{jsx,tsx} : Use <>...</> instead of <Fragment>...</Fragment>.

Applied to files:

  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingWrapper.tsx
📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-07-18T15:04:30.467Z
Learning: Applies to apps/web/**/*.tsx : Use shadcn/ui components when available

Applied to files:

  • apps/web/components/NavBottom.tsx
🧬 Code graph analysis (5)
apps/web/app/(app)/admin/page.tsx (2)
apps/web/components/PageWrapper.tsx (1)
  • PageWrapper (3-20)
apps/web/components/PageHeader.tsx (1)
  • PageHeader (14-36)
apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx (5)
apps/web/components/ExpandableText.tsx (1)
  • ExpandableText (8-67)
apps/web/utils/condition.ts (1)
  • conditionsToString (158-175)
apps/web/utils/action-sort.ts (1)
  • sortActionsByPriority (40-48)
apps/web/utils/action-display.tsx (1)
  • getActionIcon (86-115)
apps/web/components/PlanBadge.tsx (1)
  • getActionColor (209-232)
apps/web/app/(app)/[emailAccountId]/usage/page.tsx (3)
apps/web/components/PageWrapper.tsx (1)
  • PageWrapper (3-20)
apps/web/components/PageHeader.tsx (1)
  • PageHeader (14-36)
apps/web/app/(app)/[emailAccountId]/usage/usage.tsx (1)
  • Usage (12-49)
apps/web/components/PageHeader.tsx (1)
apps/web/components/Typography.tsx (1)
  • PageSubHeading (123-123)
apps/web/app/(app)/license/page.tsx (2)
apps/web/components/PageWrapper.tsx (1)
  • PageWrapper (3-20)
apps/web/components/PageHeader.tsx (1)
  • PageHeader (14-36)
⏰ 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: test
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (19)
version.txt (1)

1-1: LGTM - Version bump.

Standard patch version increment accompanying the mobile improvements.

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

47-47: LGTM - Improved alt text accuracy.

The alt text now correctly matches the page heading and image content.

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

17-17: LGTM - Mobile-first responsive padding.

The responsive padding pattern (p-4 on mobile, sm:p-10 on larger screens) follows the mobile-first approach per coding guidelines.

Based on learnings

apps/web/app/(app)/[emailAccountId]/assistant/RulesPromptNew.tsx (1)

178-201: LGTM - Responsive button layout.

The responsive layout stacks buttons vertically on mobile (flex-col) and horizontally on larger screens (sm:flex-row). The primary action button uses full width on mobile for better touch targets, switching to auto width on larger screens. This follows the mobile-first approach.

Based on learnings

apps/web/app/(app)/[emailAccountId]/onboarding/StepIntro.tsx (3)

21-23: LGTM - Concise intro text.

The shortened introduction is more direct while maintaining clarity.


26-26: LGTM - Responsive spacing.

Mobile-first gap spacing (gap-4 expanding to sm:gap-8) follows responsive design guidelines.

Based on learnings


76-76: LGTM - Responsive typography.

Mobile-first font sizing (text-lg expanding to sm:text-xl) improves readability across screen sizes.

Based on learnings

apps/web/components/SidebarRight.tsx (2)

14-15: LGTM - Mobile-aware sidebar state.

The sidebar now correctly uses mobile-specific open state (openMobile) when on mobile devices, enabling proper mobile/desktop state coordination with the useSidebar hook.


20-22: No z-index conflicts detected.

The search found that all overlay components in the codebase—including modals, dialogs, sheets, dropdowns, tooltips, and popovers—consistently use z-50. The shadcn/ui components (Dialog, AlertDialog, Sheet, Dropdown, Tooltip, Popover, Select, HoverCard) all apply z-50. There are no z-index values higher than 50 in the codebase, so the z-50 value on SidebarRight is aligned with the rest of the overlay hierarchy rather than creating conflicts.

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

66-70: No issues found — /calendars route exists and is properly referenced.

The route is implemented at apps/web/app/(app)/(redirects)/calendars/page.tsx and apps/web/app/(app)/[emailAccountId]/calendars/page.tsx, confirming the navigation entry is valid.

apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx (1)

14-19: LGTM! The state management issue has been resolved.

The handler now correctly calls setOpen for all cases, ensuring that components checking state.includes("chat-sidebar") will work properly. The additional setOpenMobile call when isMobile is true maintains mobile-specific behavior without breaking the shared state.

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

221-221: LGTM! Responsive text sizing follows mobile-first approach.

The progressive text sizing from text-sm to sm:text-base improves readability across viewport sizes.

apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx (4)

66-70: LGTM! Simplified component API.

Removing the size prop simplifies the component interface and allows responsive behavior to be determined entirely by CSS breakpoints.


144-150: Responsive table headers implemented effectively.

The consistent padding pattern (px-2 sm:px-4) and progressive disclosure of the Condition column on larger screens (hidden sm:table-cell) follow mobile-first best practices. This trades off some information density on mobile for better layout.

Based on learnings


234-268: LGTM! Enhanced condition display with better UX.

The differentiated rendering for conversation status rules (with tooltip explanation) versus regular rules (with expandable text) improves user understanding. The ExpandableText component from the snippets handles overflow gracefully.


437-450: LGTM! ActionBadges now responsive and space-efficient.

The changes improve mobile layout:

  • min-w-0 allows the flex container to shrink properly
  • Icons hidden on small screens (hidden sm:block) reduce visual clutter
  • shrink-0 on badges prevents unwanted compression

Based on learnings

apps/web/app/(app)/[emailAccountId]/usage/page.tsx (1)

57-69: LGTM! Consistent page structure.

The migration to PageWrapper and PageHeader aligns with the broader refactoring pattern seen in apps/web/app/(app)/admin/page.tsx and apps/web/app/(app)/license/page.tsx, improving layout consistency across the application.

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

26-26: LGTM! Responsive flex layout improves mobile stacking.

The responsive flex direction (flex-col sm:flex-row) and alignment (items-start sm:items-center) ensure proper vertical stacking on mobile with appropriate spacing.

Based on learnings

apps/web/app/(app)/admin/page.tsx (1)

33-49: LGTM! Consistent page structure refactoring.

The migration to PageWrapper/PageHeader maintains consistency with the refactoring pattern across other pages. The adjusted spacing (mt-4 mb-20) provides better vertical rhythm for the admin page content.

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.

Reviewed changes from recent commits (found 1 issue).

1 issue found across 5 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


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

<violation number="1" location="apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx:15">
Unconditionally calling setOpen here means mobile usage permanently flags &quot;chat-sidebar&quot; as open in the desktop state/cookie, so the right sidebar reopens on desktop after mobile users close it. Please only update setOpen when not on mobile.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

variant="outline"
onClick={() => setOpen((arr) => [...arr, "chat-sidebar"])}
onClick={() => {
setOpen((arr) => [...arr, "chat-sidebar"]);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 8, 2025

Choose a reason for hiding this comment

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

Unconditionally calling setOpen here means mobile usage permanently flags "chat-sidebar" as open in the desktop state/cookie, so the right sidebar reopens on desktop after mobile users close it. Please only update setOpen when not on mobile.

Prompt for AI agents
Address the following comment on apps/web/app/(app)/[emailAccountId]/assistant/AIChatButton.tsx at line 15:

<comment>Unconditionally calling setOpen here means mobile usage permanently flags &quot;chat-sidebar&quot; as open in the desktop state/cookie, so the right sidebar reopens on desktop after mobile users close it. Please only update setOpen when not on mobile.</comment>

<file context>
@@ -12,8 +12,10 @@ export function AIChatButton() {
       onClick={() =&gt; {
-        const setter = isMobile ? setOpenMobile : setOpen;
-        setter((arr) =&gt; [...arr, &quot;chat-sidebar&quot;]);
+        setOpen((arr) =&gt; [...arr, &quot;chat-sidebar&quot;]);
+        if (isMobile) {
+          setOpenMobile((arr) =&gt; [...arr, &quot;chat-sidebar&quot;]);
</file context>
Fix with Cubic

@elie222 elie222 merged commit 3460ee0 into main Nov 8, 2025
18 checks passed
@elie222 elie222 deleted the feat/improve-mobile branch November 8, 2025 19:11
@coderabbitai coderabbitai bot mentioned this pull request Nov 28, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 30, 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