-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Remove emailCampaigns feature flag #3086
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 GitHub.
|
WalkthroughRemoved the "emailCampaigns" feature flag across API routes, types, edge-config defaults, client layouts, and sidebar navigation; gating now relies on plan capability (requiredPlan: ["advanced","enterprise"]) where present. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Layout
participant Sidebar
participant API
participant Auth as withWorkspace
rect "#F3FCFF"
Client->>Layout: Request campaigns page
Layout->>Auth: withWorkspace(requiredPlan)
Auth-->>Layout: allow / deny (based on plan)
alt allowed
Layout->>Sidebar: render navigation (Email Campaigns visible)
Client->>API: call campaigns endpoints
API->>Auth: withWorkspace(requiredPlan)
Auth-->>API: allow / deny
API-->>Client: 200 / resource
else denied
Layout-->>Client: render CampaignsUpsell
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-10-15T01:05:43.266ZApplied to files:
📚 Learning: 2025-09-17T17:44:03.965ZApplied to files:
🧬 Code graph analysis (3)apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/campaigns-page-content.tsx (1)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/campaigns-upsell.tsx (3)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/page.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). (1)
🔇 Additional comments (4)
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 |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
apps/web/app/(ee)/api/campaigns/[campaignId]/duplicate/route.ts(0 hunks)apps/web/app/(ee)/api/campaigns/[campaignId]/events/count/route.ts(0 hunks)apps/web/app/(ee)/api/campaigns/[campaignId]/events/route.ts(0 hunks)apps/web/app/(ee)/api/campaigns/[campaignId]/route.ts(0 hunks)apps/web/app/(ee)/api/campaigns/[campaignId]/summary/route.ts(0 hunks)apps/web/app/(ee)/api/campaigns/route.ts(0 hunks)apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/layout.tsx(0 hunks)apps/web/lib/edge-config/get-feature-flags.ts(0 hunks)apps/web/lib/types.ts(1 hunks)apps/web/ui/layout/sidebar/app-sidebar-nav.tsx(3 hunks)
💤 Files with no reviewable changes (8)
- apps/web/app/(ee)/api/campaigns/[campaignId]/route.ts
- apps/web/app/(ee)/api/campaigns/[campaignId]/duplicate/route.ts
- apps/web/app/(ee)/api/campaigns/route.ts
- apps/web/app/(ee)/api/campaigns/[campaignId]/events/count/route.ts
- apps/web/app/(ee)/api/campaigns/[campaignId]/summary/route.ts
- apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/layout.tsx
- apps/web/app/(ee)/api/campaigns/[campaignId]/events/route.ts
- apps/web/lib/edge-config/get-feature-flags.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-15T01:05:43.266Z
Learnt from: steven-tey
Repo: dubinc/dub PR: 2958
File: apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx:432-457
Timestamp: 2025-10-15T01:05:43.266Z
Learning: In apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx, defer refactoring the custom MenuItem component (lines 432-457) to use the shared dub/ui MenuItem component to a future PR, as requested by steven-tey.
Applied to files:
apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
📚 Learning: 2025-05-29T04:45:18.504Z
Learnt from: devkiran
Repo: dubinc/dub PR: 2448
File: packages/email/src/templates/partner-program-summary.tsx:0-0
Timestamp: 2025-05-29T04:45:18.504Z
Learning: In the PartnerProgramSummary email template (packages/email/src/templates/partner-program-summary.tsx), the stat titles are hardcoded constants ("Clicks", "Leads", "Sales", "Earnings") that will always match the ICONS object keys after toLowerCase() conversion, so icon lookup failures are not possible.
Applied to files:
apps/web/ui/layout/sidebar/app-sidebar-nav.tsx
🧬 Code graph analysis (1)
apps/web/ui/layout/sidebar/app-sidebar-nav.tsx (1)
apps/web/lib/swr/use-workspace.ts (1)
useWorkspace(6-46)
⏰ 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: build
🔇 Additional comments (3)
apps/web/lib/types.ts (1)
199-199: Type change correctly removes emailCampaigns from BetaFeatures union.Comprehensive verification confirms all references to the
emailCampaignsflag have been successfully removed from the codebase, including source code, configuration files, migrations, and documentation. The type change at line 199 is clean and complete.apps/web/ui/layout/sidebar/app-sidebar-nav.tsx (2)
261-261: LGTM!The "New" badge appropriately highlights the Partner Network feature to users.
473-473: LGTM!Correctly removes the
emailCampaignsEnabledfield from the destructuring, consistent with the feature flag removal and theuseWorkspacehook implementation.
Summary by CodeRabbit
New Features
Chores
UI