Repository navigation
feat(integrations): offer trigger-only integrations only where their triggers are - #6933
Conversation
…triggers are Notion, Microsoft Teams, Sentry and Google exist to feed automation triggers, which the automation-event-triggers flag gates to @superset.sh, yet every user saw their Connect buttons on desktop settings and web /integrations. Visibility now derives from the same flag payload: GitHub, Slack and Linear are standalone (repos/PRs, the Slack app, tasks) and always offered; the rest are offered while one of their trigger kinds is in the payload, and their web pages 404 otherwise.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes trigger-kind parsing and integration offering rules. Desktop lists and trigger selection use the shared rules. Web integration listings filter offered providers, and provider pages return 404 when their integration is not offered. ChangesIntegration Offerings
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The change limits trigger-only integrations to users whose enabled triggers support them while preserving standalone integrations for everyone; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant User
participant IntegrationsPage
participant FeatureFlagPayload
participant offeredIntegrations
User->>IntegrationsPage: open integrations
IntegrationsPage->>FeatureFlagPayload: read AUTOMATION_EVENT_TRIGGERS
FeatureFlagPayload-->>IntegrationsPage: return payload
IntegrationsPage->>offeredIntegrations: filter integration roster
offeredIntegrations-->>IntegrationsPage: return offered providers
IntegrationsPage-->>User: render offered integration cards
sequenceDiagram
participant ProviderPage
participant requireOfferedIntegration
participant getTriggerFlagPayload
participant isIntegrationOffered
ProviderPage->>requireOfferedIntegration: require provider
requireOfferedIntegration->>getTriggerFlagPayload: load trigger payload
getTriggerFlagPayload-->>requireOfferedIntegration: return payload
requireOfferedIntegration->>isIntegrationOffered: check provider
isIntegrationOffered-->>requireOfferedIntegration: return availability
requireOfferedIntegration-->>ProviderPage: allow rendering or call notFound()
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains what changed, why it changed, how it works, testing performed, manual QA gaps, design decisions, limitations, and rollout. It provides the required information from the repository template.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
The PostHog flag has been at 100% with no readers since the GitHub integration went free for all (#3152); it is archived alongside slack-integration-access.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Settings → Integrationsand web/integrationsnow offer Notion, Microsoft Teams, Sentry and Google only to users whoseautomation-event-triggerspayload enables one of their trigger kinds — today,@superset.sh. GitHub, Slack and Linear stay visible to everyone.Why / Context
The four providers shipped on 08-17 purely as trigger feeds, and their connect flows aren't provisioned for outside organizations (Sentry's app is unpublished, Teams needs a tenant plus protected-API approval, Google's consent screen and Pub/Sub aren't set up). The Add Trigger menu already hides those kinds outside the flag, so a Connect button for a provider whose triggers you can't add was a dead end.
GitHub, Slack and Linear are deliberately exempt: GitHub feeds workspace repo rows, PR sync and sandbox clone tokens; the Slack app's link flow lands on
/integrations/slack/linked; Tasks' "Connect Linear" CTA navigates to/settings/integrations.How It Works
@superset/shared/integrations: each entry declarestriggerKinds; GitHub/Slack/Linear arestandalone: true.offeredIntegrations(payload)filters the roster,isIntegrationOffered(provider, payload)checks one.@superset/shared/automation-triggers:enabledTriggerKinds(payload)is the parserTriggersEditorused to inline; it now imports it.IntegrationsSettingsand webintegrations/page.tsxread the payload withuseFeatureFlagPayloadand map overofferedIntegrations.notion/sentry/google/microsoft-teamspages callrequireOfferedIntegration(provider), which reads the payload server-side viaposthogServer.getFeatureFlagPayloadwith the email person property (same pattern asgetPagesAccess) andnotFound()s.PLUGINSandCHAT_V3are documented.Manual QA Checklist
Not exercised in a running app — typecheck, lint and tests only. To confirm:
@superset.shaccount: Settings → Integrations lists all seven/integrationsas each: same two sets; cards link correctly/integrations/sentryoutside the flag → 404; inside → rendersTesting
bun run typecheckinpackages/shared,apps/web,apps/desktop— cleanbun run lint— cleanbun run --cwd packages/shared test— 821 passbun run --cwd apps/desktop test src/renderer/routes/_authenticated/settings src/renderer/routes/_authenticated/_dashboard/automations— 66 passbun run --cwd apps/web test— 34 passbun run --cwd packages/i18n check— cleanDesign Decisions
standalonein code, not in the flag: whether a provider has a non-automation use is a property of the code, not a rollout decision.Known Limitations
SETTINGS_ITEMSis static), so searching "sentry" outside the flag shows a count of 1 on a section that then renders nothing.@superset.shusers see the other four pop in.Follow-ups
github-integration-accessandslack-integration-accessare 100% in PostHog with no code references since Make GitHub integration free for all users #3152 / feat(integrations): make Slack publicly available #4823, andFEATURE_FLAGS.GITHUB_INTEGRATION_ACCESSis unused — archive/delete candidates.Rollout
Summary by cubic
Offers Notion, Microsoft Teams, Sentry, and Google integrations only when the
automation-event-triggersflag enables at least one of their trigger kinds, so Connect buttons no longer lead to dead ends. GitHub, Slack, and Linear remain available to everyone because they also serve non-automation use cases.Details
@superset/sharedexposesenabledTriggerKindsandofferedIntegrationsused by desktop settings and web/integrations.requireOfferedIntegrationwhen not offered.GITHUB_INTEGRATION_ACCESSflag constant; the PostHog flag was at 100% with no readers and is archived alongsideslack-integration-access.Written for commit 4c6270d. Summary will update on new commits.
Summary by CodeRabbit