Remove 'Not now' from Linear skill-install modal; × handles session dismiss

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.
This commit is contained in:
Brennan Benson
2026-07-20 21:28:01 -07:00
parent 9468b00959
commit 836a204bfe
9 changed files with 16 additions and 24 deletions
@@ -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. */}
<DialogFooter className="px-6 pb-6 sm:items-center sm:justify-between">
{/* 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. */}
<DialogFooter className="px-6 pb-6">
<Button
type="button"
variant="link"
@@ -171,9 +168,6 @@ export function LinearAgentSkillSetupDialog({
"Don't show again"
)}
</Button>
<Button type="button" variant="ghost" size="sm" onClick={onSnoozeForSession}>
{translate('auto.components.sidebar.LinearAgentSkillSetupPrompt.notNow', 'Not now')}
</Button>
</DialogFooter>
</>
)}
@@ -143,8 +143,10 @@ async function snoozeInitialModal(
props: ComponentProps<typeof LinearAgentSkillSetupPrompt>
): Promise<void> {
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' })
@@ -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()
@@ -338,7 +338,6 @@ export function LinearAgentSkillSetupPrompt({
setSetupDialogOpen(false)
}}
onDismissPermanently={dismissPermanently}
onSnoozeForSession={snoozeForSession}
onDone={closeSuccessModal}
/>
)
-1
View File
@@ -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.",
-1
View File
@@ -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.",
-1
View File
@@ -4584,7 +4584,6 @@
"modalDescription": "terminal から Linear スキルをインストールします。",
"modalPrompt": "Agents が添付された Linear チケットを読み書きできるようにします。",
"dontShowAgain": "今後表示しない",
"notNow": "後で",
"missingBoth": "Orca CLI と Linear agent スキルがありません。",
"missingCli": "Orca CLI がありません。",
"missingSkill": "Linear agent スキルがありません。",
-1
View File
@@ -4584,7 +4584,6 @@
"modalDescription": "terminal에서 Linear 스킬을 설치합니다.",
"modalPrompt": "agents가 첨부된 Linear 티켓을 읽고 편집할 수 있게 합니다.",
"dontShowAgain": "다시 표시하지 않음",
"notNow": "나중에",
"missingBoth": "Orca CLI와 Linear agent 스킬이 없습니다.",
"missingCli": "Orca CLI가 없습니다.",
"missingSkill": "Linear agent 스킬이 없습니다.",
-1
View File
@@ -4584,7 +4584,6 @@
"modalDescription": "从终端安装 Linear 技能。",
"modalPrompt": "允许智能体读取和编辑已附加的 Linear ticket。",
"dontShowAgain": "不再显示",
"notNow": "暂不",
"missingBoth": "缺少 Orca CLI 和 Linear 智能体技能。",
"missingCli": "缺少 Orca CLI。",
"missingSkill": "缺少 Linear 智能体技能。",