The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop/settings): keep the searchable select trigger from shrink-wrapping
Brooklyn Nicholson45c61101fac5
diff --git a/apps/desktop/src/app/settings/searchable-select.test.tsx b/apps/desktop/src/app/settings/searchable-select.test.tsxindex d5d1e128f89..68546bf0b0f 100644--- a/apps/desktop/src/app/settings/searchable-select.test.tsx+++ b/apps/desktop/src/app/settings/searchable-select.test.tsx@@ -74,6 +74,26 @@ describe('SearchableSelect', () => {expect(screen.queryByText('System default')).toBeNull()})++ // #99751: the settings action cell shrink-wraps to content, and the popover+ // floors its width at the trigger's (--radix-popover-trigger-width). Without+ // a positive min-width floor on the trigger, a blank value collapses the+ // whole control — trigger AND list — to the "Search…" placeholder (~70px);+ // controlVariants' `min-w-0` is no floor at all. jsdom does not compute+ // Tailwind layout, so the class contract is the assertable unit.+ it('keeps a positive min-width floor on the trigger when the value is blank', () => {+ for (const value of ['', 'Asia/Kolkata']) {+ const { unmount } = render(<SearchableSelect onChange={vi.fn()} options={options} value={value} />)++ const classes = screen+ .getByRole('combobox')+ .className.split(/\s+/)+ .filter(cls => /^min-w-(?!0$)\d/.test(cls))++ expect(classes.length).toBeGreaterThan(0)+ unmount()+ }+ })})describe('ConfigField searchable routing', () => {diff --git a/apps/desktop/src/app/settings/searchable-select.tsx b/apps/desktop/src/app/settings/searchable-select.tsxindex 32fcc7e7b49..fb45db85788 100644--- a/apps/desktop/src/app/settings/searchable-select.tsx+++ b/apps/desktop/src/app/settings/searchable-select.tsx@@ -85,6 +85,12 @@ export function SearchableSelect({className={cn(controlVariants(),'flex items-center justify-between gap-2 whitespace-nowrap',+ // Width floor: the settings action cell shrink-wraps to content+ // (flex + justify-self-end), so a blank value collapses `w-full`+ // to the "Search…" placeholder (~70px) and the popover, which+ // floors at the trigger width, inherits the squish (#99751).+ // Same min-width-floor convention as the model-settings selects.+ 'min-w-44',!value && 'text-muted-foreground')}data-slot="searchable-select-trigger"