feat(FN-2611): merge fusion/fn-2611 (auto-resolved)

- feat(FN-2611): complete Step 4 — add changeset and docs
- test(FN-2611): complete Step 2 — cover legacy alias cleanup payload
- feat(FN-2611): complete Step 1 — normalize legacy experimental aliases
This commit is contained in:
Fusion
2026-04-26 14:19:18 -07:00
committed by gsxdsm
parent fc32aacb33
commit cb3a08e246
3 changed files with 38 additions and 4 deletions

View File

@@ -126,16 +126,22 @@ function isExperimentalFeatureEnabled(features: Record<string, boolean>, key: st
);
}
function normalizeExperimentalFeaturesForSave(features?: Record<string, boolean>): Record<string, boolean> {
function normalizeExperimentalFeaturesForSave(features?: Record<string, boolean>): Record<string, boolean | null> {
if (!features) {
return {};
}
const normalized: Record<string, boolean> = {};
const normalized: Record<string, boolean | null> = {};
for (const [key, enabled] of Object.entries(features)) {
normalized[getCanonicalExperimentalFeatureKey(key)] = enabled;
}
for (const [legacyKey, canonicalKey] of Object.entries(EXPERIMENTAL_FEATURE_LEGACY_ALIASES)) {
if (normalized[canonicalKey] !== undefined && !(legacyKey in normalized)) {
normalized[legacyKey] = null;
}
}
return normalized;
}