Conversation
WalkthroughThe updates rename the custom toast notification component from Changes
Poem
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
apps/mail/providers/client-providers.tsx (1)
1-8: Missing"use client"directive
ClientProviderscalls hooks (useSettings) and renders<Toaster />, both of which rely on client-side execution in Next.js’ App Router.
Without the"use client"directive the file is treated as a server component and will break at runtime.+/* eslint-disable @next/next/no-async-client-component */ +"use client"; import { NuqsAdapter } from 'nuqs/adapters/react-router/v7';
🧹 Nitpick comments (1)
apps/mail/components/ui/toast.tsx (1)
10-13: Consider forward-ing props for extensibility
Toastercurrently discards all incoming props.
Forwarding...propsto<SonnerToaster>keeps the wrapper flexible and saves a future breaking change when new config flags are required.-const Toaster = () => { - return ( - <SonnerToaster +import type { ComponentProps } from 'react'; + +const Toaster = (props: ComponentProps<typeof SonnerToaster>) => ( + <SonnerToaster + {...props}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/mail/app/(routes)/toast-test.tsx(2 hunks)apps/mail/components/ui/toast.tsx(1 hunks)apps/mail/providers/client-providers.tsx(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/mail/app/(routes)/toast-test.tsx (1)
apps/mail/components/icons/icons.tsx (1)
Reply(852-867)
apps/mail/components/ui/toast.tsx (1)
apps/mail/components/icons/icons.tsx (4)
CircleCheck(258-273)ExclamationCircle2(1431-1446)ExclamationTriangle(630-645)InfoCircle(1281-1301)
🔇 Additional comments (2)
apps/mail/components/ui/toast.tsx (1)
22-38: VerifyclassNameskeys against the current Sonner API
toastOptions.classNamescontains keys such asactionButton,cancelButton,closeButton,loading, andloader.
In the latest Sonner versions the documented keys areaction,cancel,close,loader,icon, etc. A mismatch silently re-verts to Sonner defaults, undoing all the styling work.Please cross-check the package version actually consumed at runtime and adapt the keys if necessary.
Run:
#!/bin/bash # Show sonner version and look for 'classNames' keys in its type definitions grep -R --line-number "classNames" "$(npm root)/sonner" | headapps/mail/app/(routes)/toast-test.tsx (1)
83-91:action.labelmay not accept JSX – double-check Sonner APISonner’s
action.labelparameter is typed asstringin current releases. Passing a React node could crash the toast or render[object Object].If JSX is not supported, keep the label a string and move the icon into the
toastOptions.classNames.actionstyling instead.- action: { - label: ( - <span className="flex items-center gap-1"> - <Reply className="fill-muted-foreground dark:fill-[#9B9B9B]" /> - Undo - </span> - ), + action: { + label: "Undo",Also, the comment “// 10 seconds” is misleading:
99999999999999ms ≈ 3 years.
Merge activity
|

Enhanced Toast Component UI and Functionality
Description
This PR enhances the toast component's UI and functionality by:
CustomToastertoToasterfor better semantic clarityLoader2component with animationType of Change
Areas Affected
Summary by CodeRabbit
New Features
Style
Refactor