The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): model menus use Badge, RowButton and Codicon spinning
Brooklyn Nicholson352faef967a0
diff --git a/apps/desktop/src/app/shell/model-catalog-menu.test.tsx b/apps/desktop/src/app/shell/model-catalog-menu.test.tsxindex c74a7056e8a..2c14e6c4fe3 100644--- a/apps/desktop/src/app/shell/model-catalog-menu.test.tsx+++ b/apps/desktop/src/app/shell/model-catalog-menu.test.tsx@@ -100,15 +100,14 @@ describe('the current row effort', () => {})describe('the reasoning-effort badge (#51833)', () => {- it('renders the effort as its own bordered chip beside the name, never inside it', async () => {+ it('renders the effort as its own Badge chip beside the name, never inside it', async () => {renderMenu({ effort: 'high', model: 'gemini-2.5-flash', provider: 'google' })- // The effort chip renders exactly "High" in its own element…+ // The effort chip renders exactly "High" in its own Badge…const badge = await screen.findByText('High')expect(badge.textContent).toBe('High')- expect(badge.className).toContain('border')- expect(badge.className).toContain('rounded-sm')+ expect(badge.getAttribute('data-slot')).toBe('badge')// …as a SIBLING of the truncating model-name span, so it can never read as// part of a differently-named model. The `-flash` variant tag is its owndiff --git a/apps/desktop/src/app/shell/model-catalog-menu.tsx b/apps/desktop/src/app/shell/model-catalog-menu.tsxindex df748c87bda..b5f5bc3915f 100644--- a/apps/desktop/src/app/shell/model-catalog-menu.tsx+++ b/apps/desktop/src/app/shell/model-catalog-menu.tsx@@ -13,6 +13,7 @@ import {useState} from 'react'+import { Badge } from '@/components/ui/badge'import { Codicon } from '@/components/ui/codicon'import { DisclosureCaret } from '@/components/ui/disclosure-caret'import {@@ -702,12 +703,9 @@ export function ModelCatalogMenu({<HighlightMatches foldSeparators query={search} text={name} /></span>{metaTags.map(chip => (- <span- className="shrink-0 rounded-sm border border-(--ui-stroke-secondary) bg-(--chrome-action-hover) px-1 py-px text-[0.625rem] font-medium uppercase leading-none tracking-wide text-(--ui-text-tertiary)"- key={chip}- >+ <Badge className="shrink-0 uppercase tracking-wide" key={chip} size="xs" variant="muted">{chip}- </span>+ </Badge>))}</span>{loadProgress ? (diff --git a/apps/desktop/src/app/shell/model-menu-panel.tsx b/apps/desktop/src/app/shell/model-menu-panel.tsxindex 680b8eb2d0a..d8a4ca569bf 100644--- a/apps/desktop/src/app/shell/model-menu-panel.tsx+++ b/apps/desktop/src/app/shell/model-menu-panel.tsx@@ -95,7 +95,7 @@ export function ModelMenuPanel({ onFollowDefaultModel, ...props }: ModelMenuPanevoid refreshModels()}}>- <Codicon className={cn(refreshing && 'animate-spin')} name="sync" size="0.75rem" />+ <Codicon name="sync" size="0.75rem" spinning={refreshing} />{copy.refreshModels}</DropdownMenuItem></>diff --git a/apps/desktop/src/components/model-visibility-dialog.tsx b/apps/desktop/src/components/model-visibility-dialog.tsxindex d97f80ae061..5e9b39ad345 100644--- a/apps/desktop/src/components/model-visibility-dialog.tsx+++ b/apps/desktop/src/components/model-visibility-dialog.tsx@@ -9,6 +9,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/uimport { DisclosureCaret } from '@/components/ui/disclosure-caret'import { GlyphSpinner } from '@/components/ui/glyph-spinner'import { HighlightMatches } from '@/components/ui/highlight-matches'+import { RowButton } from '@/components/ui/row-button'import { Switch } from '@/components/ui/switch'import type { HermesGateway } from '@/hermes'import { useI18n } from '@/i18n'@@ -229,21 +230,20 @@ export function ModelVisibilityDialog({{copy.addCustomModel}</div>{providers.map(provider => (- <button- className="flex w-full cursor-pointer items-center gap-2 px-3 py-1 text-left text-xs hover:bg-(--ui-control-active-background)"+ <RowButton+ className="flex w-full items-center gap-2 px-3 py-1 text-left text-xs hover:bg-(--ui-control-active-background)"key={`custom:${provider.slug}`}onClick={() => {addCustomModel(provider.slug, customSlug, provider)setSearch('')}}- type="button"><span className="min-w-0 flex-1 truncate">{customSlug}<span className="text-(--ui-text-tertiary)"> {provider.name}</span></span><Plus className="size-3 shrink-0 text-(--ui-text-tertiary)" />- </button>+ </RowButton>))}</div>)}@@ -264,13 +264,7 @@ export function ModelVisibilityDialog({</Button>{/* Only once there is something to undo, like the sidebar view reset. */}{stored !== null && modelOptions.isSuccess && (- <Button- className="-mr-2 text-(--ui-text-tertiary)"- onClick={() => void resetToDefaults()}- size="xs"- type="button"- variant="text"- >+ <Button className="-mr-2" onClick={() => void resetToDefaults()} size="xs" type="button" variant="text">{copy.resetToDefaults}</Button>)}