Skip to content

feat(integrations): offer trigger-only integrations only where their triggers are - #6933

Merged
saddlepaddle merged 2 commits into
mainfrom
integrations-feature-flag
Aug 28, 2026
Merged

saddlepaddle merged 2 commits into
mainfrom
integrations-feature-flag

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Desktop Settings → Integrations and web /integrations now offer Notion, Microsoft Teams, Sentry and Google only to users whose automation-event-triggers payload enables one of their trigger kinds — today, @superset.sh. GitHub, Slack and Linear stay visible to everyone.
  • The four trigger-only web provider pages 404 for anyone not offered them.
  • No new flag: the Add Trigger menu and the integrations pages read the same payload, so a provider is connectable exactly when its triggers are.

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 declares triggerKinds; GitHub/Slack/Linear are standalone: true. offeredIntegrations(payload) filters the roster, isIntegrationOffered(provider, payload) checks one.
  • @superset/shared/automation-triggers: enabledTriggerKinds(payload) is the parser TriggersEditor used to inline; it now imports it.
  • Desktop IntegrationsSettings and web integrations/page.tsx read the payload with useFeatureFlagPayload and map over offeredIntegrations.
  • Web notion / sentry / google / microsoft-teams pages call requireOfferedIntegration(provider), which reads the payload server-side via posthogServer.getFeatureFlagPayload with the email person property (same pattern as getPagesAccess) and notFound()s.
  • Visibility only: the API connect and callback routes are unchanged, matching how PLUGINS and CHAT_V3 are documented.

Manual QA Checklist

Not exercised in a running app — typecheck, lint and tests only. To confirm:

  • Desktop, @superset.sh account: Settings → Integrations lists all seven
  • Desktop, outside account (or flag off): lists GitHub, Slack, Linear only; Tasks → Connect Linear still lands on the page
  • Web /integrations as each: same two sets; cards link correctly
  • Web /integrations/sentry outside the flag → 404; inside → renders
  • Automations → Add Trigger unchanged for both audiences

Testing

  • bun run typecheck in packages/shared, apps/web, apps/desktop — clean
  • bun run lint — clean
  • bun run --cwd packages/shared test — 821 pass
  • bun run --cwd apps/desktop test src/renderer/routes/_authenticated/settings src/renderer/routes/_authenticated/_dashboard/automations — 66 pass
  • bun run --cwd apps/web test — 34 pass
  • bun run --cwd packages/i18n check — clean

Design Decisions

  • Same flag instead of a second one: a separate integrations flag would have to be kept in sync with the trigger flag by hand, which is the drift that produced the current state. Per-provider control already exists — add or remove a kind in the payload and both surfaces follow.
  • standalone in 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

  • Desktop settings search still indexes the hidden integrations (SETTINGS_ITEMS is static), so searching "sentry" outside the flag shows a count of 1 on a section that then renders nothing.
  • The web index renders the standalone set until the flag loads, so @superset.sh users see the other four pop in.

Follow-ups

Rollout

  • No PostHog change required; the flag's description was updated to say it also gates integrations.
  • Rollback: revert; the flag stays as it is.

Summary by cubic

Offers Notion, Microsoft Teams, Sentry, and Google integrations only when the automation-event-triggers flag 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

  • Filtering uses the same flag payload that gates the Add Trigger menu; no new flag or migration.
  • @superset/shared exposes enabledTriggerKinds and offeredIntegrations used by desktop settings and web /integrations.
  • Web pages for the four trigger-only providers 404 via requireOfferedIntegration when not offered.
  • Drops the unused GITHUB_INTEGRATION_ACCESS flag constant; the PostHog flag was at 100% with no readers and is archived alongside slack-integration-access.
  • Known side effects: desktop search still indexes hidden integrations, and web index shows the standalone set until the flag loads.

Written for commit 4c6270d. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Integration availability now reflects enabled automation triggers across settings, web pages, and automation editors.
    • Standalone integrations remain available regardless of trigger configuration.
    • Schedule-based triggers remain available independently of enabled trigger kinds.
  • Bug Fixes
    • Unavailable integration pages now return a not-found response instead of loading inaccessible data.
  • Documentation
    • Updated feature-flag guidance to clarify how trigger settings control available integrations.

…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.
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c563da70-0a70-49cc-a114-ddc43eac23da

📥 Commits

Reviewing files that changed from the base of the PR and between 5f29422 and 4c6270d.

📒 Files selected for processing (1)
  • packages/shared/src/constants.ts
💤 Files with no reviewable changes (1)
  • packages/shared/src/constants.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Integration Offerings

Layer / File(s) Summary
Shared offering rules
packages/shared/src/automation-triggers.ts, packages/shared/src/integrations.ts, packages/shared/src/constants.ts
enabledTriggerKinds validates feature-flag payloads. Integration metadata now declares trigger kinds and standalone status. offeredIntegrations and isIntegrationOffered derive availability from the payload.
Desktop integration surfaces
apps/desktop/src/renderer/routes/_authenticated/settings/integrations/components/IntegrationsSettings/IntegrationsSettings.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx
Desktop integration rows use the offered integration list. Trigger selection uses the shared trigger-kind parser while keeping schedule triggers available.
Web integration listings and gates
apps/web/src/app/(dashboard-legacy)/integrations/page.tsx, apps/web/src/app/(dashboard-legacy)/integrations/utils/requireOfferedIntegration/*, apps/web/src/app/(dashboard-legacy)/integrations/{google,microsoft-teams,notion,sentry}/page.tsx
The integrations page filters cards by feature-flag payload. Provider pages call requireOfferedIntegration before loading data and return 404 when the provider is not offered.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 4c627

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
Loading
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()
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and clearly summarizes the main change: limiting trigger-only integrations based on their enabled triggers.
Description check ✅ Passed 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 reposi…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch integrations-feature-flag

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.
@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

This branch was previously deployed

1 inactive deployment
preview — 4c6270d4 Deployed Aug 28, 2026 by saddlepaddle via Deploy Marketing #8593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant