Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop): drop capability tags from model selector rows
Alfredo Lopez29f57d7917ab
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.tsindex 9197ac200..84b61166f 100644--- a/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts+++ b/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts@@ -195,8 +195,7 @@ function requireModelNames(): { supportedModel: string; unsupportedModel: string}/**- * Match a catalog row by model name. The row's accessible name appends at most- * one hint tag ("no images", "images not verified"), so the row test id+ * Match a catalog row by model name. The row test id is per-model, so it* identifies exactly one row without a positional selector.*/function catalogModelRow(page: Page, model: string) {@@ -269,8 +268,13 @@ async function openModelMenu(page: Page) {}/**- * Selects a model through the visible popover, asserting the host-projected- * image capability hint for that model before the click.+ * Selects a model through the visible popover and asserts the host-projected+ * image capability for that model on the chip once the pick lands.+ *+ * The catalog rows no longer carry capability tags (#735): the selector lists+ * model names only. The capability projection is asserted where it is still+ * rendered — the chip's `title` — which is the projection the send/upload+ * gates actually read, so this is the stronger oracle of the two.*/async function selectModel(page: Page,@@ -283,16 +287,9 @@ async function selectModel(await expect(row).toHaveCount(1)await expect(row).toBeVisible()await expect(row).toHaveAttribute('role', 'menuitemradio')- if (imageState === 'unsupported') {- await expect(row.getByText('no images', { exact: true })).toBeVisible()- } else if (imageState === 'unknown') {- // No evidence is not the same claim as "known to be text-only".- await expect(row.getByText('images not verified', { exact: true })).toBeVisible()- await expect(row.getByText('no images', { exact: true })).toHaveCount(0)- } else {- await expect(row.getByText('no images', { exact: true })).toHaveCount(0)- await expect(row.getByText('images not verified', { exact: true })).toHaveCount(0)- }+ // The row shows the model name and nothing else (#735). Asserting that keeps+ // a reintroduced tag from slipping back in unnoticed.+ await expect(row.locator('.model-selector-item-tag')).toHaveCount(0)await row.click()// State oracle: the chip now reports the model the catalog selected.@@ -531,8 +528,8 @@ test('optional QA recorder: Desktop image capability — blocked on text-only mo// mistaken for this journey's answer.await startBlankChat(page)- // The catalog row itself carries the host-projected image capability. When a- // model is not image-capable, the selector renders the "no images" tag.+ // The chip carries the host-projected image capability of the selected+ // model; the catalog rows list names only (#735).await selectModel(page, supportedModel, 'supported')await selectModel(page, unsupportedModel, 'unsupported')await selectModel(page, supportedModel, 'supported')@@ -642,7 +639,7 @@ test('image-capabilities fixture: image capability gates the composer and the prawait test.step('a model with no image evidence refuses the picker and sends nothing', async () => {await startBlankChat(page)await selectModel(page, env.unknownModel, 'unknown')- // The chip carries the same projection as the row hint.+ // The chip is where the capability projection is rendered (#735).await expect(modelChip(page)).toHaveAttribute('title', /not verified/i)await expectUploadRefused(page, env.unknownModel, /not verified/i)diff --git a/desktop-app/ui/src/components/agents/ModelSelector.tsx b/desktop-app/ui/src/components/agents/ModelSelector.tsxindex 63d0698c7..d92c39c9a 100644--- a/desktop-app/ui/src/components/agents/ModelSelector.tsx+++ b/desktop-app/ui/src/components/agents/ModelSelector.tsx@@ -3,7 +3,6 @@ import type { HostModelOption } from '@hooks/useChatStore'import { useClickOutside } from '@hooks/useClickOutside'import { useHostModels } from '@hooks/useHostModels'import { isBrokerBackedProvider } from '@lib/hostModelSelectionStore'-import { resolveImageInputDecision } from '../../../../src/imageInputDecision'import { Pill } from '../Common'export interface ModelSelectorProps {@@ -252,15 +251,6 @@ export function ModelSelector({ agentRef, chatId, placement = 'down' }: ModelSel<ul className="model-selector-list">{offeredModels.map(option => {const isActive = option.name === effectiveModel- const optionImageInput = resolveImageInputDecision(option.imageInput)- // Every option carries an image tag, so a missing tag is never- // read as "not checked".- const imageHint =- optionImageInput.state === 'supported'- ? 'images'- : optionImageInput.state === 'unsupported'- ? 'no images'- : 'images not verified'return (<li key={option.name}><button@@ -274,14 +264,6 @@ export function ModelSelector({ agentRef, chatId, placement = 'down' }: ModelSel><span className="model-selector-item-label">{option.displayName?.trim() || option.name}- {option.name === data.hostDefault && (- <span className="model-selector-item-tag">default</span>- )}- {imageHint && (- <span className="model-selector-item-tag" title={optionImageInput.reason}>- {imageHint}- </span>- )}</span>{isActive && (<svgdiff --git a/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx b/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsxindex 34a0e34cc..406f68c4e 100644--- a/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx+++ b/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx@@ -151,7 +151,7 @@ describe('ModelSelector', () => {expect(chip.hasAttribute('title')).toBe(false)})- it('tags every listed model with its image capability, including supported ones', () => {+ it('lists models without capability or default tags (#735)', () => {setHook({data: baseData({models: [@@ -172,13 +172,20 @@ describe('ModelSelector', () => {renderSelector()fireEvent.click(screen.getByRole('button', { name: /Model —/ }))- const tagsOf = (name: RegExp) =>- Array.from(- screen.getByRole('menuitemradio', { name }).querySelectorAll('.model-selector-item-tag')- ).map(tag => tag.textContent)- expect(tagsOf(/Opus 4\.8/)).toEqual(['default', 'images'])- expect(tagsOf(/Haiku 4\.5/)).toEqual(['no images'])- expect(tagsOf(/Sonnet 5/)).toEqual(['images not verified'])+ // Liveness witness: all three rows really rendered, so the tag assertions+ // below cannot be satisfied by an empty or unopened list.+ const optionOf = (name: RegExp) => screen.getByRole('menuitemradio', { name })+ expect(optionOf(/Opus 4\.8/).textContent).toBe('Opus 4.8')+ expect(optionOf(/Haiku 4\.5/).textContent).toBe('Haiku 4.5')+ expect(optionOf(/Sonnet 5/).textContent).toBe('Sonnet 5')++ // hostDefault is claude-opus-4-8 and the three models cover supported /+ // unsupported / unverified image input — none of them may render a tag.+ expect(document.querySelectorAll('.model-selector-item-tag').length).toBe(0)+ expect(screen.queryByText('default')).toBeNull()+ expect(screen.queryByText('images')).toBeNull()+ expect(screen.queryByText('no images')).toBeNull()+ expect(screen.queryByText('images not verified')).toBeNull()})it('shows the effective model (sessionModel over hostDefault)', () => {diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 07b5fe754..3fe2722a8 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -4016,14 +4016,6 @@ h3 {text-overflow: ellipsis;}-.model-selector-item-tag {- font-size: var(--font-size-2xs);- color: var(--text-dim);- border: 1px solid rgba(var(--edge-rgb), 0.6);- border-radius: var(--radius-sm);- padding: 0 var(--space-1);-}-.model-selector-item-check {flex: 0 0 auto;width: 13px;