From f9641ec76e61a5e4585caaed197f1f5b4be8a737 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 10 Jul 2026 07:43:08 -0700 Subject: [PATCH] FN-7774: style the Thinking Level select to match the dark model dropdown Adds dark-theme CSS styling for the inline 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. +*/ +.model-combobox .thinking-level-select { + width: 100%; + padding: var(--space-xs) calc(var(--space-lg) + var(--space-md)) var(--space-xs) var(--space-sm); + background: var(--surface); + border: var(--btn-border-width) solid var(--border); + border-radius: var(--radius-sm); + color: var(--text); + font-size: var(--font-size-sm); + font-family: var(--font-primary); + line-height: 1.4; + outline: none; + cursor: pointer; + appearance: none; + transition: border-color var(--transition-fast), box-shadow var(--transition-fast); +} + +.model-combobox .thinking-level-select:hover:not(:focus):not(:disabled) { + border-color: var(--text-dim); +} + +.model-combobox .thinking-level-select:focus { + border-color: var(--todo); + box-shadow: var(--focus-ring); +} + +.model-combobox .thinking-level-select:disabled { + opacity: var(--opacity-disabled, 0.6); + cursor: not-allowed; +} + +.model-combobox .thinking-level-select option { + background: var(--surface); + color: var(--text); + padding: var(--space-xs) var(--space-sm); +} + +.model-combobox .thinking-level-select optgroup { + background: var(--surface); + color: var(--text-muted); + font-weight: 600; +} + +.model-combobox-thinking::after { + content: ""; + position: absolute; + right: calc(var(--space-md) + var(--space-sm)); + width: var(--space-xs); + height: var(--space-xs); + border: solid var(--text-muted); + border-width: 0 var(--btn-border-width) var(--btn-border-width) 0; + pointer-events: none; + transform: rotate(45deg) translateY(calc(var(--space-xs) * -1)); +} + .model-combobox-thinking-badge { flex-shrink: 0; margin-left: var(--space-sm); diff --git a/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx b/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx index 5d705ce2b5..16bcaa2933 100644 --- a/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx +++ b/packages/dashboard/app/components/__tests__/CustomModelDropdown.test.tsx @@ -50,6 +50,22 @@ describe("CustomModelDropdown", () => { expect(css).not.toMatch(/(^|\n)\s*html\s*\*/); }); + it("keeps the Thinking Level select styled with dark theme tokens", () => { + const css = readFileSync( + 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] ?? ""; + + expect(rule).toContain("background: var(--surface);"); + expect(rule).toContain("border: var(--btn-border-width) solid var(--border);"); + expect(rule).toContain("color: var(--text);"); + expect(rule).toContain("appearance: none;"); + expect(optionRule).toContain("background: var(--surface);"); + expect(optionRule).toContain("color: var(--text);"); + }); + it("renders opt-in thinking control with default option and calls back for concrete and inherited values", async () => { const user = userEvent.setup(); const onChange = vi.fn();