feat(FN-1441): correct Models settings scope to mixed and update renderScopeBanner

- Correct Models section scope from project to mixed since it contains both global settings (provider/model) and project overrides
- Update renderScopeBanner to support mixed scope type with globe+folder icon
- Add scope-banner-mixed CSS class for consistent styling of mixed-scope banners
- Update SettingsModal tests to cover mixed scope behavior
This commit is contained in:
gsxdsm
2026-04-10 08:52:31 -07:00
parent cdee79d8e9
commit c96ca33734
3 changed files with 58 additions and 9 deletions

View File

@@ -2059,10 +2059,11 @@ describe("SettingsModal", () => {
expect(container.querySelector(".settings-scope-project")).toBeTruthy();
expect(container.querySelector(".settings-scope-global")).toBeNull();
// Switch to Models → should show project banner
// Switch to Models → should show mixed scope banner (contains both global and project settings)
fireEvent.click(screen.getAllByText("Models")[0]);
expect(container.querySelector(".settings-scope-project")).toBeTruthy();
expect(container.querySelector(".settings-scope-global")).toBeNull();
expect(container.querySelector(".settings-scope-mixed")).toBeTruthy();
expect(container.querySelector(".settings-scope-mixed")?.textContent).toContain("global");
expect(container.querySelector(".settings-scope-mixed")?.textContent).toContain("project");
});
// --- Settings save error handling tests ---