diff --git a/site/src/components/DeploySettingsLayout/optionValue.test.ts b/site/src/components/DeploySettingsLayout/optionValue.test.ts index 387917723e..d1cac8de19 100644 --- a/site/src/components/DeploySettingsLayout/optionValue.test.ts +++ b/site/src/components/DeploySettingsLayout/optionValue.test.ts @@ -97,7 +97,11 @@ describe("optionValue", () => { value: ["moons"], }, additionalValues: ["single_tailnet", "deployment_health_page"], - expected: { single_tailnet: false, deployment_health_page: false }, + expected: { + single_tailnet: false, + deployment_health_page: false, + moons: true, + }, }, { option: { @@ -108,6 +112,15 @@ describe("optionValue", () => { additionalValues: ["single_tailnet", "deployment_health_page"], expected: { single_tailnet: true, deployment_health_page: true }, }, + { + option: { + ...defaultOption, + name: "Experiments", + value: ["*", "moons", "single_tailnet"], + }, + additionalValues: ["single_tailnet"], + expected: { moons: true, single_tailnet: true }, + }, { option: { ...defaultOption, diff --git a/site/src/components/DeploySettingsLayout/optionValue.ts b/site/src/components/DeploySettingsLayout/optionValue.ts index 6df38820f7..1deb3a4fe1 100644 --- a/site/src/components/DeploySettingsLayout/optionValue.ts +++ b/site/src/components/DeploySettingsLayout/optionValue.ts @@ -50,8 +50,10 @@ export function optionValue( break; } + // We show all experiments (including unsafe) that are currently enabled on a deployment + // but only show safe experiments that are not. for (const v of option.value) { - if (Object.hasOwn(experimentMap, v)) { + if (v !== "*") { experimentMap[v] = true; } }