-
Notifications
You must be signed in to change notification settings - Fork 696
Fix mail row disappearing and auto closing when clicking a row #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces a systematic refactoring of the Changes
Sequence DiagramsequenceDiagram
participant Caller
participant RefetchFunction
participant EmailList
Caller->>RefetchFunction: Call with options object
RefetchFunction->>RefetchFunction: Extract removedThreadIds
RefetchFunction->>EmailList: Perform refetch with filtered threads
Possibly related PRs
Poem
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/components/email-list/EmailList.tsx (1)
493-493
: Consider being explicit with the refetch parameter.While calling
refetch()
without parameters is valid, consider being explicit about the intention by passing an empty options object for consistency with other calls.-markReadThreads([thread.id], () => refetch()); +markReadThreads([thread.id], () => refetch({}));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/web/app/(app)/mail/page.tsx
(1 hunks)apps/web/components/CommandK.tsx
(1 hunks)apps/web/components/email-list/EmailList.tsx
(6 hunks)apps/web/store/email.ts
(1 hunks)
🔇 Additional comments (5)
apps/web/store/email.ts (1)
4-6
: LGTM! Type signature change improves extensibility.The refactoring from
removedThreadIds?: string[]
tooptions?: { removedThreadIds?: string[] }
enhances type safety and makes it easier to add new parameters in the future without breaking changes.apps/web/app/(app)/mail/page.tsx (1)
52-61
: LGTM! Implementation correctly handles the new parameter structure.The mutation logic properly handles the new options object while maintaining backward compatibility by checking for the existence of
options?.removedThreadIds
.apps/web/components/CommandK.tsx (1)
35-35
: LGTM! Correctly adapts to the new parameter structure.The call to
refetch
has been properly updated to use the new options object structure.apps/web/components/email-list/EmailList.tsx (2)
50-50
: LGTM! Type signatures properly updated.The type signatures in both
List
andEmailList
components have been correctly updated to match the new parameter structure.Also applies to: 178-178
281-281
: LGTM! Callback implementations correctly use the new structure.The
onArchive
,onArchiveBulk
, andonTrashBulk
callbacks properly implement the new parameter structure for both single and bulk operations.Also applies to: 364-364, 390-390
Summary by CodeRabbit
Release Notes
Refactor
refetch
function across multiple components to use a more flexible parameter structureTechnical Improvement
refetch
method signature across email-related components