Use common page structure for the main pages#695
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded@elie222 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 1 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (8)
WalkthroughAdds a reusable PageWrapper component and migrates multiple pages to use it; refactors the Bulk Unsubscribe feature by removing the old page component, renaming and consolidating state into a single BulkUnsubscribe component, and adjusts several layout/spacings across stats and analytics UI files. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Page as BulkUnsubscribe (new)
participant Loader as useStatLoader
participant API as Stats API
participant UI as Subcomponents
User->>Page: Open Bulk Unsubscribe page
activate Page
Page->>Page: init presets, compute isMobile, set dateRange
Page->>Loader: onLoad({loadBefore:false, showToast:false})
activate Loader
Loader->>API: fetch stats
API-->>Loader: return data / loading state
Loader-->>Page: loading=true -> refreshInterval=5000
Page->>UI: render PageHeading, ActionBar, LoadStatsButton, filters
API-->>Loader: data loaded
Loader-->>Page: loading=false -> refreshInterval≈1e6
Page->>UI: render rows, ArchiveProgress, modals
deactivate Loader
deactivate Page
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsx (1)
1-1: Add "use client" directive; this component uses hooks and onClickThis file defines a client component (hooks, confirm, onClick). In Next.js app router, files with client-side interactivity must start with the "use client" directive under apps/web/app/**/*.tsx per guidelines. Without it, this will throw/hydration fail.
Apply this diff at the top of the file:
+ "use client"; + import { usePostHog } from "posthog-js/react";apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx (2)
326-334: Fix unsafe optional chaining that can throw at runtime
data?.newsletters.lengthwill throw whendatais undefined because.lengthis accessed on the result ofdata?.newsletterswithout chaining. Use optional chaining onnewslettersas well.Apply this diff:
- {isStatsLoading && !isLoading && !data?.newsletters.length ? ( + {isStatsLoading && !isLoading && !data?.newsletters?.length ? (
168-171: Guard against division by zero when deriving percentagesIf
item.valueis 0, these computations produceNaNand can cause rendering/sorting glitches.Apply this diff:
- const readPercentage = (item.readEmails / item.value) * 100; - const archivedEmails = item.value - item.inboxEmails; - const archivedPercentage = (archivedEmails / item.value) * 100; + const total = item.value || 0; + const readPercentage = total > 0 ? (item.readEmails / total) * 100 : 0; + const archivedEmails = Math.max(0, item.value - item.inboxEmails); + const archivedPercentage = total > 0 ? (archivedEmails / total) * 100 : 0;
🧹 Nitpick comments (7)
apps/web/components/PageWrapper.tsx (1)
3-9: Forward HTML div props for flexibilityAllow passing id, data-*, role, style, etc., without widening types everywhere. Keeps it ergonomic and future-proof.
-import { cn } from "@/utils"; +import { cn } from "@/utils"; +import type { HTMLAttributes, PropsWithChildren } from "react"; -export function PageWrapper({ - children, - className, -}: { - children: React.ReactNode; - className?: string; -}) { +export function PageWrapper({ + children, + className, + ...props +}: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) { return ( - <div className={cn("mx-auto max-w-screen-xl w-full", className)}> + <div + className={cn("mx-auto max-w-screen-xl w-full", className)} + {...props} + > {children} </div> ); }apps/web/app/(app)/[emailAccountId]/stats/Stats.tsx (1)
70-85: Consider mobile-first header stackingRight now the header row is locked to a single line with justify-between. For small screens, stacking the title above actions improves readability.
- <div className="flex items-center justify-between"> + <div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between"> {isLoading ? <LoadProgress /> : <div />} <div className="flex flex-wrap gap-1"> <ActionBar selectOptions={selectOptions} dateDropdown={dateDropdown} setDateDropdown={onSetDateDropdown} dateRange={dateRange} setDateRange={setDateRange} period={period} setPeriod={setPeriod} isMobile={false} /> <LoadStatsButton /> </div> </div>apps/web/app/(app)/[emailAccountId]/automation/page.tsx (2)
91-93: Minor: redundant w-full wrapperPageWrapper already applies w-full; the inner
is likely redundant.- <div className="w-full"> + <div>
94-98: Responsive header tweak (optional)As with Stats, consider stacking on small screens for better readability.
- <div className="flex items-center justify-between"> + <div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between"> <PageHeading>Assistant</PageHeading> <ExtraActions /> </div>apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx (3)
79-84: Initialize dateRange lazily; drop the extra useMemoMinor cleanup: compute
nowinside theuseStateinitializer to avoid an extrauseMemoand ensure the initial value is created once.Apply this diff:
- const now = useMemo(() => new Date(), []); - const [dateRange, setDateRange] = useState<DateRange | undefined>({ - from: subDays(now, Number.parseInt(defaultSelected.value)), - to: now, - }); + const [dateRange, setDateRange] = useState<DateRange | undefined>(() => { + const now = new Date(); + return { + from: subDays(now, Number.parseInt(defaultSelected.value)), + to: now, + }; + });
85-90: Avoid duplicating useStatLoader callsYou call
useStatLoader()again later to getisStatsLoading(Line 144). Prefer a single call and reuse the values to reduce redundant context subscriptions.You can keep this block as-is and then replace the later call:
// Later (around line 144), replace: const { isLoading: isStatsLoading } = useStatLoader(); // With: const isStatsLoading = isStatsLoaderLoading;
195-201: Provide a deterministic default sort for 'emails' and carry the totalWhen
sortColumn === "emails", the iteratee returnsundefined, leading to no-op client-side sorting. If the API ever returns items unsorted, this becomes inconsistent. Includevaluein the row metadata and sort by it as a fallback.Apply this diff:
- return { row, readPercentage, archivedEmails, archivedPercentage }; + return { + row, + readPercentage, + archivedEmails, + archivedPercentage, + value: item.value, + };And:
- const tableRows = sortBy(unsortedTableRows, (row) => { - if (sortColumn === "unread") return row.readPercentage; - if (sortColumn === "unarchived") return row.archivedPercentage; - }); + const tableRows = sortBy(unsortedTableRows, (row) => { + if (sortColumn === "unread") return row.readPercentage; // asc + if (sortColumn === "unarchived") return row.archivedPercentage; // asc + return -row.value; // default: emails desc + });
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
apps/web/app/(app)/[emailAccountId]/automation/page.tsx(2 hunks)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsx(1 hunks)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribe.tsx(0 hunks)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx(4 hunks)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsx(1 hunks)apps/web/app/(app)/[emailAccountId]/stats/Stats.tsx(4 hunks)apps/web/components/PageWrapper.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribe.tsx
🧰 Additional context used
📓 Path-based instructions (15)
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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
apps/web/app/**
📄 CodeRabbit Inference Engine (apps/web/CLAUDE.md)
NextJS app router structure with (app) directory
Files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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
Useresult?.serverErrorwithtoastErrorandtoastSuccess
UseLoadingContentcomponent to handle loading and error states consistently
Passloading,error, and children props toLoadingContent
Files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
**/*.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/form-handling.mdc)
**/*.tsx: Use React Hook Form with Zod for validation
Validate form inputs before submission
Show validation errors inline next to form fields
Files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/logging.mdc)
**/*.{ts,tsx}: UsecreateScopedLoggerfor logging in backend TypeScript files
Typically add the logger initialization at the top of the file when usingcreateScopedLogger
Only use.with()on a logger instance within a specific function, not for a global loggerImport 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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
apps/web/app/**/*.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/project-structure.mdc)
Components with
onClickmust be client components withuse clientdirective
Files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/ultracite.mdc)
**/*.{js,jsx,ts,tsx}: Don't useelements 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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx
**/*.{jsx,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/ultracite.mdc)
**/*.{jsx,tsx}: Don't destructure props inside JSX components in Solid projects.
Don't use both children and dangerouslySetInnerHTML props on the same element.
Don't use Array index in keys.
Don't assign to React component props.
Don't define React components inside other components.
Don't use event handlers on non-interactive elements.
Don't assign JSX properties multiple times.
Don't add extra closing tags for components without children.
Use <>...</> instead of ....
Don't insert comments as text nodes.
Don't use the return value of React.render.
Make sure all dependencies are correctly specified in React hooks.
Make sure all React hooks are called from the top level of component functions.
Don't use unnecessary fragments.
Don't pass children as props.
Use semantic elements instead of role attributes in JSX.
Files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.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]/bulk-unsubscribe/BulkActions.tsxapps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/stats/Stats.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsxapps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsxapps/web/components/**/*.tsx
📄 CodeRabbit Inference Engine (apps/web/CLAUDE.md)
Use React Hook Form with Zod validation for form handling
Use the
LoadingContentcomponent to handle loading and error states consistently in data-fetching components.Use PascalCase for components (e.g.
components/Button.tsx)Files:
apps/web/components/PageWrapper.tsx🧠 Learnings (7)
📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR PR: elie222/inbox-zero#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/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx📚 Learning: 2025-07-20T09:00:16.505Z
Learnt from: CR PR: elie222/inbox-zero#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` folderApplied to files:
apps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx📚 Learning: 2025-07-18T15:07:00.269Z
Learnt from: CR PR: elie222/inbox-zero#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 folderApplied to files:
apps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx📚 Learning: 2025-07-18T15:07:00.269Z
Learnt from: CR PR: elie222/inbox-zero#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.tsxApplied to files:
apps/web/components/PageWrapper.tsxapps/web/app/(app)/[emailAccountId]/automation/page.tsx📚 Learning: 2025-07-18T15:05:16.146Z
Learnt from: CR PR: elie222/inbox-zero#0 File: .cursor/rules/fullstack-workflow.mdc:0-0 Timestamp: 2025-07-18T15:05:16.146Z Learning: Applies to apps/web/hooks/**/*.ts : Use SWR for client-side data fetching and caching.Applied to files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx📚 Learning: 2025-07-18T15:04:30.467Z
Learnt from: CR PR: elie222/inbox-zero#0 File: apps/web/CLAUDE.md:0-0 Timestamp: 2025-07-18T15:04:30.467Z Learning: Applies to apps/web/hooks/**/*.ts : Use SWR for efficient data fetching and cachingApplied to files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx📚 Learning: 2025-07-18T15:05:41.705Z
Learnt from: CR PR: elie222/inbox-zero#0 File: .cursor/rules/hooks.mdc:0-0 Timestamp: 2025-07-18T15:05:41.705Z Learning: Applies to apps/web/hooks/use*.{js,jsx,ts,tsx} : For fetching data from API endpoints in custom hooks, prefer using `useSWR`.Applied to files:
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx🧬 Code Graph Analysis (4)
apps/web/components/PageWrapper.tsx (1)
apps/web/utils/index.ts (1)
cn(4-6)apps/web/app/(app)/[emailAccountId]/stats/Stats.tsx (6)
apps/web/components/PageWrapper.tsx (1)
PageWrapper(3-15)apps/web/components/Typography.tsx (1)
PageHeading(110-110)apps/web/app/(app)/[emailAccountId]/stats/StatsSummary.tsx (1)
StatsSummary(21-79)apps/web/app/(app)/[emailAccountId]/stats/EmailAnalytics.tsx (1)
EmailAnalytics(15-112)apps/web/app/(app)/[emailAccountId]/stats/DetailedStats.tsx (1)
DetailedStats(18-165)apps/web/app/(app)/[emailAccountId]/stats/EmailActionsAnalytics.tsx (1)
EmailActionsAnalytics(10-43)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx (9)
apps/web/app/api/user/stats/newsletters/route.ts (1)
NewsletterStatsResponse(36-38)apps/web/providers/StatLoaderProvider.tsx (1)
useStatLoader(35-35)apps/web/components/PageWrapper.tsx (1)
PageWrapper(3-15)apps/web/components/Typography.tsx (1)
PageHeading(110-110)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/ShortcutTooltip.tsx (1)
ShortcutTooltip(7-26)apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx (1)
ActionBar(7-83)apps/web/components/ClientOnly.tsx (1)
ClientOnly(5-13)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/ArchiveProgress.tsx (1)
ArchiveProgress(7-33)apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsx (1)
BulkActions(20-137)apps/web/app/(app)/[emailAccountId]/automation/page.tsx (6)
apps/web/components/PageWrapper.tsx (1)
PageWrapper(3-15)apps/web/components/PremiumAlert.tsx (1)
PremiumAlertWithData(91-110)apps/web/components/TabSelect.tsx (1)
TabSelect(44-100)apps/web/app/(app)/[emailAccountId]/assistant/RulesTab.tsx (1)
RulesTab(5-24)apps/web/app/(app)/[emailAccountId]/assistant/Process.tsx (1)
Process(8-36)apps/web/app/(app)/[emailAccountId]/assistant/History.tsx (1)
History(27-59)⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkActions.tsx (1)
71-71: Spacing tweak LGTMAdding mt-2 makes sense to create breathing room between tooltip and action buttons.
apps/web/components/PageWrapper.tsx (1)
10-15: LGTM: Simple, reusable wrapperClean presentational component, appropriate class merging with cn, and sensible max width.
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/page.tsx (1)
2-2: Import path update LGTMImporting BulkUnsubscribe from the renamed section component aligns with the refactor. No issues spotted.
apps/web/app/(app)/[emailAccountId]/stats/Stats.tsx (2)
68-70: Adopting PageWrapper + PageHeading looks goodNice move to standardized layout; consistent with the new page structure.
101-112: Nit: consistent vertical rhythmThe switch to mt-4 blocks reads well; the Card and analytics sections have consistent spacing. No action needed.
apps/web/app/(app)/[emailAccountId]/automation/page.tsx (1)
90-107: Header restructure LGTMWrapping with PageWrapper and using PageHeading/ExtraActions simplifies layout and matches the common structure.
apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx (1)
210-215: Good adoption of the new common page structure and action headerNice use of PageWrapper, PageHeading, ActionBar, and LoadStatsButton. This aligns with the new layout patterns and improves consistency across pages.
Also applies to: 304-314
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Summary by CodeRabbit
New Features
Refactor
Style
Chores