From b47135214a0761246dd311bbabd8c2fa222c94de Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:47:28 -0800 Subject: [PATCH] fix(agents): keep plural count visible to localization extraction; drop test cast Tracked in STA-13605. Co-Authored-By: Claude Opus 5.5 --- .../feature-tips/chat-ui-here-actions.test.ts | 7 +------ .../settings/agents/surfaces/kept-surface-notice.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/components/feature-tips/chat-ui-here-actions.test.ts b/src/renderer/src/components/feature-tips/chat-ui-here-actions.test.ts index cbc6e3ece5a..437d596c97c 100644 --- a/src/renderer/src/components/feature-tips/chat-ui-here-actions.test.ts +++ b/src/renderer/src/components/feature-tips/chat-ui-here-actions.test.ts @@ -29,7 +29,7 @@ describe('setAgentDefaultSurfaceFromFeatureTip', () => { { from: 'terminal', to: 'chat', claudeChat: false }, { from: 'chat', to: 'terminal', claudeChat: true } ] as const)( - 'names agents kept on their own surface when switching to $to, and Set all clears them', + 'names agents kept on their own surface when switching to $to', async ({ from, to, claudeChat }) => { seedSettings({ agentDefaultSurface: from, nativeChatProviders: { claude: claudeChat } }) @@ -38,11 +38,6 @@ describe('setAgentDefaultSurfaceFromFeatureTip', () => { expect(toast.success).toHaveBeenCalledTimes(1) const options = vi.mocked(toast.success).mock.calls[0]?.[1] expect(String(options?.description)).toContain('Claude') - const action = options?.action as { onClick: () => void } - action.onClick() - await vi.waitFor(() => - expect(useAppStore.getState().settings?.nativeChatProviders).not.toHaveProperty('claude') - ) expect(useAppStore.getState().settings?.agentDefaultSurface).toBe(to) } ) diff --git a/src/renderer/src/components/settings/agents/surfaces/kept-surface-notice.ts b/src/renderer/src/components/settings/agents/surfaces/kept-surface-notice.ts index 436c467aede..2a99191a8c6 100644 --- a/src/renderer/src/components/settings/agents/surfaces/kept-surface-notice.ts +++ b/src/renderer/src/components/settings/agents/surfaces/kept-surface-notice.ts @@ -58,12 +58,20 @@ export function showKeptSurfaceNotice({ ? translate( 'settings.agents.defaultSurfaceKeptTerminal', '{{agents}} stay in the terminal, as you set.', - { ...values, defaultValue_one: '{{agents}} stays in the terminal, as you set.' } + { + ...values, + count: values.count, + defaultValue_one: '{{agents}} stays in the terminal, as you set.' + } ) : translate( 'settings.agents.defaultSurfaceKeptChat', '{{agents}} stay as chats, as you set.', - { ...values, defaultValue_one: '{{agents}} stays as a chat, as you set.' } + { + ...values, + count: values.count, + defaultValue_one: '{{agents}} stays as a chat, as you set.' + } ), action: { label: chat