fix(mailer): permissions entitlements for enabling/disabling#5312
Conversation
…ership workflow edits via sockets, ui improvements
…ng improvements, posthog, secrets mutations
…ration, signup method feature flags, SSO improvements
…nts, secrets performance, polling refactors, drag resources in mothership
…y invalidation, HITL docs
…endar triggers, docs updates, integrations/models pages improvements
…ions, jira forms endpoints
…mat, logs performance improvements fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179) fix(landing): return 404 for invalid dynamic route slugs (#4182) improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170) fix(gemini): support structured output with tools on Gemini 3 models (#4184) feat(brightdata): add Bright Data integration with 8 tools (#4183) fix(mothership): fix superagent credentials (#4185) fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
v0.6.46: mothership streaming fixes, brightdata integration
…m integration, atlassian triggers
…ration, smooth streaming, security hardening, db fixes
…x, db migrations from ci, docs updates, read replicas v0.7.3: jira oauth scope fix, read-replica client, table wire data fix, db migrations from ci, docs updates, read replicas
…uting, trigger.dev, temporal, latex, quartr, brex, convex integrations
…rovements, styling consolidation
…, db perf improvements
…nges, code hygiene
…lassian assets and google calendar tools
…d, security fixes
…richment providers, deepseek models, db performance
…nce, file sharing, scheduled tasks granularity
…t harness, sakana fugu provider v0.7.13: pii redaction, react query frontend refactor, pi coding agent harness, sakana fugu provider
…ix, settings overhaul, thrive learning integration
…extension, workspace forking, slack trigger extension, new README
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview API & billing: Ops: A new cron UI: Settings use server Reviewed by Cursor Bugbot for commit 6c1175f. Configure here. |
Greptile SummaryThis PR moves Sim Mailer entitlement checks to workspace billing. The main changes are:
Confidence Score: 4/5The personal-workspace entitlement path needs a fix before merging.
apps/sim/lib/billing/core/subscription.ts
|
| Filename | Overview |
|---|---|
| apps/sim/lib/billing/core/subscription.ts | Adds workspace-scoped inbox entitlement helpers, but the personal-workspace branch can use unrelated organization subscriptions. |
| apps/sim/app/api/workspaces/[id]/inbox/route.ts | Returns entitlement in the inbox config and allows admins to disable an inbox after entitlement loss. |
| apps/sim/app/api/webhooks/agentmail/route.ts | Rejects inbound AgentMail messages when the workspace entitlement helper returns false. |
| apps/sim/app/api/cron/reconcile-inbox-entitlement/route.ts | Adds an authenticated cron route that disables enabled inboxes after grace entitlement is lost. |
| apps/sim/app/workspace/[workspaceId]/settings/components/inbox/inbox.tsx | Updates inbox settings rendering to use the config-level entitlement flag. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx | Locks the Inbox sidebar item based on inbox config entitlement instead of generic Max access. |
Reviews (1): Last reviewed commit: "fix lifecycle for agentmail infra" | Re-trigger Greptile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6c1175f. Configure here.
Resolve conflict in scripts/check-api-validation-contracts.ts: staging deleted the contact route (removed from allowlists) while this branch added the reconcile-inbox-entitlement cron. Net route count is unchanged at 881, so the baseline is set to 881 (both allowlist edits kept). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Summary
Workspace admins should be able to enable/disable inboxes. AgentMail infra teardown on subscription deletion.
Type of Change
Testing
Tested manually
Checklist