From d465403c7c94fffc19848dc713b64c91f8cd94f2 Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Fri, 27 Mar 2026 11:03:39 -0400 Subject: [PATCH 1/2] use beta badge and update to feature flag check --- static/app/views/dashboards/manage/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/app/views/dashboards/manage/index.tsx b/static/app/views/dashboards/manage/index.tsx index 53ff00990f0b39..b821cd98af85c9 100644 --- a/static/app/views/dashboards/manage/index.tsx +++ b/static/app/views/dashboards/manage/index.tsx @@ -20,6 +20,7 @@ import {openImportDashboardFromFileModal} from 'sentry/actionCreators/modal'; import Feature from 'sentry/components/acl/feature'; import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {ErrorBoundary} from 'sentry/components/errorBoundary'; +import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup'; import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import * as Layout from 'sentry/components/layouts/thirds'; import {NoProjectMessage} from 'sentry/components/noProjectMessage'; @@ -170,6 +171,8 @@ function ManageDashboards() { const isOnlyPrebuilt = hasPrebuiltDashboards && urlFilter === DashboardFilter.ONLY_PREBUILT; + const {areAiFeaturesAllowed} = useOrganizationSeerSetup(); + const [showTemplates, setShowTemplatesLocal] = useLocalStorageState( SHOW_TEMPLATES_KEY, shouldShowTemplates() @@ -655,9 +658,9 @@ function ManageDashboards() { )} - + {({hasFeature: hasAiGenerate}) => - hasAiGenerate ? ( + hasAiGenerate && areAiFeaturesAllowed ? ( {({ hasReachedDashboardLimit, @@ -680,7 +683,7 @@ function ManageDashboards() { label: ( {t('Generate dashboard')} - + ), onAction: () => onGenerateDashboard(), From b6d6cac914031dddc4726217416cce49b87e64f4 Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Fri, 27 Mar 2026 11:25:03 -0400 Subject: [PATCH 2/2] dont use hook --- static/app/views/dashboards/manage/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/views/dashboards/manage/index.tsx b/static/app/views/dashboards/manage/index.tsx index b821cd98af85c9..e7267b22d0bdf3 100644 --- a/static/app/views/dashboards/manage/index.tsx +++ b/static/app/views/dashboards/manage/index.tsx @@ -20,7 +20,6 @@ import {openImportDashboardFromFileModal} from 'sentry/actionCreators/modal'; import Feature from 'sentry/components/acl/feature'; import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {ErrorBoundary} from 'sentry/components/errorBoundary'; -import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup'; import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import * as Layout from 'sentry/components/layouts/thirds'; import {NoProjectMessage} from 'sentry/components/noProjectMessage'; @@ -171,7 +170,8 @@ function ManageDashboards() { const isOnlyPrebuilt = hasPrebuiltDashboards && urlFilter === DashboardFilter.ONLY_PREBUILT; - const {areAiFeaturesAllowed} = useOrganizationSeerSetup(); + const areAiFeaturesAllowed = + !organization.hideAiFeatures && organization.features.includes('gen-ai-features'); const [showTemplates, setShowTemplatesLocal] = useLocalStorageState( SHOW_TEMPLATES_KEY,