Enable workflow in lab (#9997)

Refresh of `objectmetadataitems` was not happening fast enough. Page was
breaking when enabling the feature flag. Instead of not storing worklow
objects in state, we will use the feature flag to block on read. This
way we avoid race conditions

<img width="1511" alt="Capture d’écran 2025-02-04 à 14 11 56"
src="https://github.com/user-attachments/assets/912cc59a-f422-48ab-84b7-7fdd7bbc35c1"
/>
This commit is contained in:
Thomas Trompette
2025-02-04 15:25:04 +01:00
committed by GitHub
parent 53b51c8bba
commit 2368dad9ad
9 changed files with 111 additions and 277 deletions

View File

@ -7,7 +7,10 @@ type FeatureFlagMetadata = {
};
export type PublicFeatureFlag = {
key: Extract<FeatureFlagKey, FeatureFlagKey.IsLocalizationEnabled>;
key: Extract<
FeatureFlagKey,
FeatureFlagKey.IsLocalizationEnabled | FeatureFlagKey.IsWorkflowEnabled
>;
metadata: FeatureFlagMetadata;
};
@ -21,4 +24,12 @@ export const PUBLIC_FEATURE_FLAGS: PublicFeatureFlag[] = [
imagePath: 'https://twenty.com/images/releases/labs/translation.png',
},
},
{
key: FeatureFlagKey.IsWorkflowEnabled,
metadata: {
label: 'Workflows',
description: 'Create custom workflows to automate your work.',
imagePath: 'https://twenty.com/images/lab/is-workflow-enabled.png',
},
},
];