From 836a204bfeb07f9ea407ec247e9a5921dfa25982 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Mon, 20 Jul 2026 21:28:01 -0700 Subject: [PATCH] =?UTF-8?q?Remove=20'Not=20now'=20from=20Linear=20skill-in?= =?UTF-8?q?stall=20modal;=20=C3=97=20handles=20session=20dismiss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per product call: the modal is typically reached by clicking 'Set up' on the reminder toast (an opt-in), and the dialog's × already dismisses for the session. Drop the redundant 'Not now' button. Footer keeps only the quiet muted 'Don't show again' (permanent opt-out); Install stays the filled primary. Removes onSnoozeForSession wiring + notNow i18n key (all locales); tests exercise the × (Close) session-snooze path. --- .../sidebar/LinearAgentSkillSetupDialog.tsx | 14 ++++---------- ...arAgentSkillSetupPrompt.reminder-toast.test.tsx | 6 ++++-- .../sidebar/LinearAgentSkillSetupPrompt.test.tsx | 14 ++++++++------ .../sidebar/LinearAgentSkillSetupPrompt.tsx | 1 - src/renderer/src/i18n/locales/en.json | 1 - src/renderer/src/i18n/locales/es.json | 1 - src/renderer/src/i18n/locales/ja.json | 1 - src/renderer/src/i18n/locales/ko.json | 1 - src/renderer/src/i18n/locales/zh.json | 1 - 9 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx index 10f1e925dc5..a5a02803b92 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupDialog.tsx @@ -35,7 +35,6 @@ type LinearAgentSkillSetupDialogProps = { onRecheck: AgentSkillSetupPanelProps['onRecheck'] onOpenChange: (open: boolean) => void onDismissPermanently: () => void - onSnoozeForSession: () => void onDone: () => void } @@ -55,7 +54,6 @@ export function LinearAgentSkillSetupDialog({ onRecheck, onOpenChange, onDismissPermanently, - onSnoozeForSession, onDone }: LinearAgentSkillSetupDialogProps): React.JSX.Element { return ( @@ -154,11 +152,10 @@ export function LinearAgentSkillSetupDialog({ onBeforeOpenTerminal={onBeforeOpenTerminal} onRecheck={onRecheck} /> - {/* Why: this modal auto-opens unsolicited, so the reflexive dismiss must be - the non-destructive one. "Not now" (session snooze, same as the ×) is the - easy ghost target; permanent "Don't show again" is demoted to a quiet muted - link so nuking the prompt takes intent. Install stays the filled primary. */} - + {/* Why: the dialog's × already dismisses for the session, so the only footer + control is the permanent opt-out — kept as a quiet muted link so it doesn't + pull the eye from the filled Install primary. */} + )} 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 11e550b4bc5..d41668d6ba6 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.reminder-toast.test.tsx @@ -143,8 +143,10 @@ async function snoozeInitialModal( props: ComponentProps ): Promise { await renderPrompt(props) + // Why: the modal's casual dismiss is the dialog × (session snooze) now that + // "Not now" is removed. await act(async () => { - findBodyButton('Not now')?.dispatchEvent(new MouseEvent('click', { bubbles: true })) + findBodyButton('Close')?.dispatchEvent(new MouseEvent('click', { bubbles: true })) }) await unmountPrompt() } @@ -203,7 +205,7 @@ describe('LinearAgentSkillSetupPrompt reminder toast', () => { Reflect.deleteProperty(window, 'api') }) - it('shows a warning toast on a later modal-only activation after Not now', async () => { + it('shows a warning toast on a later modal-only activation after a casual close', 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 97f795ac74a..9256ec0457d 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 Not now as a casual snooze', async () => { + it('auto-opens as a modal-only prompt and treats the × close as a casual snooze', async () => { await renderPrompt({ linked: true, remote: false, surface: 'modal' }) expect(container?.textContent).not.toContain('Set up Linear agent skill') @@ -461,19 +461,21 @@ describe('LinearAgentSkillSetupPrompt', () => { ) expect(document.body.textContent).toContain('Orca CLI and Linear agent skill are missing.') expect(document.body.textContent).toContain('Mock install') + // Why: only "Don't show again" (permanent) is a footer button now; the casual + // dismiss is the dialog ×. + expect(document.body.textContent).not.toContain('Not now') expect(mocks.panelProps.at(-1)).toEqual( expect.objectContaining({ preInstallNotice: 'CLI registration notice' }) ) - // 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' + // Why: the × must snooze for the session, not persist a permanent dismissal. + const closeButton = Array.from(document.body.querySelectorAll('button')).find( + (button) => button.textContent === 'Close' ) await act(async () => { - notNowButton?.dispatchEvent(new MouseEvent('click', { bubbles: true })) + closeButton?.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 e6157339c4a..d840807a7e6 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.tsx @@ -338,7 +338,6 @@ 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 9d830a1aa56..bbb92054c95 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -4672,7 +4672,6 @@ "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 2bd07533c66..088e16910ce 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -4584,7 +4584,6 @@ "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 c76b43af82d..2726b15cac5 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -4584,7 +4584,6 @@ "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 755bc978803..5a37f0b6496 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -4584,7 +4584,6 @@ "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 caba5e748ae..8e8e5265fb8 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -4584,7 +4584,6 @@ "modalDescription": "从终端安装 Linear 技能。", "modalPrompt": "允许智能体读取和编辑已附加的 Linear ticket。", "dontShowAgain": "不再显示", - "notNow": "暂不", "missingBoth": "缺少 Orca CLI 和 Linear 智能体技能。", "missingCli": "缺少 Orca CLI。", "missingSkill": "缺少 Linear 智能体技能。",