From bbcc164dc63a62e97f6e1b271b947ca550026619 Mon Sep 17 00:00:00 2001 From: luvs01 Date: Sat, 12 Sep 2026 10:31:45 +0900 Subject: [PATCH] fix(models): limit free-only bulk enable to filtered models --- gui/src/pages/Models.tsx | 2 +- tests/gui/models-free-filter.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/pages/Models.tsx b/gui/src/pages/Models.tsx index 0150cd29b0..fcc6673f9d 100644 --- a/gui/src/pages/Models.tsx +++ b/gui/src/pages/Models.tsx @@ -1457,7 +1457,7 @@ export default function Models({ apiBase, restartEpoch = 0 }: { apiBase: string; const bulkToggle = (enable: boolean) => { if (!hasRows || selectionPending) return; void applyVisibility( - "provider", + freeOnlyActive ? "models" : "provider", provider, scoped.map(m => ({ id: m.id, native: m.native === true })), enable, diff --git a/tests/gui/models-free-filter.test.ts b/tests/gui/models-free-filter.test.ts index f32cd74825..faa95fad13 100644 --- a/tests/gui/models-free-filter.test.ts +++ b/tests/gui/models-free-filter.test.ts @@ -114,6 +114,7 @@ describe("free-only runs before the page slice (#3666)", () => { const group = modelsPage.slice(start, end); expect(group).toContain('t("models.active", { active: activeCount, total: scoped.length })'); expect(group).toContain("const activeCount = scoped.filter(isVisible).length"); + expect(group).toContain('freeOnlyActive ? "models" : "provider"'); expect(group).toContain("scoped.map(m => ({ id: m.id, native: m.native === true }))"); expect(group).not.toContain('total: rows.length })'); });