From dd82a601be21a2a121e50ed7417974d9fadbee72 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 10 Jul 2026 09:54:39 -0700 Subject: [PATCH] FN-7789: fix thinking-level select styling in portaled model dropdowns Rescopes the Thinking Level had no CSS and rendered as the OS-default white control on the dark model dropdown across all model-picker surfaces, including the quick-add QuickEntryBox executor submenu and InlineCreateCard ModelSelectionModal. Mirror the canonical dark select tokens so reasoning-effort selection matches the surrounding combobox everywhere. + +FNXC:Settings-ThinkingLevel 2026-07-10-00:00: +The Thinking Level had no CSS and rendered as the OS-default whi transition: border-color var(--transition-fast), box-shadow var(--transition-fast); } -.model-combobox .thinking-level-select:hover:not(:focus):not(:disabled) { +.model-combobox-dropdown .thinking-level-select:hover:not(:focus):not(:disabled) { border-color: var(--text-dim); } -.model-combobox .thinking-level-select:focus { +.model-combobox-dropdown .thinking-level-select:focus { border-color: var(--todo); box-shadow: var(--focus-ring); } -.model-combobox .thinking-level-select:disabled { +.model-combobox-dropdown .thinking-level-select:disabled { opacity: var(--opacity-disabled, 0.6); cursor: not-allowed; } -.model-combobox .thinking-level-select option { +.model-combobox-dropdown .thinking-level-select option { background: var(--surface); color: var(--text); padding: var(--space-xs) var(--space-sm); } -.model-combobox .thinking-level-select optgroup { +.model-combobox-dropdown .thinking-level-select optgroup { background: var(--surface); color: var(--text-muted); font-weight: 600; diff --git a/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx b/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx index 16bcaa2933..218d3a6410 100644 --- a/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx +++ b/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx @@ -55,9 +55,10 @@ describe("CustomModelDropdown", () => { resolve(__dirname, "../CustomModelDropdown.css"), "utf-8", ); - const rule = css.match(/\.model-combobox\s+\.thinking-level-select\s*\{[^}]*\}/)?.[0] ?? ""; - const optionRule = css.match(/\.model-combobox\s+\.thinking-level-select\s+option\s*\{[^}]*\}/)?.[0] ?? ""; + const rule = css.match(/\.model-combobox-dropdown\s+\.thinking-level-select\s*\{[^}]*\}/)?.[0] ?? ""; + const optionRule = css.match(/\.model-combobox-dropdown\s+\.thinking-level-select\s+option\s*\{[^}]*\}/)?.[0] ?? ""; + expect(css).not.toMatch(/\.model-combobox\s+\.thinking-level-select/); expect(rule).toContain("background: var(--surface);"); expect(rule).toContain("border: var(--btn-border-width) solid var(--border);"); expect(rule).toContain("color: var(--text);"); @@ -88,6 +89,7 @@ describe("CustomModelDropdown", () => { const thinkingSelect = await screen.findByTestId("custom-model-dropdown-thinking"); expect(thinkingSelect).toHaveAccessibleName("Thinking Level"); + expect(thinkingSelect.closest(".model-combobox-dropdown")).not.toBeNull(); expect(within(thinkingSelect).getByRole("option", { name: "Default (off)" })).toBeTruthy(); for (const optionName of ["Off", "Minimal", "Low", "Medium", "High", "Very High"]) { expect(within(thinkingSelect).getByRole("option", { name: optionName })).toBeTruthy();