diff --git a/src/renderer/src/components/NewWorkspaceComposerCard.tsx b/src/renderer/src/components/NewWorkspaceComposerCard.tsx index 062714ff6..0fdcc3459 100644 --- a/src/renderer/src/components/NewWorkspaceComposerCard.tsx +++ b/src/renderer/src/components/NewWorkspaceComposerCard.tsx @@ -1421,7 +1421,7 @@ export default function NewWorkspaceComposerCard({ -
+
diff --git a/src/renderer/src/components/agent/AgentCombobox.test.tsx b/src/renderer/src/components/agent/AgentCombobox.test.tsx index a5c3e205e..4ef8f7a65 100644 --- a/src/renderer/src/components/agent/AgentCombobox.test.tsx +++ b/src/renderer/src/components/agent/AgentCombobox.test.tsx @@ -21,6 +21,46 @@ describe('AgentCombobox', () => { expect(markup).toContain('flex-1') }) + it('centers the selected agent mark and label inside a full-width form trigger', () => { + const markup = renderToStaticMarkup( + + ) + + expect(markup).toContain('Codex') + expect(markup).not.toContain('!min-w-[260px]') + expect(markup).toContain('min-w-0 w-full') + expect(markup).toContain('leading-none') + expect(markup).toContain('size-3.5 shrink-0') + expect(markup).not.toContain('translate-y') + // Why: React HTML-escapes `[`/`&` in class strings during static markup. + expect(markup).toContain('size-3.5!') + }) + + it('uses the same centered 14px layout for every agent mark', () => { + for (const agent of AGENT_CATALOG) { + const markup = renderToStaticMarkup( + + ) + + expect(markup).toContain(agent.label) + expect(markup).toContain('size-3.5 shrink-0') + expect(markup).not.toContain('translate-y') + expect(markup).toContain('width="14"') + expect(markup).toContain('height="14"') + } + }) + it('supports an Agent-only empty state without presenting a blank terminal', () => { const markup = renderToStaticMarkup( + + {icon} + + {label} + + ) +} + function renderItem({ key, itemValue, @@ -86,11 +103,10 @@ function renderItem({ onSelect={onSelect} className="items-center gap-2 px-3 py-1.5" > - - - {icon} - {label} - + + ) if (!onSetDefault) { @@ -268,7 +284,9 @@ export default function AgentCombobox({ ) return ( -
+ // Why: min-w-0 lets full-width form rows shrink; plain flex+items-center left the + // trigger free to overflow its dialog column and look misaligned with Project/Name. +