From 3185ab5bdc71710808df6b76205cf8ffe1f2df58 Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Mon, 13 Jul 2026 18:42:42 -0400 Subject: [PATCH] fix(auth): clarify sign-out confirmation Co-authored-by: Orca --- .../OrcaProfileSignOutConfirmDialog.test.tsx | 39 +++++++++++++++++++ .../OrcaProfileSignOutConfirmDialog.tsx | 12 ++---- .../orca-profiles/OrcaProfileSwitcher.tsx | 1 - src/renderer/src/i18n/locales/en.json | 4 +- src/renderer/src/i18n/locales/es.json | 4 +- src/renderer/src/i18n/locales/ja.json | 4 +- src/renderer/src/i18n/locales/ko.json | 4 +- src/renderer/src/i18n/locales/zh.json | 4 +- 8 files changed, 53 insertions(+), 19 deletions(-) create mode 100644 src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.test.tsx diff --git a/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.test.tsx b/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.test.tsx new file mode 100644 index 00000000000..fa3961f455e --- /dev/null +++ b/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.test.tsx @@ -0,0 +1,39 @@ +// @vitest-environment happy-dom + +import type { ReactNode } from 'react' +import { renderToStaticMarkup } from 'react-dom/server' +import { describe, expect, it, vi } from 'vitest' +import { OrcaProfileSignOutConfirmDialog } from './OrcaProfileSignOutConfirmDialog' + +vi.mock('@/components/ui/dialog', () => ({ + Dialog: ({ children }: { children: ReactNode }) => <>{children}, + DialogContent: ({ children }: { children: ReactNode }) =>
{children}
, + DialogDescription: ({ children }: { children: ReactNode }) =>

{children}

, + DialogFooter: ({ children }: { children: ReactNode }) =>
{children}
, + DialogHeader: ({ children }: { children: ReactNode }) =>
{children}
, + DialogTitle: ({ children }: { children: ReactNode }) =>

{children}

+})) + +vi.mock('@/components/ui/button', () => ({ + Button: ({ children }: { children: ReactNode }) => +})) + +describe('OrcaProfileSignOutConfirmDialog', () => { + it('describes account sign-out without presenting a local profile or warning', () => { + const html = renderToStaticMarkup( + + ) + + expect(html).toContain('Sign out of Orca?') + expect(html).toContain( + 'You'll be signed out of Orca on this device. Your local projects and worktrees won't be affected.' + ) + expect(html).not.toContain('Personal') + expect(html).not.toContain('alert-triangle') + }) +}) diff --git a/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.tsx b/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.tsx index afa2b4707de..3e86dcf81a7 100644 --- a/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.tsx +++ b/src/renderer/src/components/orca-profiles/OrcaProfileSignOutConfirmDialog.tsx @@ -1,4 +1,4 @@ -import { AlertTriangle, Loader2 } from 'lucide-react' +import { Loader2 } from 'lucide-react' import { Button } from '@/components/ui/button' import { Dialog, @@ -14,28 +14,24 @@ export function OrcaProfileSignOutConfirmDialog({ open, onOpenChange, onConfirm, - profileName, signingOut }: { open: boolean onOpenChange: (open: boolean) => void onConfirm: () => void - profileName: string signingOut: boolean }): React.JSX.Element { return ( - - - {translate('auto.components.orca.profiles.signout.confirm.title', 'Sign out?')} + + {translate('auto.components.orca.profiles.signout.confirm.title', 'Sign out of Orca?')} {translate( 'auto.components.orca.profiles.signout.confirm.description', - 'Sign out of {{profileName}} and keep its projects, worktrees, and local metadata on this device.', - { profileName } + "You'll be signed out of Orca on this device. Your local projects and worktrees won't be affected." )} diff --git a/src/renderer/src/components/orca-profiles/OrcaProfileSwitcher.tsx b/src/renderer/src/components/orca-profiles/OrcaProfileSwitcher.tsx index 34472d996e6..f5858d4aa7d 100644 --- a/src/renderer/src/components/orca-profiles/OrcaProfileSwitcher.tsx +++ b/src/renderer/src/components/orca-profiles/OrcaProfileSwitcher.tsx @@ -402,7 +402,6 @@ export function OrcaProfileSwitcher({ onConfirm={() => { void handleConfirmSignOut() }} - profileName={activeProfile.name} signingOut={signingOut} /> {multiProfileUi ? ( diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 574e6f3ee28..9ccad3441a0 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -12874,8 +12874,8 @@ }, "signout": { "confirm": { - "title": "Sign out?", - "description": "Sign out of {{profileName}} and keep its projects, worktrees, and local metadata on this device.", + "title": "Sign out of Orca?", + "description": "You'll be signed out of Orca on this device. Your local projects and worktrees won't be affected.", "cancel": "Cancel", "action": "Sign out" } diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index 17eed054033..ae78d1de6c4 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -12874,8 +12874,8 @@ }, "signout": { "confirm": { - "title": "¿Cerrar sesión?", - "description": "Cerrar sesión de {{profileName}} y mantener sus proyectos, worktrees y metadatos locales en este dispositivo.", + "title": "¿Cerrar sesión en Orca?", + "description": "Se cerrará tu sesión de Orca en este dispositivo. Tus proyectos y worktrees locales no se verán afectados.", "cancel": "Cancelar", "action": "Cerrar sesión" } diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 484f7a4be7f..f7ee4d26e96 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -12874,8 +12874,8 @@ }, "signout": { "confirm": { - "title": "ログアウトしますか?", - "description": "{{profileName}}からログアウトし、プロジェクト、ワークツリー、ローカルメタデータをこのデバイスに保持します。", + "title": "Orcaからログアウトしますか?", + "description": "このデバイスでOrcaからログアウトします。ローカルのプロジェクトとワークツリーには影響しません。", "cancel": "キャンセル", "action": "ログアウト" } diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 59efe940d28..49b8ffef71e 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -12874,8 +12874,8 @@ }, "signout": { "confirm": { - "title": "로그아웃하시겠습니까?", - "description": "{{profileName}}에서 로그아웃하고 프로젝트, 워크트리 및 로컬 메타데이터를 이 장치에 유지합니다.", + "title": "Orca에서 로그아웃할까요?", + "description": "이 기기의 Orca에서 로그아웃됩니다. 로컬 프로젝트와 워크트리에는 영향을 주지 않습니다.", "cancel": "취소", "action": "로그아웃" } diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index ec53a071121..c5dc100ba4c 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -12874,8 +12874,8 @@ }, "signout": { "confirm": { - "title": "退出登录?", - "description": "退出 {{profileName}},并在此设备上保留其项目、工作树和本地元数据。", + "title": "退出 Orca?", + "description": "你将在此设备上退出 Orca。本地项目和工作树不会受到影响。", "cancel": "取消", "action": "退出登录" }