diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx index 5eaacdae0f0..10f1e925dc5 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx @@ -35,6 +35,7 @@ type LinearAgentSkillSetupDialogProps = { onRecheck: AgentSkillSetupPanelProps['onRecheck'] onOpenChange: (open: boolean) => void onDismissPermanently: () => void + onSnoozeForSession: () => void onDone: () => void } @@ -54,6 +55,7 @@ export function LinearAgentSkillSetupDialog({ onRecheck, onOpenChange, onDismissPermanently, + onSnoozeForSession, onDone }: LinearAgentSkillSetupDialogProps): React.JSX.Element { return ( @@ -152,17 +154,26 @@ export function LinearAgentSkillSetupDialog({ onBeforeOpenTerminal={onBeforeOpenTerminal} onRecheck={onRecheck} /> - {/* Why: the dialog's × already dismisses-for-session (onOpenChange), so a - separate "Not now" button was redundant and, styled as the footer CTA, - read as the primary action over Install. Keep only the distinct - permanent-dismiss action. */} - - + )} diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx index 28300a60a4a..11e550b4bc5 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx @@ -143,9 +143,8 @@ async function snoozeInitialModal( props: ComponentProps ): Promise { await renderPrompt(props) - // Why: "Not now" was removed; the dialog's × drives the session snooze now. await act(async () => { - findBodyButton('Close')?.dispatchEvent(new MouseEvent('click', { bubbles: true })) + findBodyButton('Not now')?.dispatchEvent(new MouseEvent('click', { bubbles: true })) }) await unmountPrompt() } @@ -204,7 +203,7 @@ describe('LinearAgentSkillSetupPrompt reminder toast', () => { Reflect.deleteProperty(window, 'api') }) - it('shows a warning toast on a later modal-only activation after a casual close', async () => { + it('shows a warning toast on a later modal-only activation after Not now', async () => { await snoozeInitialModal({ linked: true, remote: false, surface: 'modal' }) await renderPrompt({ linked: true, remote: false, surface: 'modal' }) diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx index a86d5f40dd4..97f795ac74a 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx @@ -452,7 +452,7 @@ describe('LinearAgentSkillSetupPrompt', () => { ) }) - it('auto-opens as a modal-only prompt and treats the × close as a casual snooze', async () => { + it('auto-opens as a modal-only prompt and treats Not now as a casual snooze', async () => { await renderPrompt({ linked: true, remote: false, surface: 'modal' }) expect(container?.textContent).not.toContain('Set up Linear agent skill') @@ -461,20 +461,19 @@ describe('LinearAgentSkillSetupPrompt', () => { ) expect(document.body.textContent).toContain('Orca CLI and Linear agent skill are missing.') expect(document.body.textContent).toContain('Mock install') - expect(document.body.textContent).not.toContain('Not now') expect(mocks.panelProps.at(-1)).toEqual( expect.objectContaining({ preInstallNotice: 'CLI registration notice' }) ) - // Why: "Not now" was removed; the dialog's × is the casual dismiss and must snooze - // (session-only) rather than persist a permanent dismissal. - const closeButton = Array.from(document.body.querySelectorAll('button')).find( - (button) => button.textContent === 'Close' + // Why: the unsolicited modal's labeled dismiss is the non-destructive one, so + // "Not now" must snooze for the session, not persist a permanent dismissal. + const notNowButton = Array.from(document.body.querySelectorAll('button')).find( + (button) => button.textContent === 'Not now' ) await act(async () => { - closeButton?.dispatchEvent(new MouseEvent('click', { bubbles: true })) + notNowButton?.dispatchEvent(new MouseEvent('click', { bubbles: true })) }) expect(window.localStorage.getItem(HOST_DISMISS_STORAGE_KEY)).toBeNull() diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx index d840807a7e6..e6157339c4a 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx @@ -338,6 +338,7 @@ export function LinearAgentSkillSetupPrompt({ setSetupDialogOpen(false) }} onDismissPermanently={dismissPermanently} + onSnoozeForSession={snoozeForSession} onDone={closeSuccessModal} /> ) diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index bbb92054c95..9d830a1aa56 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -4672,6 +4672,7 @@ "modalDescription": "Install the Linear skill from a terminal.", "modalPrompt": "Enable agents to read and edit the attached Linear ticket.", "dontShowAgain": "Don't show again", + "notNow": "Not now", "missingBoth": "Orca CLI and Linear agent skill are missing.", "missingCli": "Orca CLI is missing.", "missingSkill": "Linear agent skill is missing.", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index 088e16910ce..2bd07533c66 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -4584,6 +4584,7 @@ "modalDescription": "Instala el skill de Linear desde una terminal.", "modalPrompt": "Permite que los Agents lean y editen el issue de Linear adjunto.", "dontShowAgain": "No volver a mostrar", + "notNow": "Ahora no", "missingBoth": "Faltan la CLI de Orca y el skill de Linear para Agents.", "missingCli": "Falta la CLI de Orca.", "missingSkill": "Falta el skill de Linear para Agents.", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 2726b15cac5..c76b43af82d 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -4584,6 +4584,7 @@ "modalDescription": "terminal から Linear スキルをインストールします。", "modalPrompt": "Agents が添付された Linear チケットを読み書きできるようにします。", "dontShowAgain": "今後表示しない", + "notNow": "後で", "missingBoth": "Orca CLI と Linear agent スキルがありません。", "missingCli": "Orca CLI がありません。", "missingSkill": "Linear agent スキルがありません。", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 5a37f0b6496..755bc978803 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -4584,6 +4584,7 @@ "modalDescription": "terminal에서 Linear 스킬을 설치합니다.", "modalPrompt": "agents가 첨부된 Linear 티켓을 읽고 편집할 수 있게 합니다.", "dontShowAgain": "다시 표시하지 않음", + "notNow": "나중에", "missingBoth": "Orca CLI와 Linear agent 스킬이 없습니다.", "missingCli": "Orca CLI가 없습니다.", "missingSkill": "Linear agent 스킬이 없습니다.", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index 8e8e5265fb8..caba5e748ae 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -4584,6 +4584,7 @@ "modalDescription": "从终端安装 Linear 技能。", "modalPrompt": "允许智能体读取和编辑已附加的 Linear ticket。", "dontShowAgain": "不再显示", + "notNow": "暂不", "missingBoth": "缺少 Orca CLI 和 Linear 智能体技能。", "missingCli": "缺少 Orca CLI。", "missingSkill": "缺少 Linear 智能体技能。",