chore: remove IS_DASHBOARD_V2_ENABLED feature flag (#19079)

## Summary
- Remove the `IS_DASHBOARD_V2_ENABLED` feature flag from the codebase
- Dashboard V2 features (gauge charts, line charts, pie charts) are now
always enabled
- Remove the validator gate that blocked gauge chart creation/update
without the flag
- Clean up all related code: seed data, dev-seeder service, widget
seeds, and test mocks
This commit is contained in:
Charles Bochet
2026-03-29 10:45:54 +02:00
committed by GitHub
parent e8cb086b64
commit 28de34cf20
11 changed files with 20 additions and 117 deletions
@@ -29,7 +29,6 @@ const getFieldId = (
export const getPageLayoutWidgetDataSeeds = (
workspaceId: string,
objectMetadataItems: ObjectMetadataEntity[],
isDashboardV2Enabled: boolean,
): SeederFlatPageLayoutWidget[] => {
const opportunityObject = objectMetadataItems.find(
(obj) =>
@@ -524,9 +523,10 @@ export const getPageLayoutWidgetDataSeeds = (
} satisfies SeederFlatPageLayoutWidget,
].filter(isDefined);
const v2Widgets = isDashboardV2Enabled
? getPageLayoutWidgetDataSeedsV2(workspaceId, objectMetadataItems)
: [];
const v2Widgets = getPageLayoutWidgetDataSeedsV2(
workspaceId,
objectMetadataItems,
);
return [...v1Widgets, ...v2Widgets];
};
@@ -45,11 +45,6 @@ export const seedFeatureFlags = async ({
workspaceId: workspaceId,
value: true,
},
{
key: FeatureFlagKey.IS_DASHBOARD_V2_ENABLED,
workspaceId: workspaceId,
value: true,
},
{
key: FeatureFlagKey.IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED,
workspaceId: workspaceId,
@@ -11,20 +11,17 @@ export const seedPageLayoutWidgets = async ({
schemaName,
workspaceId,
objectMetadataItems,
isDashboardV2Enabled,
workspaceCustomApplicationId,
}: {
dataSource: DataSource;
schemaName: string;
workspaceId: string;
objectMetadataItems: ObjectMetadataEntity[];
isDashboardV2Enabled: boolean;
workspaceCustomApplicationId: string;
}) => {
const widgetSeeds = getPageLayoutWidgetDataSeeds(
workspaceId,
objectMetadataItems,
isDashboardV2Enabled,
);
const pageLayoutWidgets = widgetSeeds.map((widget) => {
@@ -2,7 +2,6 @@ import { Injectable, Logger } from '@nestjs/common';
import { InjectDataSource } from '@nestjs/typeorm';
import { ALL_METADATA_NAME } from 'twenty-shared/metadata';
import { FeatureFlagKey } from 'twenty-shared/types';
import { DataSource } from 'typeorm';
import { ApplicationRegistrationService } from 'src/engine/core-modules/application/application-registration/application-registration.service';
@@ -146,15 +145,11 @@ export class DevSeederService {
relations: { fields: true },
});
const isDashboardV2Enabled =
featureFlagsMap[FeatureFlagKey.IS_DASHBOARD_V2_ENABLED] ?? false;
await seedPageLayoutWidgets({
dataSource: this.coreDataSource,
schemaName: 'core',
workspaceId,
objectMetadataItems,
isDashboardV2Enabled,
workspaceCustomApplicationId: workspaceCustomFlatApplication.id,
});