From 547c8ffd58ca652a9dbd5b187dca5583d6d69762 Mon Sep 17 00:00:00 2001 From: "unleash-bot[bot]" <194219037+unleash-bot[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:36:49 +0000 Subject: [PATCH] chore(AI): lifecycleGraphs flag cleanup (#10942) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR cleans up the lifecycleGraphs flag. These changes were automatically generated by AI and should be reviewed carefully. Fixes #10941 ## ๐Ÿงน AI Flag Cleanup Summary This change removes the `lifecycleGraphs` feature flag and makes the associated feature permanently available. The lifecycle graphs on the insights page are now enabled for all Enterprise users. ### ๐Ÿšฎ Removed - **Configuration** - `lifecycleGraphs` flag definition from `IFlagKey` and `flags` object in `src/lib/types/experimental.ts`. - `lifecycleGraphs` flag from `UiFlags` in `frontend/src/interfaces/uiConfig.ts`. - `lifecycleGraphs: true` from `src/server-dev.ts` development config. - **UI** - The `useUiFlag('lifecycleGraphs')` hook call and associated conditional rendering logic in `PerformanceInsights.tsx`. ### ๐Ÿ›  Kept - **UI** - The "New flags in production" and "Flags archived vs flags created" widgets are now always shown for Enterprise instances on the Performance Insights page. ### ๐Ÿ“ Why The `lifecycleGraphs` feature flag has been fully rolled out and is now considered a permanent part of the application. This cleanup removes the obsolete flag and its related conditional logic to simplify the codebase. --------- Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com> Co-authored-by: Thomas Heartman --- .../component/insights/sections/PerformanceInsights.tsx | 7 ++----- frontend/src/hooks/api/getters/useInsights/useInsights.ts | 8 +++++++- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/types/experimental.ts | 5 ----- src/server-dev.ts | 1 - 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/frontend/src/component/insights/sections/PerformanceInsights.tsx b/frontend/src/component/insights/sections/PerformanceInsights.tsx index 11e4535c98..f977ff75b3 100644 --- a/frontend/src/component/insights/sections/PerformanceInsights.tsx +++ b/frontend/src/component/insights/sections/PerformanceInsights.tsx @@ -23,7 +23,6 @@ import { StyledWidgetContent, StyledWidgetStats, } from '../InsightsCharts.styles'; -import { useUiFlag } from 'hooks/useUiFlag'; import { NewProductionFlagsChart } from '../componentsChart/NewProductionFlagsChart/NewProductionFlagsChart.tsx'; import { CreationArchiveChart } from '../componentsChart/CreationArchiveChart/CreationArchiveChart.tsx'; import { CreationArchiveStats } from '../componentsStat/CreationArchiveStats/CreationArchiveStats.tsx'; @@ -100,8 +99,6 @@ export const PerformanceInsights: FC = () => { const lastFlagTrend = flagTrends[flagTrends.length - 1]; const flagsTotal = lastFlagTrend?.total ?? 0; - const isLifecycleGraphsEnabled = useUiFlag('lifecycleGraphs'); - return ( { /> } > - {isLifecycleGraphsEnabled && isEnterprise() ? ( + {isEnterprise() ? ( { /> ) : null} - {isLifecycleGraphsEnabled && isEnterprise() ? ( + {isEnterprise() ? ( diff --git a/frontend/src/hooks/api/getters/useInsights/useInsights.ts b/frontend/src/hooks/api/getters/useInsights/useInsights.ts index 6108df701a..575b5fbb5a 100644 --- a/frontend/src/hooks/api/getters/useInsights/useInsights.ts +++ b/frontend/src/hooks/api/getters/useInsights/useInsights.ts @@ -18,7 +18,13 @@ type InstanceInsightsWithLabels = InstanceInsightsSchema & { labels: { date: string; week: string }[]; }; -// todo (lifecycleGraphs): consider moving this to the API instead. +// note: these could be generated on the API instead and returned as part of the +// payload. However, that would require updating the API response, and would +// make it harder to change if we need to. For the time being (Nov 7, 2025), +// I'll leave them here. +// +// If you're working on something relating to this feature later, please +// consider moving this to the API instead. const generateWeekLabels = ( start: string, end: string, diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 42afd5e818..f237a9e913 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -86,7 +86,6 @@ export type UiFlags = { customMetrics?: boolean; impactMetrics?: boolean; plausibleMetrics?: boolean; - lifecycleGraphs?: boolean; globalChangeRequestList?: boolean; trafficBillingDisplay?: boolean; milestoneProgression?: boolean; diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 01c6f98119..fe41faaefe 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -53,7 +53,6 @@ export type IFlagKey = | 'edgeObservability' | 'customMetrics' | 'impactMetrics' - | 'lifecycleGraphs' | 'etagByEnv' | 'fetchMode' | 'optimizeLifecycle' @@ -241,10 +240,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_IMPACT_METRICS, false, ), - lifecycleGraphs: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_LIFECYCLE_GRAPHS, - false, - ), streaming: { name: 'disabled', enabled: parseEnvVarBoolean( diff --git a/src/server-dev.ts b/src/server-dev.ts index 59b515358d..28976cd91c 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -51,7 +51,6 @@ process.nextTick(async () => { strictSchemaValidation: true, customMetrics: true, impactMetrics: true, - lifecycleGraphs: true, globalChangeRequestList: true, trafficBillingDisplay: true, milestoneProgression: true,