ref(seer): Route AI gates through the Seer access helpers - #125162
Open
NicoHinderling wants to merge 3 commits into
Open
NicoHinderling wants to merge 3 commits into
NicoHinderling wants to merge 3 commits into
Conversation
Contributor
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Contributor
Sentry Snapshot Testing
|
NicoHinderling
marked this pull request as ready for review
September 22, 2026 02:41
NicoHinderling
force-pushed
the
ref/seer-availability-helpers
branch
from
September 22, 2026 02:46
96145dd to
3832781
Compare
NicoHinderling
force-pushed
the
ref/migrate-gen-ai-features-call-sites
branch
from
September 22, 2026 02:47
4ec49fc to
738f341
Compare
Four sites inlined the gen-ai-features check next to the hide_ai_features opt-out. Point them at has_seer_access so the self-hosted rule from the helper applies everywhere. Tests that reach the real helper are pinned to SaaS mode, matching the earlier helper tests.
Explorer indexing and Night Shift keep their batch flag lookups for now and gain an early return on is_seer_available(), so self-hosted installs never iterate orgs for a product they cannot use.
Twelve components and hooks computed the same flag-plus-hideAiFeatures expression inline. Use the shared util so the self-hosted check applies uniformly. The org settings form keeps reading the flag directly because it renders the toggle that controls hideAiFeatures.
NicoHinderling
force-pushed
the
ref/migrate-gen-ai-features-call-sites
branch
from
September 22, 2026 03:05
738f341 to
e36ada2
Compare
ryan953
reviewed
Sep 22, 2026
Comment on lines
+582
to
+583
| if not is_seer_available(): | ||
| return [] |
ryan953
reviewed
Sep 22, 2026
Comment on lines
+52
to
+53
| if not is_seer_available(): | ||
| return |
ryan953
approved these changes
Sep 22, 2026
ryan953
left a comment
Member
There was a problem hiding this comment.
different combos of
!organization.features.includes('gen-ai-features') || organization.hideAiFeatures or organization.features.includes('gen-ai-features') && !organization.hideAiFeatures look converted to the helper 👍
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves every call site that inlined the
gen-ai-featurescheck onto the shared helpers from the previous PR. Four backend sites that checked the flag and thehide_ai_featuresoption separately now callhas_seer_access, keeping any other flags they test. Twelve components and hooks now callareAiFeaturesAllowed. The explorer index and Night Shift bulk tasks keep their batch flag lookups and gain an early return onis_seer_available(), so their per-org cost is unchanged.No behavior changes on SaaS. On self-hosted the migrated sites now uniformly evaluate false, which they already did whenever the flag was unset. Four sites that return distinct "flag off" versus "hidden" reasons (autofix trigger, issue summary, and the two trace explorer AI endpoints) keep their two-step structure until the flag is deleted, and the org settings form keeps reading the flag directly because it renders the toggle that controls
hideAiFeatures.