fix: allow non-premium users to dismiss SetupDialog#1251
Conversation
Non-premium users were getting trapped in the AutoCategorizationSetup dialog with no way to escape. The dialog blocked clicks outside, escape key, and had no close button. When they clicked "Get Started", the premium validation failed but the dialog stayed open. - Remove dialog escape prevention (onInteractOutside, onEscapeKeyDown, hideCloseButton) - Add onOpenChange callback to SetupDialog - Track dismissed state in BulkArchive to prevent dialog from reopening Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThese changes add optional Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant BulkArchive
participant AutoCategorizationSetup
participant SetupDialog
participant Dialog
User->>Dialog: Closes dialog
Dialog->>SetupDialog: onOpenChange(false)
SetupDialog->>AutoCategorizationSetup: onOpenChange(false)
AutoCategorizationSetup->>BulkArchive: onOpenChange(false)
BulkArchive->>BulkArchive: setSetupDismissed(true)
Note over BulkArchive: shouldShowSetup now false<br/>Setup wizard hidden
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (19)**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/data-fetching.mdc)
Files:
apps/web/app/(app)/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.cursor/rules/prisma-enum-imports.mdc)
Files:
apps/web/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Files:
**/*.{tsx,ts}📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Files:
**/*.{tsx,ts,css}📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Files:
**/*.tsx📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)
Files:
**/*.{jsx,tsx}📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)
Files:
!(pages/_document).{jsx,tsx}📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)
Files:
**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)
Files:
apps/web/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Files:
apps/web/**/*.{ts,tsx,css}📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Files:
apps/web/**/*.{tsx,jsx}📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Files:
apps/web/**/*.{tsx,jsx,css}📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Files:
apps/web/**/*.{ts,tsx,js,jsx,json}📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Files:
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,rs,kt,swift,m}📄 CodeRabbit inference engine (.cursor/rules/notes.mdc)
Files:
**/{pages,routes,components}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/gmail-api.mdc)
Files:
apps/web/components/**/*.tsx📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Files:
🧠 Learnings (13)📚 Learning: 2026-01-07T21:07:06.691ZApplied to files:
📚 Learning: 2026-01-09T17:27:19.225ZApplied to files:
📚 Learning: 2025-07-08T13:14:07.449ZApplied to files:
📚 Learning: 2025-11-25T14:37:30.660ZApplied to files:
📚 Learning: 2026-01-09T21:51:15.182ZApplied to files:
📚 Learning: 2025-11-25T14:37:35.343ZApplied to files:
📚 Learning: 2025-11-25T14:40:13.649ZApplied to files:
📚 Learning: 2025-11-25T14:37:35.343ZApplied to files:
📚 Learning: 2025-11-25T14:37:30.660ZApplied to files:
📚 Learning: 2026-01-08T15:09:06.736ZApplied to files:
📚 Learning: 2025-11-25T14:40:15.063ZApplied to files:
📚 Learning: 2025-11-25T14:38:18.874ZApplied to files:
📚 Learning: 2025-11-25T14:38:56.992ZApplied to files:
🧬 Code graph analysis (1)apps/web/app/(app)/[emailAccountId]/bulk-archive/BulkArchive.tsx (1)
⏰ 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)
🔇 Additional comments (5)
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. Comment |
User description
Summary
Non-premium users were getting trapped in the AutoCategorizationSetup dialog on the bulk archive page with no way to escape.
onOpenChangecallback to track when dialog is dismissedTest plan
/bulk-archiveas a non-premium user🤖 Generated with Claude Code
Generated description
Below is a concise technical summary of the changes proposed in this PR:
graph LR BulkArchive_("BulkArchive"):::modified AutoCategorizationSetup_("AutoCategorizationSetup"):::modified SetupDialog_("SetupDialog"):::modified DIALOG_COMPONENT_("DIALOG_COMPONENT"):::modified ACCOUNT_SERVICE_("ACCOUNT_SERVICE"):::modified CATEGORIZE_PROGRESS_("CATEGORIZE_PROGRESS"):::modified BulkArchive_ -- "Adds dismissal state; passes onOpenChange to dismiss." --> AutoCategorizationSetup_ AutoCategorizationSetup_ -- "Forwards parent's onOpenChange to SetupDialog." --> SetupDialog_ SetupDialog_ -- "Exposes onOpenChange to Dialog for external control." --> DIALOG_COMPONENT_ AutoCategorizationSetup_ -- "Gained onOpenChange param; account usage unchanged." --> ACCOUNT_SERVICE_ AutoCategorizationSetup_ -- "Categorize progress usage unchanged; dismiss logic added." --> CATEGORIZE_PROGRESS_ classDef added stroke:#15AA7A classDef removed stroke:#CD5270 classDef modified stroke:#EDAC4C linkStyle default stroke:#CBD5E1,font-size:13pxResolves an issue where non-premium users were unable to close the
AutoCategorizationSetupdialog within theinbox-zero-aimodule, by modifying theSetupDialogcomponent to allow standard dismissal actions and updating its integration in theBulkArchiveflow.Latest Contributors(2)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.