mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
chore(AI): lifecycleGraphs flag cleanup (#10942)
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 <thomas@getunleash.io>
This commit is contained in:
parent
8c626c8f4f
commit
547c8ffd58
@ -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 (
|
||||
<InsightsSection
|
||||
title='Performance insights'
|
||||
@ -113,7 +110,7 @@ export const PerformanceInsights: FC = () => {
|
||||
/>
|
||||
}
|
||||
>
|
||||
{isLifecycleGraphsEnabled && isEnterprise() ? (
|
||||
{isEnterprise() ? (
|
||||
<NewProductionFlagsWidget
|
||||
groupedLifecycleData={groupedLifecycleData}
|
||||
loading={loading}
|
||||
@ -122,7 +119,7 @@ export const PerformanceInsights: FC = () => {
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{isLifecycleGraphsEnabled && isEnterprise() ? (
|
||||
{isEnterprise() ? (
|
||||
<StyledWidget>
|
||||
<StyledWidgetStats width={275}>
|
||||
<WidgetTitle title='Flags archived vs flags created' />
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -86,7 +86,6 @@ export type UiFlags = {
|
||||
customMetrics?: boolean;
|
||||
impactMetrics?: boolean;
|
||||
plausibleMetrics?: boolean;
|
||||
lifecycleGraphs?: boolean;
|
||||
globalChangeRequestList?: boolean;
|
||||
trafficBillingDisplay?: boolean;
|
||||
milestoneProgression?: boolean;
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -51,7 +51,6 @@ process.nextTick(async () => {
|
||||
strictSchemaValidation: true,
|
||||
customMetrics: true,
|
||||
impactMetrics: true,
|
||||
lifecycleGraphs: true,
|
||||
globalChangeRequestList: true,
|
||||
trafficBillingDisplay: true,
|
||||
milestoneProgression: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user