:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
refactor(dashboards): remove widget beta release gates (#119772)
Matt Pua2cbddf116372
diff --git a/docs/internal/generated-notebook-widgets.md b/docs/internal/generated-notebook-widgets.mdindex 4616ae83588c..7aa592000549 100644--- a/docs/internal/generated-notebook-widgets.md+++ b/docs/internal/generated-notebook-widgets.md@@ -15,7 +15,7 @@ The estimate does not include separate failed or canceled generation jobs, or no## Dashboard widgetsChoose **Add to dashboard** from a generated widget's notebook menu to save its selected version, input mappings, and completed dataframe results.-Both generated notebook widgets and dashboard widgets must be enabled.+Generated notebook widgets must be enabled.The selected widget version must have an available preview before the menu offers **Add to dashboard**.Notebook widgets are added from the notebook, rather than the dashboard's generic widget picker.Search the dashboard picker by name, description, or creator to find a destination.diff --git a/ee/api/test/test_migrate_dashboard_collaborators.py b/ee/api/test/test_migrate_dashboard_collaborators.pyindex 3c2586d0ee70..f149df8bc031 100644--- a/ee/api/test/test_migrate_dashboard_collaborators.py+++ b/ee/api/test/test_migrate_dashboard_collaborators.py@@ -351,8 +351,21 @@ class TestMigrateDashboardCollaborators(APIBaseTest):team=self.team, resource=DASHBOARD_EDIT_LIMIT_RESOURCE, resource_id=str(dashboard.id)).exists()- @parameterized.expand([("own_team", False), ("sibling_team", True)])- def test_migrated_access_gates_dashboard_sharing_and_insight_edits(self, _name: str, sibling: bool) -> None:+ @parameterized.expand(+ [+ (f"{scope}_{mode}_{project_access}", sibling, most_specific, project_access)+ for scope, sibling in (("own_team", False), ("sibling_team", True))+ for mode, most_specific in (("legacy", False), ("most_specific", True))+ for project_access in ("member", None)+ ]+ )+ def test_migrated_access_gates_dashboard_sharing_and_insight_edits(+ self, _name: str, sibling: bool, most_specific: bool, project_access: str | None+ ) -> None:+ self.organization.uses_most_specific_access_resolution = most_specific+ self.organization.save()+ if project_access is None:+ AccessControl.objects.filter(team=self.team, resource="project").delete()member = self._create_user("[email protected]", level=OrganizationMembership.Level.MEMBER)dashboard = Dashboard.objects.create(team=self.team, name="restricted", created_by=self.user)self._set_legacy_restriction(dashboard, member, 21)diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex aba6fa7fafd4..d6f3f3b06a5d 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -295,7 +295,6 @@ export const FEATURE_FLAGS = {CUSTOMER_ANALYTICS_TRACK_RULES: 'customer-analytics-track-rules', // owner: @arthurdedeus #team-customer-analyticsDASHBOARD_EXPORT_NUDGE: 'dashboard-export-nudge', // owner: #team-analytics-platform multivariate=control,test, nudges people who just exported a dashboard toward a recurring subscriptionDASHBOARD_LAYOUT_DISCARD_PROMPT: 'dashboard-layout-discard-prompt', // owner: @cory.s #team-analytics-platform- DASHBOARD_WIDGETS: 'dashboard-widgets', // owner: @mattp #team-analytics-platformDATA_MODELING_INCREMENTAL_VIEWS: 'data-modeling-incremental-views', // owner: #team-data-modelingDATA_QUALITY_CHECKS: 'data-quality-checks', // owner: #team-data-modelingDATA_WAREHOUSE_CUSTOM_SOURCE_AI_BUILDER: 'dwh-custom-source-ai-builder', // owner: #team-warehouse-sourcesdiff --git a/frontend/src/scenes/dashboard/DashboardAddTileSubMenu.tsx b/frontend/src/scenes/dashboard/DashboardAddTileSubMenu.tsxindex fecd16e828bc..fee38e8c9ad5 100644--- a/frontend/src/scenes/dashboard/DashboardAddTileSubMenu.tsx+++ b/frontend/src/scenes/dashboard/DashboardAddTileSubMenu.tsx@@ -1,5 +1,4 @@-import { useActions, useValues } from 'kea'-import { router } from 'kea-router'+import { useActions } from 'kea'import { SceneMenuBarItem, SceneMenuBarSubMenu } from '~/layout/scenes/components/SceneMenuBar'@@ -7,18 +6,14 @@ import { getDashboardAddTileOptions } from './dashboardAddTileOptions'import { dashboardLogic } from './dashboardLogic'export function DashboardAddTileSubMenu(): JSX.Element {- const { dashboardWidgetsEnabled } = useValues(dashboardLogic)const { openAddInsightModal, openTextTileModal, openImageTileModal, openButtonTileModal, setAddWidgetModalOpen } =useActions(dashboardLogic)- const { push } = useActions(router)const options = getDashboardAddTileOptions({- dashboardWidgetsEnabled,onAddInsight: openAddInsightModal,onAddText: openTextTileModal,onAddImage: openImageTileModal,onAddButton: openButtonTileModal,- push,setAddWidgetModalOpen,})@@ -27,13 +22,11 @@ export function DashboardAddTileSubMenu(): JSX.Element {{options.map((option) => (<SceneMenuBarItemkey={option.key}- // The beta widget link navigates to settings. Everything else opens a modal.- opensFloatingUi={option.key !== 'widget-preview'}- tooltip={option.tooltip}+ opensFloatingUionClick={option.onClick}data-attr={`dashboard-menubar-add-${option.key}`}>- {option.tag === 'beta' ? `${option.label} (beta)` : option.label}+ {option.label}</SceneMenuBarItem>))}</SceneMenuBarSubMenu>diff --git a/frontend/src/scenes/dashboard/DashboardHeaderActions.tsx b/frontend/src/scenes/dashboard/DashboardHeaderActions.tsxindex 80e9720998b9..82deb57f72b6 100644--- a/frontend/src/scenes/dashboard/DashboardHeaderActions.tsx+++ b/frontend/src/scenes/dashboard/DashboardHeaderActions.tsx@@ -32,7 +32,6 @@ const ADD_TILE_MENU_DATA_ATTRS: Record<DashboardAddTileKey, string> = {image: 'dashboard-add-image-tile',button: 'dashboard-add-button-tile',widget: 'dashboard-add-widget',- 'widget-preview': 'dashboard-add-widget-preview',}export function getAddTileMenuItems({@@ -42,7 +41,6 @@ export function getAddTileMenuItems({const items: LemonMenuItem[] = getDashboardAddTileOptions(handlers).map((option) => ({label: option.label,tag: option.tag,- tooltip: option.tooltip,onClick: () => {onBeforeSelect?.()option.onClick()@@ -54,7 +52,7 @@ export function getAddTileMenuItems({}export function DashboardAddTileButton(): JSX.Element | null {- const { dashboard, dashboardWidgetsEnabled, tiles } = useValues(dashboardLogic)+ const { dashboard, tiles } = useValues(dashboardLogic)const {loadDashboard,setAddWidgetModalOpen,@@ -63,7 +61,6 @@ export function DashboardAddTileButton(): JSX.Element | null {openImageTileModal,openButtonTileModal,} = useActions(dashboardLogic)- const { push } = useActions(router)const { reportDashboardAddMenuOpened } = useActions(eventUsageLogic)if (!dashboard || tiles.length === 0) {@@ -97,12 +94,10 @@ export function DashboardAddTileButton(): JSX.Element | null {><LemonMenuitems={getAddTileMenuItems({- dashboardWidgetsEnabled,onAddInsight: openAddInsightModal,onAddText: openTextTileModal,onAddImage: openImageTileModal,onAddButton: openButtonTileModal,- push,setAddWidgetModalOpen,})}onVisibilityChange={(visible) => {diff --git a/frontend/src/scenes/dashboard/DashboardItems.test.tsx b/frontend/src/scenes/dashboard/DashboardItems.test.tsxindex 88422e2a9a20..85843d9224c9 100644--- a/frontend/src/scenes/dashboard/DashboardItems.test.tsx+++ b/frontend/src/scenes/dashboard/DashboardItems.test.tsx@@ -408,7 +408,6 @@ describe('DashboardItems', () => {dataColorThemeId: null,canEditDashboard: false,layoutZoom: 1,- dashboardWidgetsEnabled: true,widgetResultsByTileId: {},widgetRefreshStatus: {},}@@ -446,7 +445,6 @@ describe('DashboardItems', () => {dataColorThemeId: null,canEditDashboard: true,layoutZoom: 1,- dashboardWidgetsEnabled: true,widgetResultsByTileId: {},widgetRefreshStatus: {},}@@ -499,7 +497,6 @@ describe('DashboardItems', () => {dataColorThemeId: null,canEditDashboard: true,layoutZoom: 1,- dashboardWidgetsEnabled: true,widgetResultsByTileId: {},widgetRefreshStatus: {},}@@ -556,7 +553,6 @@ describe('DashboardItems', () => {dataColorThemeId: null,canEditDashboard: true,layoutZoom: 1,- dashboardWidgetsEnabled: true,widgetResultsByTileId: {},widgetRefreshStatus: {},}diff --git a/frontend/src/scenes/dashboard/DashboardItems.tsx b/frontend/src/scenes/dashboard/DashboardItems.tsxindex fb59735b5abd..c1391c676ee8 100644--- a/frontend/src/scenes/dashboard/DashboardItems.tsx+++ b/frontend/src/scenes/dashboard/DashboardItems.tsx@@ -100,7 +100,6 @@ export function DashboardItems({ showCreateAnomalyAlertButton }: DashboardItemsPeffectiveBreakdownColors,dataColorThemeId,canEditDashboard,- dashboardWidgetsEnabled,widgetResultsByTileId,widgetRefreshStatus,scrollToBottomSignal,@@ -256,7 +255,7 @@ export function DashboardItems({ showCreateAnomalyAlertButton }: DashboardItemsP[gridGap, spacingFactor])- const widgetTilesShown = dashboardWidgetsEnabled && isWidgetTileVisibleOnPlacement(placement)+ const widgetTilesShown = isWidgetTileVisibleOnPlacement(placement)const activeBreakpoint = sizeKey ?? 'sm'const groupTitlesByTileId = useMemo(() =>diff --git a/frontend/src/scenes/dashboard/DashboardModals.test.tsx b/frontend/src/scenes/dashboard/DashboardModals.test.tsxindex 29da45d52a6d..728cbeba652a 100644--- a/frontend/src/scenes/dashboard/DashboardModals.test.tsx+++ b/frontend/src/scenes/dashboard/DashboardModals.test.tsx@@ -121,7 +121,6 @@ describe('DashboardModals', () => {buttonTileId: null,terraformModalOpen: false,addWidgetModalOpen: false,- dashboardWidgetsEnabled: false,addWidgetTileLoading: false,}}@@ -164,7 +163,6 @@ describe('DashboardModals', () => {buttonTileId: null,terraformModalOpen: false,addWidgetModalOpen: false,- dashboardWidgetsEnabled: false,addWidgetTileLoading: false,[visibleKey]: true,}diff --git a/frontend/src/scenes/dashboard/DashboardModals.tsx b/frontend/src/scenes/dashboard/DashboardModals.tsxindex 72d7ccdf7bda..3b09840230cf 100644--- a/frontend/src/scenes/dashboard/DashboardModals.tsx+++ b/frontend/src/scenes/dashboard/DashboardModals.tsx@@ -53,7 +53,6 @@ export function DashboardModals({ dashboard }: { dashboard: DashboardType }): JSbuttonTileId,terraformModalOpen,addWidgetModalOpen,- dashboardWidgetsEnabled,addWidgetTileLoading,} = useValues(dashboardLogic)const { setTerraformModalOpen, setAddWidgetModalOpen, addWidgetTiles, closeTileModal } = useActions(dashboardLogic)@@ -61,11 +60,10 @@ export function DashboardModals({ dashboard }: { dashboard: DashboardType }): JSconst { push } = useActions(router)const { user } = useValues(userLogic)const isSharingOpen = dashboardMode === DashboardMode.Sharing- const isAddWidgetOpen = dashboardWidgetsEnabled && addWidgetModalOpen// Grace-extended so each modal's exit animation finishes before its lazy subtree unmounts.const shouldRenderSubscriptions = useKeepMountedWhileOpen(showSubscriptions)const shouldRenderSharing = useKeepMountedWhileOpen(isSharingOpen)- const shouldRenderAddWidget = useKeepMountedWhileOpen(isAddWidgetOpen)+ const shouldRenderAddWidget = useKeepMountedWhileOpen(addWidgetModalOpen)const shouldRenderTerraform = useKeepMountedWhileOpen(terraformModalOpen)const textRouteTile =textTileId !== null ? dashboard.tiles?.find((tile) => tile.id === Number(textTileId)) : undefined@@ -163,13 +161,13 @@ export function DashboardModals({ dashboard }: { dashboard: DashboardType }): JS<Suspensefallback={<DashboardModalLoading- isOpen={isAddWidgetOpen}+ isOpen={addWidgetModalOpen}onClose={() => setAddWidgetModalOpen(false)}/>}><AddWidgetModal- isOpen={isAddWidgetOpen}+ isOpen={addWidgetModalOpen}onClose={() => setAddWidgetModalOpen(false)}loading={addWidgetTileLoading}onAdd={async (widgets) => {diff --git a/frontend/src/scenes/dashboard/EmptyDashboardComponent.test.tsx b/frontend/src/scenes/dashboard/EmptyDashboardComponent.test.tsxindex 51c2d46da286..0be86db859de 100644--- a/frontend/src/scenes/dashboard/EmptyDashboardComponent.test.tsx+++ b/frontend/src/scenes/dashboard/EmptyDashboardComponent.test.tsx@@ -3,12 +3,8 @@ import '@testing-library/jest-dom'import { cleanup, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { BindLogic } from 'kea'-import { router } from 'kea-router'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { maxGlobalLogic } from 'scenes/max/maxGlobalLogic'-import { urls } from 'scenes/urls'import { useMocks } from '~/mocks/jest'import { initKeaTests } from '~/test/init'@@ -53,7 +49,6 @@ describe('EmptyDashboardComponent', () => {},})initKeaTests()- featureFlagLogic.mount()maxGlobalLogic.mount()})@@ -61,14 +56,10 @@ describe('EmptyDashboardComponent', () => {cleanup()})- function renderEmptyState(opts: { widgetsEnabled?: boolean; canEdit?: boolean } = {}): {+ function renderEmptyState(opts: { canEdit?: boolean } = {}): {logic: ReturnType<typeof dashboardLogic.build>} {- const { widgetsEnabled = false, canEdit = true } = opts-- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.DASHBOARD_WIDGETS], {- [FEATURE_FLAGS.DASHBOARD_WIDGETS]: widgetsEnabled,- })+ const { canEdit = true } = optsconst logic = dashboardLogic({ id: MOCK_DASHBOARD.id, dashboard: MOCK_DASHBOARD })logic.mount()@@ -127,20 +118,6 @@ describe('EmptyDashboardComponent', () => {logic.unmount()})- it('routes Widget preview to feature previews when flag is disabled', async () => {- const pushSpy = jest.spyOn(router.actions, 'push')- const { logic } = renderEmptyState()-- await openBuildItMyselfMenu()- await userEvent.click(screen.getByText('Widget'))-- expect(pushSpy).toHaveBeenCalledWith(urls.featurePreview(FEATURE_FLAGS.DASHBOARD_WIDGETS))- expect(logic.values.addWidgetModalOpen).toBe(false)-- pushSpy.mockRestore()- logic.unmount()- })-it('shows the shared dashboard add options in the Build it myself menu', async () => {const { logic } = renderEmptyState()@@ -152,25 +129,14 @@ describe('EmptyDashboardComponent', () => {expect(screen.getByText('Image')).toBeInTheDocument()expect(screen.getByText('Button')).toBeInTheDocument()expect(screen.getByText('Widget')).toBeInTheDocument()- expect(screen.getByText('BETA')).toBeInTheDocument()- expect(screen.getAllByText('NEW')).toHaveLength(1)-- logic.unmount()- })-- it('shows Widget in the Build it myself menu when dashboard widgets flag is enabled', async () => {- const { logic } = renderEmptyState({ widgetsEnabled: true })-- await openBuildItMyselfMenu()-- expect(screen.getByText('Widget')).toBeInTheDocument()+ expect(screen.queryByText('BETA')).not.toBeInTheDocument()expect(screen.getAllByText('NEW')).toHaveLength(2)logic.unmount()})it('opens the add widget modal when Widget is clicked', async () => {- const { logic } = renderEmptyState({ widgetsEnabled: true })+ const { logic } = renderEmptyState()await openBuildItMyselfMenu()await userEvent.click(screen.getByText('Widget'))diff --git a/frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx b/frontend/src/scenes/dashboard/EmptyDashboardComponent.tsxindex 470b2c1e11d8..97100cec8b65 100644--- a/frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx+++ b/frontend/src/scenes/dashboard/EmptyDashboardComponent.tsx@@ -1,5 +1,4 @@import { useActions, useValues } from 'kea'-import { router } from 'kea-router'import * as chartPng from '@posthog/brand/hoggies/png/chart'import { IconChevronDown, IconPlus } from '@posthog/icons'@@ -31,25 +30,21 @@ function DashboardEmptyActions({canEdit,dashboard,aiDisabledReason,- dashboardWidgetsEnabled,onAddInsight,onAddText,onAddImage,onAddButton,onAddWidget,- push,onOpenAiWithPrompt,}: {canEdit: booleandashboard: DashboardType | null | undefinedaiDisabledReason: string | false- dashboardWidgetsEnabled: booleanonAddInsight: () => voidonAddText: () => voidonAddImage: () => voidonAddButton: () => voidonAddWidget: () => void- push: (path: string) => voidonOpenAiWithPrompt: (prompt: string) => void}): JSX.Element {const { reportDashboardEmptyAddChartClicked, reportDashboardEmptyWebAnalyticsClicked } = useActions(eventUsageLogic)@@ -95,12 +90,10 @@ function DashboardEmptyActions({<LemonMenuplacement="bottom-start"items={getAddTileMenuItems({- dashboardWidgetsEnabled,onAddInsight: handleAddInsight,onAddText,onAddImage,onAddButton,- push,setAddWidgetModalOpen: onAddWidget,})}>@@ -131,10 +124,9 @@ function DashboardEmptyActions({function EmptyDashboardContent({ canEdit }: { canEdit: boolean }): JSX.Element {const { showAddInsightToDashboardModal } = useActions(addInsightToDashboardLogic)- const { dashboard, dashboardWidgetsEnabled } = useValues(dashboardLogic)+ const { dashboard } = useValues(dashboardLogic)const { setAddWidgetModalOpen, openTextTileModal, openImageTileModal, openButtonTileModal } =useActions(dashboardLogic)- const { push } = useActions(router)const { openSidePanel } = useActions(sidePanelStateLogic)const { dataProcessingAccepted, dataProcessingApprovalDisabledReason } = useValues(maxGlobalLogic)const aiDisabledReason =@@ -167,13 +159,11 @@ function EmptyDashboardContent({ canEdit }: { canEdit: boolean }): JSX.Element {canEdit={canEdit}dashboard={dashboard}aiDisabledReason={aiDisabledReason}- dashboardWidgetsEnabled={dashboardWidgetsEnabled}onAddInsight={showAddInsightToDashboardModal}onAddText={openTextTileModal}onAddImage={openImageTileModal}onAddButton={openButtonTileModal}onAddWidget={() => setAddWidgetModalOpen(true)}- push={push}onOpenAiWithPrompt={onOpenAiWithPrompt}/>}diff --git a/frontend/src/scenes/dashboard/QuillDashboardAddTileButton.tsx b/frontend/src/scenes/dashboard/QuillDashboardAddTileButton.tsxindex d03ae4371739..41741cb50086 100644--- a/frontend/src/scenes/dashboard/QuillDashboardAddTileButton.tsx+++ b/frontend/src/scenes/dashboard/QuillDashboardAddTileButton.tsx@@ -1,5 +1,4 @@import { useActions, useValues } from 'kea'-import { router } from 'kea-router'import { IconPlus } from '@posthog/icons'import {@@ -30,11 +29,10 @@ const ADD_TILE_MENU_DATA_ATTRS: Record<DashboardAddTileKey, string> = {image: 'dashboard-add-image-tile',button: 'dashboard-add-button-tile',widget: 'dashboard-add-widget',- 'widget-preview': 'dashboard-add-widget-preview',}export function QuillDashboardAddTileButton(): JSX.Element | null {- const { dashboard, dashboardWidgetsEnabled, tiles } = useValues(dashboardLogic)+ const { dashboard, tiles } = useValues(dashboardLogic)const {loadDashboard,setAddWidgetModalOpen,@@ -43,7 +41,6 @@ export function QuillDashboardAddTileButton(): JSX.Element | null {openImageTileModal,openButtonTileModal,} = useActions(dashboardLogic)- const { push } = useActions(router)const { reportDashboardAddMenuOpened } = useActions(eventUsageLogic)if (!dashboard || tiles.length === 0) {@@ -56,12 +53,10 @@ export function QuillDashboardAddTileButton(): JSX.Element | null {dashboard.user_access_level)const options = getDashboardAddTileOptions({- dashboardWidgetsEnabled,onAddInsight: openAddInsightModal,onAddText: openTextTileModal,onAddImage: openImageTileModal,onAddButton: openButtonTileModal,- push,setAddWidgetModalOpen,})@@ -110,15 +105,11 @@ export function QuillDashboardAddTileButton(): JSX.Element | null {<DropdownMenuItemkey={option.key}onClick={option.onClick}- tooltip={option.tooltip}data-attr={ADD_TILE_MENU_DATA_ATTRS[option.key]}>{option.label}{option.tag && (- <Badge- variant={option.tag === 'new' ? 'success' : 'warning'}- className="ml-auto"- >+ <Badge variant="success" className="ml-auto">{option.tag.toUpperCase()}</Badge>)}diff --git a/frontend/src/scenes/dashboard/dashboardAddTileOptions.ts b/frontend/src/scenes/dashboard/dashboardAddTileOptions.tsindex 38f7477b9fae..3841302faf62 100644--- a/frontend/src/scenes/dashboard/dashboardAddTileOptions.ts+++ b/frontend/src/scenes/dashboard/dashboardAddTileOptions.ts@@ -1,34 +1,26 @@-import { FEATURE_FLAGS } from 'lib/constants'-import { urls } from 'scenes/urls'--export type DashboardAddTileKey = 'insight' | 'text' | 'image' | 'button' | 'widget' | 'widget-preview'+export type DashboardAddTileKey = 'insight' | 'text' | 'image' | 'button' | 'widget'export interface DashboardAddTileOption {key: DashboardAddTileKeylabel: string- tag?: 'new' | 'beta'- tooltip?: string+ tag?: 'new'onClick: () => void}export interface DashboardAddTileHandlers {- dashboardWidgetsEnabled: booleanonAddInsight: () => voidonAddText: () => voidonAddImage: () => voidonAddButton: () => void- push: (url: string) => voidsetAddWidgetModalOpen: (open: boolean) => void}/** What a dashboard can add, in menu order. The header's Add menu and the scene menu bar both render this list. */export function getDashboardAddTileOptions({- dashboardWidgetsEnabled,onAddInsight,onAddText,onAddImage,onAddButton,- push,setAddWidgetModalOpen,}: DashboardAddTileHandlers): DashboardAddTileOption[] {return [@@ -36,14 +28,6 @@ export function getDashboardAddTileOptions({{ key: 'text', label: 'Add text', onClick: onAddText },{ key: 'image', label: 'Image', tag: 'new', onClick: onAddImage },{ key: 'button', label: 'Button', onClick: onAddButton },- dashboardWidgetsEnabled- ? { key: 'widget', label: 'Widget', tag: 'new', onClick: () => setAddWidgetModalOpen(true) }- : {- key: 'widget-preview',- label: 'Widget',- tag: 'beta',- tooltip: 'Opens settings to enable the Dashboard widgets beta',- onClick: () => push(urls.featurePreview(FEATURE_FLAGS.DASHBOARD_WIDGETS)),- },+ { key: 'widget', label: 'Widget', tag: 'new', onClick: () => setAddWidgetModalOpen(true) },]}diff --git a/frontend/src/scenes/dashboard/dashboardLogic.test.ts b/frontend/src/scenes/dashboard/dashboardLogic.test.tsindex 8c2120f37c4a..36d974100fce 100644--- a/frontend/src/scenes/dashboard/dashboardLogic.test.ts+++ b/frontend/src/scenes/dashboard/dashboardLogic.test.ts@@ -4755,10 +4755,6 @@ describe('dashboardLogic', () => {}beforeEach(() => {- featureFlagLogic.mount()- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.DASHBOARD_WIDGETS], {- [FEATURE_FLAGS.DASHBOARD_WIDGETS]: true,- })fetchRunWidgetsMock = jest.spyOn(widgetFetchUtils, 'fetchRunWidgets').mockResolvedValue([{tile_id: WIDGET_TILE.id,@@ -4846,21 +4842,6 @@ describe('dashboardLogic', () => {expect(fetchRunWidgetsMock).not.toHaveBeenCalled()})- it('enables widget tiles on public dashboards when tile metadata is present', async () => {- logic = dashboardLogic({- id: 5,- placement: DashboardPlacement.Public,- dashboard: {- ...dashboards[5],- tiles: [...dashboards[5].tiles, WIDGET_TILE],- } as DashboardType,- })- logic.mount()- await expectLogic(logic).toFinishAllListeners()-- expect(logic.values.dashboardWidgetsEnabled).toBe(true)- })-it('refreshDashboardWidgets sets friendly error when run_widgets fails', async () => {logic = dashboardLogic({ id: 5 })logic.mount()diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsxindex 3e13f57b33f6..c8c470853aef 100644--- a/frontend/src/scenes/dashboard/dashboardLogic.tsx+++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx@@ -380,7 +380,6 @@ export interface dashboardLogicValues {dashboardSettingsState: DashboardSettingsStatedashboardStreaming: booleandashboardTileSpacingSaving: boolean- dashboardWidgetsEnabled: booleandataColorTheme: DataColorTheme | nulldataColorThemeId: number | nulleffectiveBreakdownColors: BreakdownColorConfig[]@@ -1315,11 +1314,6 @@ export interface dashboardLogicMeta {currentLayoutSize: (containerWidth: number | null) => 'sm' | 'xs'tiles: (dashboard: DashboardType | null) => DashboardTile[]widgetTiles: (tiles: DashboardTile[]) => DashboardTile[]- dashboardWidgetsEnabled: (- featureFlags: FeatureFlagsSet,- tiles: DashboardTile[],- placement: DashboardPlacement- ) => booleaninsightTiles: (tiles: DashboardTile[]) => DashboardTile[]textTiles: (tiles: DashboardTile[]) => DashboardTile[]dashboardControlScopes: (insightTiles: DashboardTile[]) => Record<DashboardControl, DashboardControlScope>@@ -1345,8 +1339,7 @@ export interface dashboardLogicMeta {fetchedAt?: numberloading?: boolean}- >,- dashboardWidgetsEnabled: boolean+ >) => number | nullblockRefresh: (nextAllowedDashboardRefresh: Dayjs | null,@@ -1361,7 +1354,6 @@ export interface dashboardLogicMeta {}>,refreshEligibilityTick: number,- dashboardWidgetsEnabled: boolean,placement: DashboardPlacement,pageVisibility: boolean) => boolean@@ -3259,21 +3251,6 @@ export const dashboardLogic = kea<dashboardLogicType>([(dashboard: DashboardType | null) => dashboard?.tiles?.filter((t) => !t.deleted) || [],],widgetTiles: [(s) => [s.tiles], (tiles: DashboardTile[]) => tiles.filter((t) => !!t.widget)],- dashboardWidgetsEnabled: [- (s) => [s.featureFlags, s.tiles, s.placement],- (- featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet,- tiles: DashboardTile[],- placement: DashboardPlacement- ): boolean => {- // Shared dashboards don't receive team feature flags; render widget tiles when- // metadata is already present on the exported dashboard payload.- if (placement === DashboardPlacement.Public && tiles.some((tile) => !!tile.widget)) {- return true- }- return !!featureFlags[FEATURE_FLAGS.DASHBOARD_WIDGETS]- },- ],insightTiles: [(s) => [s.tiles],(tiles: DashboardTile[]) => tiles.filter((t) => !!t.insight).filter((i) => !i.insight?.deleted),@@ -3357,7 +3334,7 @@ export const dashboardLogic = kea<dashboardLogicType>([},],nextWidgetStaleAt: [- (s) => [s.widgetTiles, s.widgetRefreshStatus, s.dashboardWidgetsEnabled],+ (s) => [s.widgetTiles, s.widgetRefreshStatus],(widgetTiles: DashboardTile[],widgetRefreshStatus: Record<@@ -3367,12 +3344,8 @@ export const dashboardLogic = kea<dashboardLogicType>([fetchedAt?: numberloading?: boolean}- >,- dashboardWidgetsEnabled: boolean+ >): number | null => {- if (!dashboardWidgetsEnabled) {- return null- }const deadlines = widgetTiles.map((tile) => {const status = widgetRefreshStatus[tile.id]@@ -3392,7 +3365,6 @@ export const dashboardLogic = kea<dashboardLogicType>([s.widgetTiles,s.widgetRefreshStatus,s.refreshEligibilityTick,- s.dashboardWidgetsEnabled,s.placement,s.pageVisibility,],@@ -3402,7 +3374,6 @@ export const dashboardLogic = kea<dashboardLogicType>([widgetTiles: DashboardTile[],widgetRefreshStatus: Record<number, { loading?: boolean; error?: string | null; fetchedAt?: number }>,_refreshEligibilityTick: number,- dashboardWidgetsEnabled: boolean,placement: DashboardPlacement) => {return (@@ -3411,13 +3382,10 @@ export const dashboardLogic = kea<dashboardLogicType>([!!nextAllowedDashboardRefresh &&nextAllowedDashboardRefresh?.isAfter(now()) &&!isEffectiveRefreshStale(effectiveLastRefresh) &&- !(- dashboardWidgetsEnabled &&- widgetTiles.some((tile) => {- const status = widgetRefreshStatus[tile.id]- return !status?.error && isWidgetStale(status)- })- )+ !widgetTiles.some((tile) => {+ const status = widgetRefreshStatus[tile.id]+ return !status?.error && isWidgetStale(status)+ }))},],@@ -4061,7 +4029,7 @@ export const dashboardLogic = kea<dashboardLogicType>([cache.widgetTileIdsBeforeDuplicate = new Set(values.widgetTiles.map((tile) => tile.id))},duplicateTileSuccess: ({ dashboard }) => {- if (!dashboard || !values.dashboardWidgetsEnabled) {+ if (!dashboard) {return}@@ -4441,11 +4409,7 @@ export const dashboardLogic = kea<dashboardLogicType>([triggerDashboardRefresh: () => {actions.resetInterval()actions.refreshDashboardItems({ action: RefreshDashboardItemsAction.Refresh, forceRefresh: true })- if (- values.dashboardWidgetsEnabled &&- values.placement !== DashboardPlacement.Export &&- values.placement !== DashboardPlacement.Public- ) {+ if (values.placement !== DashboardPlacement.Export && values.placement !== DashboardPlacement.Public) {const widgetTileIds = values.widgetTiles.map((tile) => tile.id)if (widgetTileIds.length > 0) {actions.refreshDashboardWidgets({ tileIds: widgetTileIds, forceRefresh: true })@@ -4745,11 +4709,7 @@ export const dashboardLogic = kea<dashboardLogicType>([actions.forceRefreshIfStale()}- if (- values.dashboardWidgetsEnabled &&- values.placement !== DashboardPlacement.Export &&- values.placement !== DashboardPlacement.Public- ) {+ if (values.placement !== DashboardPlacement.Export && values.placement !== DashboardPlacement.Public) {const widgetTileIds = values.widgetTiles.map((tile) => tile.id)if (widgetTileIds.length > 0) {actions.refreshDashboardWidgets({ tileIds: widgetTileIds, forceRefresh: !!forceRefresh })@@ -4757,11 +4717,7 @@ export const dashboardLogic = kea<dashboardLogicType>([}},refreshDashboardWidgets: async ({ tileIds, forceRefresh }, breakpoint) => {- if (- values.placement === DashboardPlacement.Export ||- values.placement === DashboardPlacement.Public ||- !values.dashboardWidgetsEnabled- ) {+ if (values.placement === DashboardPlacement.Export || values.placement === DashboardPlacement.Public) {return}diff --git a/products/access_control/backend/facade/user_access_control.py b/products/access_control/backend/facade/user_access_control.pyindex e1db0e92be64..ac1c43779f1e 100644--- a/products/access_control/backend/facade/user_access_control.py+++ b/products/access_control/backend/facade/user_access_control.py@@ -882,7 +882,7 @@ class UserAccessControl:@cached_propertydef _is_project_admin(self) -> bool:- return self._team is not None and self.get_user_access_level(self._team) == "admin"+ return self._team is not None and self.get_user_access_level(self._team, explicit=True) == "admin"def has_object_access_limit(self, resource: APIScopeObject, resource_id: str) -> bool:if resource != "dashboard" or self.is_organization_admin or not self.access_controls_supported:diff --git a/products/dashboards/backend/api/dashboard.py b/products/dashboards/backend/api/dashboard.pyindex aed9900accf2..bf54959a2e39 100644--- a/products/dashboards/backend/api/dashboard.py+++ b/products/dashboards/backend/api/dashboard.py@@ -143,7 +143,6 @@ from products.dashboards.backend.constants import (RUN_INSIGHTS_MIN_TILE_CHARS,)from products.dashboards.backend.facade.api import DashboardTileBasicSerializer, tile_ids_prefetch-from products.dashboards.backend.feature_flags import dashboard_widgets_enabledfrom products.dashboards.backend.models.dashboard import (DASHBOARD_GRID_COMPACTION_MODES,DASHBOARD_GRID_SPACING_GAPS,@@ -2608,9 +2607,6 @@ class DashboardSerializer(DashboardMetadataSerializer):widget_json: dict = tile_data.get("widget", {})widget_data = DashboardSerializer._validated_patch_widget_payload(widget_json)- if not dashboard_widgets_enabled(team=instance.team, user=user):- raise serializers.ValidationError({"widget": "Dashboard widgets are not enabled for this project."})-user_access_control = UserAccessControl(user=user, team=instance.team)existing_widget_id = widget_data.get("id")@@ -3336,8 +3332,6 @@ class DashboardsViewSet(self.check_object_permissions(request, to_dashboard_obj)if tile.widget_id is not None:request_user = cast(User, request.user)- if not dashboard_widgets_enabled(team=self.team, user=request_user):- raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")user_access_control = UserAccessControl(user=request_user, team=self.team)if tile.widget is None:raise exceptions.ValidationError("Widget tile is missing its widget.")@@ -3395,8 +3389,6 @@ class DashboardsViewSet()if tile.widget_id is not None:- if not dashboard_widgets_enabled(team=self.team, user=cast(User, request.user)):- raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")if tile.widget is None:raise exceptions.ValidationError("Widget tile is missing its widget.")DashboardSerializer._check_widget_tile_product_access(tile.widget, user_access_control)@@ -3765,9 +3757,6 @@ class DashboardsViewSet()@action(methods=["GET"], detail=True, required_scopes=["dashboard:read"])def run_widgets(self, request: Request, *args: Any, **kwargs: Any) -> Response:- if not dashboard_widgets_enabled(team=self.team, user=cast(User, request.user)):- raise exceptions.PermissionDenied("Dashboard widgets are not enabled for this project.")-tile_ids = parse_tile_ids(request.query_params.get("tile_ids"))if not tile_ids:raise exceptions.ValidationError("tile_ids is required.")@@ -3895,9 +3884,6 @@ class DashboardsViewSet(@action(methods=["POST"], detail=True, url_path="widgets/batch", required_scopes=["dashboard:write"])def widgets_batch(self, request: Request, *args: Any, **kwargs: Any) -> Response:"""Add multiple widget tiles to a dashboard in one atomic request."""- if not dashboard_widgets_enabled(team=self.team, user=cast(User, request.user)):- raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")-dashboard = self.get_object()if dashboard.deleted:raise exceptions.NotFound()@@ -3979,9 +3965,6 @@ class DashboardsViewSet(that. All updates succeed or fail together. To add new widgets, use the widgets/batch POST endpoint; toremove one, use delete_tile."""- if not dashboard_widgets_enabled(team=self.team, user=cast(User, request.user)):- raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")-dashboard = self.get_object()if dashboard.deleted:raise exceptions.NotFound()diff --git a/products/dashboards/backend/api/test/test_canvas_app_widget.py b/products/dashboards/backend/api/test/test_canvas_app_widget.pyindex fb558ad0b6e4..c81b6bcb9f6e 100644--- a/products/dashboards/backend/api/test/test_canvas_app_widget.py+++ b/products/dashboards/backend/api/test/test_canvas_app_widget.py@@ -140,18 +140,9 @@ class TestCanvasAppWidgetRunner(CanvasAppWidgetBaseTest):class TestCanvasAppWidgetApi(CanvasAppWidgetBaseTest):- _FLAG_PATCH_TARGETS = (- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- "products.dashboards.backend.widget_create.dashboard_widgets_enabled",- )-def setUp(self) -> None:super().setUp()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- for target in self._FLAG_PATCH_TARGETS:- patcher = patch(target, return_value=True)- patcher.start()- self.addCleanup(patcher.stop)@patch("products.dashboards.backend.widget_create.widget_flag_enabled", return_value=False)def test_adding_a_canvas_app_tile_requires_the_small_software_apps_flag(self, flag_enabled) -> None:diff --git a/products/dashboards/backend/api/test/test_dashboard_widgets.py b/products/dashboards/backend/api/test/test_dashboard_widgets.pyindex d68e9374bb13..7292c8bdf8b0 100644--- a/products/dashboards/backend/api/test/test_dashboard_widgets.py+++ b/products/dashboards/backend/api/test/test_dashboard_widgets.py@@ -29,30 +29,9 @@ from products.product_analytics.backend.facade.models import Insightclass TestDashboardWidgets(APIBaseTest):- _WIDGETS_FLAG_PATCH_TARGETS = (- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- "products.dashboards.backend.widget_create.dashboard_widgets_enabled",- )-def setUp(self) -> None:super().setUp()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- self._widgets_flag_patchers = [patch(target, return_value=True) for target in self._WIDGETS_FLAG_PATCH_TARGETS]- for patcher in self._widgets_flag_patchers:- patcher.start()-- def tearDown(self) -> None:- for patcher in self._widgets_flag_patchers:- patcher.stop()- super().tearDown()-- def _stop_widgets_flag_patchers(self) -> None:- for patcher in self._widgets_flag_patchers:- patcher.stop()-- def _start_widgets_flag_patchers(self) -> None:- for patcher in self._widgets_flag_patchers:- patcher.start()@time_machine.travel("2022-04-01 12:45", tick=False)@override_settings(IN_UNIT_TESTING=True)@@ -257,30 +236,6 @@ class TestDashboardWidgets(APIBaseTest):assert response.json()["attr"] == "widget"assert "widget_type cannot be changed" in response.json()["detail"]- @override_settings(IN_UNIT_TESTING=True)- def test_rejects_widget_update_via_dashboard_patch_when_feature_flag_disabled(self) -> None:- dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})- _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})- tile = dashboard_json["tiles"][0]- tile["widget"]["config"] = {"limit": 12}-- self._stop_widgets_flag_patchers()- try:- with patch(- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- return_value=False,- ):- response = self.client.patch(- f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",- {"tiles": [tile]},- )- finally:- self._start_widgets_flag_patchers()-- assert response.status_code == status.HTTP_400_BAD_REQUEST- assert response.json()["attr"] == "widget"- assert "not enabled" in response.json()["detail"].lower()-@override_settings(IN_UNIT_TESTING=True)def test_duplicate_dashboard_without_deep_clone_still_clones_widgets(self) -> None:dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})@@ -463,24 +418,6 @@ class TestDashboardWidgets(APIBaseTest):assert response.json()["detail"] == "You do not have access to error tracking."assert not DashboardWidget.all_teams.filter(team_id=self.team.id).exists()- @override_settings(IN_UNIT_TESTING=True)- def test_create_from_template_json_widget_rejects_when_flag_disabled(self) -> None:- self._stop_widgets_flag_patchers()- try:- with patch(- "products.dashboards.backend.widget_create.dashboard_widgets_enabled",- return_value=False,- ):- response = self.client.post(- f"/api/projects/{self.team.id}/dashboards/create_from_template_json",- {"template": self._widget_template_payload()},- )- finally:- self._start_widgets_flag_patchers()-- assert response.status_code == status.HTTP_400_BAD_REQUEST- assert Dashboard.objects.filter(team_id=self.team.id, deleted=False).count() == 0-@override_settings(IN_UNIT_TESTING=True)def test_create_from_template_json_widget_rejects_unknown_widget_type(self) -> None:response = self.client.post(@@ -654,25 +591,6 @@ class TestDashboardWidgets(APIBaseTest):)assert response.status_code == status.HTTP_400_BAD_REQUEST- @override_settings(IN_UNIT_TESTING=True)- def test_widgets_batch_endpoint_requires_feature_flag(self) -> None:- self._stop_widgets_flag_patchers()- dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})-- try:- with patch(- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- return_value=False,- ):- response = self.client.post(- f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",- {"widgets": [{"widget_type": "error_tracking_list", "config": {"limit": 5}}]},- )- finally:- self._start_widgets_flag_patchers()-- assert response.status_code == status.HTTP_400_BAD_REQUEST-@override_settings(IN_UNIT_TESTING=True)@patch("products.dashboards.backend.api.dashboard.report_user_action")def test_add_widget_tile_via_patch_fires_tile_added_event(self, mock_report_user_action) -> None:@@ -1192,19 +1110,9 @@ class TestDashboardWidgets(APIBaseTest):class TestDashboardWidgetsBatchUpdate(APIBaseTest):- _WIDGETS_FLAG_PATCH_TARGETS = TestDashboardWidgets._WIDGETS_FLAG_PATCH_TARGETS-def setUp(self) -> None:super().setUp()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- self._widgets_flag_patchers = [patch(target, return_value=True) for target in self._WIDGETS_FLAG_PATCH_TARGETS]- for patcher in self._widgets_flag_patchers:- patcher.start()-- def tearDown(self) -> None:- for patcher in self._widgets_flag_patchers:- patcher.stop()- super().tearDown()def _batch_update(self, dashboard_id: int, widgets: list[dict[str, Any]], team_id: int | None = None) -> Any:team_id = team_id or self.team.id@@ -1388,27 +1296,6 @@ class TestDashboardWidgetsBatchUpdate(APIBaseTest):response = self._batch_update(dashboard_b, [{"tile_id": foreign_tile_id, "config": {"limit": 9}}])assert response.status_code == status.HTTP_404_NOT_FOUND- @override_settings(IN_UNIT_TESTING=True)- def test_requires_feature_flag(self) -> None:- dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})- _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 5})- tile = dashboard_json["tiles"][0]-- for patcher in self._widgets_flag_patchers:- patcher.stop()- try:- with patch(- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- return_value=False,- ):- response = self._batch_update(dashboard_id, [{"tile_id": tile["id"], "config": {"limit": 9}}])- finally:- for patcher in self._widgets_flag_patchers:- patcher.start()-- assert response.status_code == status.HTTP_400_BAD_REQUEST- assert "not enabled" in response.json()["detail"].lower()-@override_settings(IN_UNIT_TESTING=True)def test_rejects_empty_list(self) -> None:dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})@@ -1522,16 +1409,6 @@ class TestDashboardWidgetOpenApiSchema(APIBaseTest):def setUp(self) -> None:super().setUp()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- self._widgets_flag_patchers = [- patch(target, return_value=True) for target in TestDashboardWidgets._WIDGETS_FLAG_PATCH_TARGETS- ]- for patcher in self._widgets_flag_patchers:- patcher.start()-- def tearDown(self) -> None:- for patcher in self._widgets_flag_patchers:- patcher.stop()- super().tearDown()def test_add_dashboard_widget_openapi_schema_uses_widget_type_discriminator(self) -> None:schema = SchemaGenerator().get_schema(request=None, public=True)diff --git a/products/dashboards/backend/api/test/test_experiment_widgets.py b/products/dashboards/backend/api/test/test_experiment_widgets.pyindex ec5632a6be2d..9e6caa554335 100644--- a/products/dashboards/backend/api/test/test_experiment_widgets.py+++ b/products/dashboards/backend/api/test/test_experiment_widgets.py@@ -475,21 +475,9 @@ class TestExperimentWidgetsViaRunWidgetsEndpoint(APIBaseTest):_InlineExecutor,)self.executor_patcher.start()- self.widgets_flag_patcher = patch(- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- return_value=True,- )- self.widget_create_flag_patcher = patch(- "products.dashboards.backend.widget_create.dashboard_widgets_enabled",- return_value=True,- )- self.widgets_flag_patcher.start()- self.widget_create_flag_patcher.start()def tearDown(self) -> None:self.executor_patcher.stop()- self.widget_create_flag_patcher.stop()- self.widgets_flag_patcher.stop()super().tearDown()def _run(self, dashboard_id: int, tile_ids: list[int]) -> dict[str, Any]:diff --git a/products/dashboards/backend/api/test/test_run_widgets.py b/products/dashboards/backend/api/test/test_run_widgets.pyindex 47b91c636a19..3a2a9a4daa63 100644--- a/products/dashboards/backend/api/test/test_run_widgets.py+++ b/products/dashboards/backend/api/test/test_run_widgets.py@@ -346,21 +346,6 @@ class TestDashboardRunWidgets(APIBaseTest):def setUp(self) -> None:super().setUp()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- self.widgets_flag_patcher = patch(- "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",- return_value=True,- )- self.widget_create_flag_patcher = patch(- "products.dashboards.backend.widget_create.dashboard_widgets_enabled",- return_value=True,- )- self.widgets_flag_patcher.start()- self.widget_create_flag_patcher.start()-- def tearDown(self) -> None:- self.widget_create_flag_patcher.stop()- self.widgets_flag_patcher.stop()- super().tearDown()def _run(self, dashboard_id: int, tile_ids: list[int]) -> dict:response = self.client.get(@@ -1391,15 +1376,6 @@ class TestDashboardRunWidgets(APIBaseTest):self.assertEqual(body["results"][0]["error"], "Tile not found or is not a widget tile.")- @patch("products.dashboards.backend.api.dashboard.dashboard_widgets_enabled", return_value=False)- def test_disabled_when_feature_flag_off(self, _mock_flag: MagicMock) -> None:- dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})- response = self.client.get(- f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",- {"tile_ids": "1"},- )- self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)-def test_run_widgets_denies_without_product_access(self) -> None:dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})_, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, widget_type="error_tracking_list")diff --git a/products/dashboards/backend/feature_flags.py b/products/dashboards/backend/feature_flags.pyindex c2807ebd6f04..394af5404717 100644--- a/products/dashboards/backend/feature_flags.py+++ b/products/dashboards/backend/feature_flags.py@@ -10,8 +10,6 @@ if TYPE_CHECKING:from posthog.models.team import Teamfrom posthog.models.user import User-DASHBOARD_WIDGETS_FLAG = "dashboard-widgets"-def widget_flag_enabled(flag: str, *, team: Team, user: User | None = None) -> bool:"""Match the existing in-app widget flag evaluation."""@@ -32,7 +30,3 @@ def widget_flag_enabled(flag: str, *, team: Team, user: User | None = None) -> bsend_feature_flag_events=False,))---def dashboard_widgets_enabled(*, team: Team, user: User | None = None) -> bool:- return widget_flag_enabled(DASHBOARD_WIDGETS_FLAG, team=team, user=user)diff --git a/products/dashboards/backend/widget_create.py b/products/dashboards/backend/widget_create.pyindex 9fe90f96a782..ae6b03c2bc58 100644--- a/products/dashboards/backend/widget_create.py+++ b/products/dashboards/backend/widget_create.py@@ -9,7 +9,7 @@ from posthog.models.user import Userfrom posthog.resource_limits import LimitKey, check_count_limitfrom products.access_control.backend.facade.user_access_control import UserAccessControl-from products.dashboards.backend.feature_flags import dashboard_widgets_enabled, widget_flag_enabled+from products.dashboards.backend.feature_flags import widget_flag_enabledfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import DashboardTilefrom products.dashboards.backend.models.dashboard_widget import DashboardWidget@@ -28,9 +28,6 @@ def prepare_widget_tile_create(user: User | None = None,user_access_control: UserAccessControl | None = None,) -> tuple[str, dict[str, Any]]:- if not dashboard_widgets_enabled(team=team, user=user):- raise serializers.ValidationError({"widget": "Dashboard widgets are not enabled for this project."})-spec = get_widget_spec(widget_type)if spec is None:raise serializers.ValidationError({"widget_type": f"Unknown widget type: {widget_type}"})diff --git a/products/dashboards/backend/widget_publication.py b/products/dashboards/backend/widget_publication.pyindex 1abe2239722c..5f3ad34a471e 100644--- a/products/dashboards/backend/widget_publication.py+++ b/products/dashboards/backend/widget_publication.py@@ -3,13 +3,12 @@ from typing import Anyfrom django.shortcuts import get_object_or_404from django.utils.timezone import now-from rest_framework.exceptions import PermissionDenied, ValidationError+from rest_framework.exceptions import PermissionDeniedfrom posthog.exceptions import Conflictfrom posthog.models import Team, Userfrom products.access_control.backend.facade.user_access_control import UserAccessControl-from products.dashboards.backend.feature_flags import dashboard_widgets_enabledfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import DashboardTilefrom products.dashboards.backend.models.dashboard_widget import DashboardWidget@@ -44,8 +43,6 @@ class DashboardWidgetPublication:tile = get_object_or_404(DashboardTile, id=tile_id, team_id=team.id, dashboard__deleted=False)dashboard_id = tile.dashboard_idself.dashboard = get_object_or_404(Dashboard, id=dashboard_id, team_id=team.id, deleted=False)- if not dashboard_widgets_enabled(team=team, user=user):- raise ValidationError("Dashboard widgets are not enabled for this project.")if not self.access.check_access_level_for_object(self.dashboard, "editor"):raise PermissionDenied("You don't have edit permissions for this dashboard.")diff --git a/products/dashboards/backend/widget_specs/openapi.py b/products/dashboards/backend/widget_specs/openapi.pyindex 8380ad608be8..bf116a313c89 100644--- a/products/dashboards/backend/widget_specs/openapi.py+++ b/products/dashboards/backend/widget_specs/openapi.py@@ -266,7 +266,7 @@ WidgetCatalogEntryOpenApi = PolymorphicProxySerializer(class WidgetCatalogResponseSerializer(serializers.Serializer):results = serializers.ListField(child=WidgetCatalogEntryOpenApi,- help_text="Registered dashboard widget types available when dashboard-widgets is enabled.",+ help_text="Registered dashboard widget types.",)diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex 4fd666057c19..1548a73b5d3d 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -10930,7 +10930,7 @@ export type WidgetCatalogEntryApi =| CanvasAppWidgetCatalogEntryOpenApiApiexport interface WidgetCatalogResponseApi {- /** Registered dashboard widget types available when dashboard-widgets is enabled. */+ /** Registered dashboard widget types. */results: WidgetCatalogEntryApi[]}diff --git a/products/dashboards/mcp/tools.yaml b/products/dashboards/mcp/tools.yamlindex d800c88af4ed..a1a1086d4803 100644--- a/products/dashboards/mcp/tools.yaml+++ b/products/dashboards/mcp/tools.yaml@@ -387,8 +387,8 @@ tools:title: Copy dashboard tiledescription: >Copy an insight, text card, or widget tile from one dashboard to another. The path dashboard ID is the- destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles require the- dashboard-widgets feature flag and are deep-cloned with a new widget row.+ destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles are+ deep-cloned with a new widget row.param_overrides:id:cast: string-int@@ -406,8 +406,7 @@ tools:description: >Transfer a tile from the source dashboard to another dashboard. This does not resize or reposition the tile.To resize or reposition tiles on a dashboard, use dashboard-update. Provide to_dashboard (destination- dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles; widget- tiles require the dashboard-widgets feature flag on the project.+ dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles.param_overrides:id:cast: string-int@@ -583,7 +582,6 @@ tools:param_overrides:id:cast: string-int- feature_flag: dashboard-widgetsdashboard-widgets-batch-update:operation: dashboards_update_widgets_batchenabled: true@@ -607,7 +605,6 @@ tools:param_overrides:id:cast: string-int- feature_flag: dashboard-widgetsdashboard-widgets-run:operation: dashboards_run_widgets_retrieveenabled: true@@ -620,16 +617,14 @@ tools:enrich_url: '{params.id}'title: Run dashboard widgetsdescription: >- Run live queries for dashboard widget tiles and return results. Requires the dashboard-widgets feature flag.- Call dashboard-get first to find widget tile IDs (tiles with a widget field). Pass tile_ids as a- comma-separated list. Each successful result is a widget-type-specific payload (see run_widgets OpenAPI- response and dashboard-widget-catalog-list config_schema). Returns per-tile errors when the caller lacks- product access for a widget type (see required_product_access on dashboard-widget-catalog-list). Not- available on public/shared dashboard views.+ Run live queries for dashboard widget tiles and return results. Call dashboard-get first to find widget tile+ IDs (tiles with a widget field). Pass tile_ids as a comma-separated list. Each successful result is a+ widget-type-specific payload (see run_widgets OpenAPI response and dashboard-widget-catalog-list+ config_schema). Returns per-tile errors when the caller lacks product access for a widget type (see+ required_product_access on dashboard-widget-catalog-list). Not available on public/shared dashboard views.param_overrides:id:cast: string-int- feature_flag: dashboard-widgetsdashboards-bulk-delete:operation: dashboards_bulk_delete_createenabled: truediff --git a/products/notebooks/backend/test/test_widgets.py b/products/notebooks/backend/test/test_widgets.pyindex 5213d789005a..be22a3089772 100644--- a/products/notebooks/backend/test/test_widgets.py+++ b/products/notebooks/backend/test/test_widgets.py@@ -16,7 +16,7 @@ from django.utils import timezoneimport httpxfrom anthropic import APIStatusErrorfrom parameterized import parameterized-from rest_framework.exceptions import PermissionDenied+from rest_framework.exceptions import PermissionDenied, ValidationErrorfrom posthog.constants import AvailableFeaturefrom posthog.models import Team@@ -707,8 +707,6 @@ class TestWidgetData(APIBaseTest):WidgetSnapshots(self.notebook, lambda _run: None).capture(self.NODE_ID, version.id)assert not NotebookWidgetSnapshot.objects.for_team(self.team.id).exists()- @patch("products.dashboards.backend.widget_publication.dashboard_widgets_enabled", return_value=True)- @patch("products.dashboards.backend.widget_create.dashboard_widgets_enabled", return_value=True)@patch("products.dashboards.backend.widget_create.widget_flag_enabled", return_value=True)@patch("products.canvas.backend.facade.notebooks.list_notebook_canvas_versions", return_value=[])def test_dashboard_publication_attaches_results_atomically(self, *_mocks: MagicMock) -> None:@@ -725,7 +723,10 @@ class TestWidgetData(APIBaseTest):"name": "Results",}- with patch("products.dashboards.backend.widget_create.dashboard_widgets_enabled", return_value=False):+ with patch(+ "products.dashboards.backend.widget_publication.create_widget_tile",+ side_effect=ValidationError("Cannot create widget tile."),+ ):assert self.client.post(path, payload).status_code == 400assert not NotebookWidgetSnapshot.objects.for_team(self.team.id).exists()assert not dashboard.tiles.exists()@@ -849,8 +850,6 @@ class TestWidgetData(APIBaseTest):cleanup_widget_snapshots()assert list(NotebookWidgetSnapshot.objects.for_team(self.team.id).values_list("id", flat=True)) == [recent.id]- @patch("products.dashboards.backend.widget_publication.dashboard_widgets_enabled", return_value=True)- @patch("products.dashboards.backend.widget_create.dashboard_widgets_enabled", return_value=True)@patch("products.dashboards.backend.widget_create.widget_flag_enabled", return_value=True)@patch("products.canvas.backend.facade.notebooks.list_notebook_canvas_versions", return_value=[])def test_dashboard_refresh_does_not_share_the_snapshot_creation_bucket(self, *_mocks: MagicMock) -> None:diff --git a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.stories.tsx b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.stories.tsxindex 007945401fc3..7bd01292b663 100644--- a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.stories.tsx+++ b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.stories.tsx@@ -2,7 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react'import { BindLogic, useActions, useMountedLogic } from 'kea'import { useEffect } from 'react'-import { FEATURE_FLAGS } from 'lib/constants'import { notebookTestTemplate } from 'scenes/notebooks/Notebook/__mocks__/notebook-template-for-snapshot'import { buildMarkdownNotebookContent } from 'scenes/notebooks/Notebook/markdownNotebookV2'import { MarkdownNotebookV2 } from 'scenes/notebooks/Notebook/MarkdownNotebookV2Renderer'@@ -41,7 +40,6 @@ const meta: Meta = {component: WidgetNotebook,parameters: {layout: 'fullscreen',- featureFlags: [FEATURE_FLAGS.DASHBOARD_WIDGETS],testOptions: {waitForSelector: '[data-attr="notebook-generated-widget-run-button"]',},diff --git a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.test.tsx b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.test.tsxindex b1239e12b9d4..5d891881be5e 100644--- a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.test.tsx+++ b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.test.tsx@@ -6,8 +6,6 @@ import { expectLogic } from 'kea-test-utils'import api from 'lib/api'import { parseMarkdownNotebook } from 'lib/components/MarkdownNotebook/markdown'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { buildMarkdownNotebookContent, getMarkdownNotebookMarkdown } from 'scenes/notebooks/Notebook/markdownNotebookV2'import { MarkdownNotebookV2 } from 'scenes/notebooks/Notebook/MarkdownNotebookV2Renderer'import { NotebookLogicProps, notebookLogic } from 'scenes/notebooks/Notebook/notebookLogic'@@ -74,7 +72,6 @@ describe('NotebookNodeGeneratedWidget', () => {beforeEach(async () => {initKeaTests()- featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.DASHBOARD_WIDGETS]: true })jest.spyOn(api.notebooks, 'collabStream').mockResolvedValue(undefined as never)jest.spyOn(api.notebooks, 'get').mockResolvedValue(cachedNotebook)jest.spyOn(api.notebooks, 'markdownSave').mockImplementation(async (_shortId, notebook) => ({diff --git a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.tsx b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.tsxindex 49757d2aaf83..4eb168377bfe 100644--- a/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.tsx+++ b/products/notebooks/frontend/NotebookNodeGeneratedWidget/NotebookNodeGeneratedWidget.tsx@@ -4,10 +4,8 @@ import { type ReactNode, useEffect } from 'react'import { LemonBanner, LemonButton, LemonSelect } from '@posthog/lemon-ui'import { useComponentPanelState } from 'lib/components/MarkdownNotebook/componentPanelContext'-import { FEATURE_FLAGS } from 'lib/constants'import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'import { Spinner } from 'lib/lemon-ui/Spinner'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { createPostHogWidgetNode } from 'scenes/notebooks/Nodes/NodeWrapper'import { notebookNodeLogic } from 'scenes/notebooks/Nodes/notebookNodeLogic'import { UnsupportedNodePlaceholder } from 'scenes/notebooks/Nodes/sharedNodeSupport'@@ -71,7 +69,6 @@ function ExpandedWidget({const { isEditable, notebookLogic } = useValues(nodeLogic)const { currentTeamId } = useValues(teamLogic)const { user } = useValues(userLogic)- const { featureFlags } = useValues(featureFlagLogic)const notebookShortId = notebookLogic.props.shortId// Markdown props are cast without runtime validation, so a hand-written or legacy// tag can supply a non-string prompt or an unsupported model. Coerce both here, the@@ -149,12 +146,7 @@ function ExpandedWidget({const selectedArtifactUrl =selectedVersionId === status?.current_version_id ? status?.artifact_url : selectedVersion?.artifact_urlconst canAddToDashboard =- isEditable &&- selectedVersionId &&- selectedArtifactUrl &&- currentTeamId &&- !artifactUnavailable &&- featureFlags[FEATURE_FLAGS.DASHBOARD_WIDGETS]+ isEditable && selectedVersionId && selectedArtifactUrl && currentTeamId && !artifactUnavailableconst selectedBuildHash =selectedVersionId === status?.current_version_id? (status?.build_hash ?? null)diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 061a0321ad67..171400545346 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -3578,7 +3578,7 @@}},"dashboard-tile-copy": {- "description": "Copy an insight, text card, or widget tile from one dashboard to another. The path dashboard ID is the destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles require the dashboard-widgets feature flag and are deep-cloned with a new widget row.",+ "description": "Copy an insight, text card, or widget tile from one dashboard to another. The path dashboard ID is the destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles are deep-cloned with a new widget row.","category": "Dashboards","feature": "dashboards","summary": "Copy dashboard tile",@@ -3592,7 +3592,7 @@}},"dashboard-transfer-tile": {- "description": "Transfer a tile from the source dashboard to another dashboard. This does not resize or reposition the tile. To resize or reposition tiles on a dashboard, use dashboard-update. Provide to_dashboard (destination dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles; widget tiles require the dashboard-widgets feature flag on the project.",+ "description": "Transfer a tile from the source dashboard to another dashboard. This does not resize or reposition the tile. To resize or reposition tiles on a dashboard, use dashboard-update. Provide to_dashboard (destination dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles.","category": "Dashboards","feature": "dashboards","summary": "Transfer dashboard tile",@@ -3659,8 +3659,7 @@"idempotentHint": false,"openWorldHint": true,"readOnlyHint": false- },- "feature_flag": "dashboard-widgets"+ }},"dashboard-widgets-batch-update": {"description": "Update the settings of existing widgets in place atomically (1–10), without delete-and-re-add. Edits widget settings only — `config`, `name`, and `description`. Pass `widgets` as an array of payloads, each identified by its DashboardTile `tile_id` (use dashboard-get to look up widget tile IDs) plus the settings to change. Only the fields you provide per widget are updated; omitted fields are left unchanged. Optionally pass `widget_type` to get the typed config shape; widget_type is immutable. Config shape is per widget_type — see dashboard-widget-catalog-list. All updates succeed or fail together. Tile placement (layout, show_description) is not changed here — use dashboard-update or dashboard-reorder-tiles for that. To add new widgets, use dashboard-widgets-batch-add; to remove one, use dashboard-delete-tile.",@@ -3674,11 +3673,10 @@"idempotentHint": true,"openWorldHint": true,"readOnlyHint": false- },- "feature_flag": "dashboard-widgets"+ }},"dashboard-widgets-run": {- "description": "Run live queries for dashboard widget tiles and return results. Requires the dashboard-widgets feature flag. Call dashboard-get first to find widget tile IDs (tiles with a widget field). Pass tile_ids as a comma-separated list. Each successful result is a widget-type-specific payload (see run_widgets OpenAPI response and dashboard-widget-catalog-list config_schema). Returns per-tile errors when the caller lacks product access for a widget type (see required_product_access on dashboard-widget-catalog-list). Not available on public/shared dashboard views.",+ "description": "Run live queries for dashboard widget tiles and return results. Call dashboard-get first to find widget tile IDs (tiles with a widget field). Pass tile_ids as a comma-separated list. Each successful result is a widget-type-specific payload (see run_widgets OpenAPI response and dashboard-widget-catalog-list config_schema). Returns per-tile errors when the caller lacks product access for a widget type (see required_product_access on dashboard-widget-catalog-list). Not available on public/shared dashboard views.","category": "Dashboards","feature": "dashboards","summary": "Run dashboard widgets",@@ -3689,8 +3687,7 @@"idempotentHint": true,"openWorldHint": true,"readOnlyHint": true- },- "feature_flag": "dashboard-widgets"+ }},"dashboards-bulk-delete": {"description": "Soft-delete up to 100 dashboards by ID. Saved insights are kept by default. Set delete_insights to true to also delete insights with no remaining dashboard. Returns deleted IDs and skipped IDs with reasons. Dashboards that the caller cannot edit are skipped. To restore a dashboard, use the REST API: PATCH /api/projects/{project_id}/dashboards/{id}/ with {\"deleted\": false}. The dashboard-update MCP tool does not support restoring deleted dashboards.",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex b0ffda933f63..8d2bacaf36b8 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -3593,7 +3593,7 @@}},"dashboard-tile-copy": {- "description": "Copy an insight, text card, or widget tile from one dashboard to another. The path dashboard ID is the destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles require the dashboard-widgets feature flag and are deep-cloned with a new widget row.",+ "description": "Copy an insight, text card, or widget tile from one dashboard to another. The path dashboard ID is the destination. Provide fromDashboardId (source dashboard) and tileId (tile to copy). Widget tiles are deep-cloned with a new widget row.","category": "Dashboards","feature": "dashboards","summary": "Copy dashboard tile",@@ -3607,7 +3607,7 @@}},"dashboard-transfer-tile": {- "description": "Transfer a tile from the source dashboard to another dashboard. This does not resize or reposition the tile. To resize or reposition tiles on a dashboard, use dashboard-update. Provide to_dashboard (destination dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles; widget tiles require the dashboard-widgets feature flag on the project.",+ "description": "Transfer a tile from the source dashboard to another dashboard. This does not resize or reposition the tile. To resize or reposition tiles on a dashboard, use dashboard-update. Provide to_dashboard (destination dashboard ID) and tile.id (tile ID from dashboard-get). Works for insight, text, and widget tiles.","category": "Dashboards","feature": "dashboards","summary": "Transfer dashboard tile",@@ -3674,8 +3674,7 @@"idempotentHint": false,"openWorldHint": true,"readOnlyHint": false- },- "feature_flag": "dashboard-widgets"+ }},"dashboard-widgets-batch-update": {"description": "Update the settings of existing widgets in place atomically (1–10), without delete-and-re-add. Edits widget settings only — `config`, `name`, and `description`. Pass `widgets` as an array of payloads, each identified by its DashboardTile `tile_id` (use dashboard-get to look up widget tile IDs) plus the settings to change. Only the fields you provide per widget are updated; omitted fields are left unchanged. Optionally pass `widget_type` to get the typed config shape; widget_type is immutable. Config shape is per widget_type — see dashboard-widget-catalog-list. All updates succeed or fail together. Tile placement (layout, show_description) is not changed here — use dashboard-update or dashboard-reorder-tiles for that. To add new widgets, use dashboard-widgets-batch-add; to remove one, use dashboard-delete-tile.",@@ -3689,11 +3688,10 @@"idempotentHint": true,"openWorldHint": true,"readOnlyHint": false- },- "feature_flag": "dashboard-widgets"+ }},"dashboard-widgets-run": {- "description": "Run live queries for dashboard widget tiles and return results. Requires the dashboard-widgets feature flag. Call dashboard-get first to find widget tile IDs (tiles with a widget field). Pass tile_ids as a comma-separated list. Each successful result is a widget-type-specific payload (see run_widgets OpenAPI response and dashboard-widget-catalog-list config_schema). Returns per-tile errors when the caller lacks product access for a widget type (see required_product_access on dashboard-widget-catalog-list). Not available on public/shared dashboard views.",+ "description": "Run live queries for dashboard widget tiles and return results. Call dashboard-get first to find widget tile IDs (tiles with a widget field). Pass tile_ids as a comma-separated list. Each successful result is a widget-type-specific payload (see run_widgets OpenAPI response and dashboard-widget-catalog-list config_schema). Returns per-tile errors when the caller lacks product access for a widget type (see required_product_access on dashboard-widget-catalog-list). Not available on public/shared dashboard views.","category": "Dashboards","feature": "dashboards","summary": "Run dashboard widgets",@@ -3704,8 +3702,7 @@"idempotentHint": true,"openWorldHint": true,"readOnlyHint": true- },- "feature_flag": "dashboard-widgets"+ }},"dashboards-bulk-delete": {"description": "Soft-delete up to 100 dashboards by ID. Saved insights are kept by default. Set delete_insights to true to also delete insights with no remaining dashboard. Returns deleted IDs and skipped IDs with reasons. Dashboards that the caller cannot edit are skipped. To restore a dashboard, use the REST API: PATCH /api/projects/{project_id}/dashboards/{id}/ with {\"deleted\": false}. The dashboard-update MCP tool does not support restoring deleted dashboards.",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 23072a79705b..0b07d7c7b16b 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -115951,7 +115951,7 @@ export namespace Schemas {export type WidgetCatalogEntry = NotebookWidgetCatalogEntryOpenApi | ActivityEventsListWidgetCatalogEntryOpenApi | ErrorTrackingListWidgetCatalogEntryOpenApi | SessionReplayListWidgetCatalogEntryOpenApi | ExperimentsListWidgetCatalogEntryOpenApi | ExperimentResultsWidgetCatalogEntryOpenApi | SurveyResultsWidgetCatalogEntryOpenApi | LogsListWidgetCatalogEntryOpenApi | ConversationsRecentTicketsWidgetCatalogEntryOpenApi | CanvasAppWidgetCatalogEntryOpenApi;export interface WidgetCatalogResponse {- /** Registered dashboard widget types available when dashboard-widgets is enabled. */+ /** Registered dashboard widget types. */results: WidgetCatalogEntry[];}diff --git a/services/mcp/tests/unit/tool-filtering.test.ts b/services/mcp/tests/unit/tool-filtering.test.tsindex cb3283883934..bc954a23217c 100644--- a/services/mcp/tests/unit/tool-filtering.test.ts+++ b/services/mcp/tests/unit/tool-filtering.test.ts@@ -1115,7 +1115,6 @@ describe('Tool Filtering - Feature Flags', () => {'revamped-py-notebooks','tasks','tasks-mcp-agent-run-start',- 'dashboard-widgets','marketing-analytics-mcp','product-business-knowledge','field-notes',@@ -1144,7 +1143,8 @@ describe('Tool Filtering - Feature Flags', () => {]))expect(flags).toContain('ai-observability-offline-evaluations')- expect(flags).toHaveLength(38)+ expect(allFlags).not.toContain('dashboard-widgets')+ expect(flags).toHaveLength(37)})it('keeps human and task context wiki tools on separate scopes', () => {diff --git a/services/mcp/tests/unit/tool-schema-snapshots.test.ts b/services/mcp/tests/unit/tool-schema-snapshots.test.tsindex 86a1ea36fba8..7fe563329527 100644--- a/services/mcp/tests/unit/tool-schema-snapshots.test.ts+++ b/services/mcp/tests/unit/tool-schema-snapshots.test.ts@@ -86,7 +86,7 @@ async function formatSnapshotJson(snapshotPath: string, schema: unknown): Promisasync function loadSnapshotTools(): Promise<Tool<ZodObjectAny>[]> {// Enable flag-gated tools we snapshot here: tracing (APM spans), tasks, loops,- // dashboard-widgets and experiment setup context. Other flag-gated tools (logs-alerts,+ // experiment setup context. Other flag-gated tools (logs-alerts,// visual-review, etc.) stay off to keep the surface stable.// agent-feedback is always_available and no longer flag-gated, so it appears regardless.const featureFlags = {@@ -94,7 +94,6 @@ async function loadSnapshotTools(): Promise<Tool<ZodObjectAny>[]> {tasks: true,'tasks-mcp-agent-run-start': true,loops: true,- 'dashboard-widgets': true,'agent-platform': true,'experiment-setup-context': true,'scout-trials': true,