Skip to content

Commit 53d9b17

Browse files
Vrtak-CZclaude
andcommitted
fix(web): download new models shows mixed only when effective values differ
An unset switch follows Provider update checks, so comparing raw keys reported "mixed" for environments that all download (or all skip) new models. Compare resolved values and share the result with the row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 3f89cac commit 53d9b17

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,12 +2084,19 @@ export function GeneralSettingsPanel() {
20842084
const settings = useScopedSettings();
20852085
const updateSettings = useUpdateScopedSettings();
20862086
const navigate = useNavigate();
2087-
const { scope, environment, connectedEnvironments, target } = useSettingsScope();
2087+
const { scope, environment, connectedEnvironments, target, targets } = useSettingsScope();
20882088
const environmentId = environment?.environmentId ?? null;
20892089
const isEnvironmentScope = scope.environmentIds.length === 1 && environmentId !== null;
20902090
const hasServerTargets = connectedEnvironments.length > 0;
20912091
const [backgroundActivityDialogOpen, setBackgroundActivityDialogOpen] = useState(false);
20922092
const mixedResponseStreamingMode = useScopedSettingsMixed(["responseStreamingMode"]);
2093+
// Compared by effective value: an unset switch follows Provider update checks.
2094+
const modelCatalogUpdates = targets.map((candidate) =>
2095+
resolveModelCatalogUpdatesEnabled(candidate.settings),
2096+
);
2097+
const mixedModelCatalogUpdates = modelCatalogUpdates.some(
2098+
(enabled) => enabled !== modelCatalogUpdates[0],
2099+
);
20932100
const lastEnabledProjectGroupingMode = useRef<SidebarProjectGroupingMode>(
20942101
readLastEnabledProjectGroupingMode(),
20952102
);
@@ -2869,6 +2876,7 @@ export function GeneralSettingsPanel() {
28692876
<SettingsRow
28702877
serverScoped
28712878
settingKeys={["enableModelCatalogUpdates"]}
2879+
mixed={mixedModelCatalogUpdates}
28722880
{...searchableSetting("download-new-models")}
28732881
description="Download the latest T3 Code model catalog so new models appear between releases. Follows Provider update checks until you change it."
28742882
resetAction={
@@ -2885,9 +2893,11 @@ export function GeneralSettingsPanel() {
28852893
) : null
28862894
}
28872895
control={
2888-
<ScopedSwitch
2889-
settingKeys={["enableModelCatalogUpdates", "enableProviderUpdateChecks"]}
2890-
checked={resolveModelCatalogUpdatesEnabled(settings)}
2896+
<Switch
2897+
mixed={mixedModelCatalogUpdates}
2898+
checked={
2899+
mixedModelCatalogUpdates ? false : resolveModelCatalogUpdatesEnabled(settings)
2900+
}
28912901
onCheckedChange={(checked) =>
28922902
updateSettings({ enableModelCatalogUpdates: Boolean(checked) })
28932903
}

0 commit comments

Comments
 (0)