diff --git a/src/main/ipc/pty.test.ts b/src/main/ipc/pty.test.ts index 51e3cf15a..a165d4d3c 100644 --- a/src/main/ipc/pty.test.ts +++ b/src/main/ipc/pty.test.ts @@ -546,14 +546,14 @@ describe('registerPtyHandlers', () => { } } - function spawnAndGetCall(args?: { + async function spawnAndGetCall(args?: { cwd?: string env?: Record command?: string - }): [string, string[], { cwd: string; env: Record }] { + }): Promise<[string, string[], { cwd: string; env: Record }]> { handlers.clear() registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, ...args @@ -3811,11 +3811,11 @@ describe('registerPtyHandlers', () => { delete process.env.PYTHONUTF8 }) - it('passes chcp 65001 to cmd.exe for UTF-8 console output', () => { + it('passes chcp 65001 to cmd.exe for UTF-8 console output', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'C:\\Windows\\system32\\cmd.exe', @@ -3824,11 +3824,11 @@ describe('registerPtyHandlers', () => { ) }) - it('sets Console encoding for powershell.exe', () => { + it('sets Console encoding for powershell.exe', async () => { process.env.COMSPEC = 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', @@ -3837,11 +3837,11 @@ describe('registerPtyHandlers', () => { ) }) - it('sets Console encoding for pwsh.exe', () => { + it('sets Console encoding for pwsh.exe', async () => { process.env.COMSPEC = 'C:\\Program Files\\PowerShell\\7\\pwsh.exe' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'C:\\Program Files\\PowerShell\\7\\pwsh.exe', @@ -3850,34 +3850,34 @@ describe('registerPtyHandlers', () => { ) }) - it('sets PYTHONUTF8=1 in the spawn environment on Windows', () => { + it('sets PYTHONUTF8=1 in the spawn environment on Windows', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) const spawnCall = spawnMock.mock.calls.at(-1)! const env = spawnCall[2].env as Record expect(env.PYTHONUTF8).toBe('1') }) - it('does not override an existing PYTHONUTF8 value', () => { + it('does not override an existing PYTHONUTF8 value', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' process.env.PYTHONUTF8 = '0' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) const spawnCall = spawnMock.mock.calls.at(-1)! const env = spawnCall[2].env as Record expect(env.PYTHONUTF8).toBe('0') }) - it('launches Git Bash from COMSPEC as an interactive login shell', () => { + it('launches Git Bash from COMSPEC as an interactive login shell', async () => { process.env.COMSPEC = 'C:\\Program Files\\Git\\bin\\bash.exe' registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'C:\\Program Files\\Git\\bin\\bash.exe', @@ -3888,7 +3888,7 @@ describe('registerPtyHandlers', () => { ) }) - it('uses terminalWindowsShell setting over COMSPEC when provided', () => { + it('uses terminalWindowsShell setting over COMSPEC when provided', async () => { // Why: COMSPEC always points to cmd.exe on stock Windows, so without the // setting the terminal would ignore the user's shell preference. process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' @@ -3902,7 +3902,7 @@ describe('registerPtyHandlers', () => { terminalWindowsShell: 'powershell.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'powershell.exe', @@ -3911,7 +3911,7 @@ describe('registerPtyHandlers', () => { ) }) - it('spawns powershell.exe when PowerShell family keeps the inbox implementation', () => { + it('spawns powershell.exe when PowerShell family keeps the inbox implementation', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' registerPtyHandlers( @@ -3924,7 +3924,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'powershell.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'powershell.exe', @@ -3933,7 +3933,7 @@ describe('registerPtyHandlers', () => { ) }) - it('spawns pwsh.exe when PowerShell 7 is selected and available', () => { + it('spawns pwsh.exe when PowerShell 7 is selected and available', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' isPwshAvailableMock.mockReturnValue(true) @@ -3947,12 +3947,12 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith('pwsh.exe', POWERSHELL_OSC133_ARGS, expect.any(Object)) }) - it('falls back to powershell.exe when PowerShell 7 is selected but unavailable', () => { + it('falls back to powershell.exe when PowerShell 7 is selected but unavailable', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' isPwshAvailableMock.mockReturnValue(false) @@ -3966,7 +3966,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'powershell.exe', @@ -3975,7 +3975,7 @@ describe('registerPtyHandlers', () => { ) }) - it('falls back to powershell.exe when shellOverride requests pwsh.exe but pwsh is unavailable', () => { + it('falls back to powershell.exe when shellOverride requests pwsh.exe but pwsh is unavailable', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' isPwshAvailableMock.mockReturnValue(false) @@ -3989,7 +3989,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, shellOverride: 'pwsh.exe' }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, shellOverride: 'pwsh.exe' }) expect(spawnMock).toHaveBeenCalledWith( 'powershell.exe', @@ -3998,7 +3998,7 @@ describe('registerPtyHandlers', () => { ) }) - it('ignores the PowerShell implementation setting for cmd.exe', () => { + it('ignores the PowerShell implementation setting for cmd.exe', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\powershell.exe' isPwshAvailableMock.mockReturnValue(true) @@ -4012,7 +4012,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) expect(spawnMock).toHaveBeenCalledWith( 'cmd.exe', @@ -4021,7 +4021,7 @@ describe('registerPtyHandlers', () => { ) }) - it('ignores the PowerShell implementation setting for wsl.exe', () => { + it('ignores the PowerShell implementation setting for wsl.exe', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\powershell.exe' isPwshAvailableMock.mockReturnValue(true) @@ -4035,7 +4035,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24 }) const spawnOptions = spawnMock.mock.calls.at(-1)?.[2] as { env: Record } expect(spawnMock).toHaveBeenCalledWith('wsl.exe', expect.any(Array), expect.any(Object)) @@ -4043,7 +4043,7 @@ describe('registerPtyHandlers', () => { expect(spawnOptions.env.ORCA_CODEX_HOME).toBeUndefined() }) - it('keeps shellOverride priority for one-off tabs', () => { + it('keeps shellOverride priority for one-off tabs', async () => { process.env.COMSPEC = 'C:\\Windows\\system32\\cmd.exe' isPwshAvailableMock.mockReturnValue(false) @@ -4057,7 +4057,7 @@ describe('registerPtyHandlers', () => { terminalWindowsPowerShellImplementation: 'pwsh.exe' }) as never ) - handlers.get('pty:spawn')!(null, { + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, shellOverride: 'wsl.exe' @@ -4113,7 +4113,7 @@ describe('registerPtyHandlers', () => { } }) - it('spawns a plain POSIX login shell and queues startup commands for the live session', () => { + it('spawns a plain POSIX login shell and queues startup commands for the live session', async () => { const originalPlatform = process.platform const originalShell = process.env.SHELL const originalZdotdir = process.env.ZDOTDIR @@ -4126,7 +4126,10 @@ describe('registerPtyHandlers', () => { delete process.env.ZDOTDIR try { - const [shell, args, options] = spawnAndGetCall({ cwd: '/tmp', command: 'printf "hello"' }) + const [shell, args, options] = await spawnAndGetCall({ + cwd: '/tmp', + command: 'printf "hello"' + }) expect(shell).toBe('/bin/zsh') expect(args).toEqual(['-l']) expect(options.env.ZDOTDIR).toBe('/tmp/orca-user-data/shell-ready/zsh') @@ -4149,7 +4152,7 @@ describe('registerPtyHandlers', () => { } }) - it('uses the POSIX shell wrapper so OpenCode config survives shell startup files', () => { + it('uses the POSIX shell wrapper so OpenCode config survives shell startup files', async () => { const originalPlatform = process.platform const originalShell = process.env.SHELL @@ -4160,7 +4163,7 @@ describe('registerPtyHandlers', () => { process.env.SHELL = '/bin/zsh' try { - const [shell, args, options] = spawnAndGetCall({ cwd: '/tmp' }) + const [shell, args, options] = await spawnAndGetCall({ cwd: '/tmp' }) expect(shell).toBe('/bin/zsh') expect(args).toEqual(['-l']) expect(options.env.OPENCODE_CONFIG_DIR).toBe('/tmp/orca-opencode-config') @@ -4180,7 +4183,7 @@ describe('registerPtyHandlers', () => { } }) - it('uses the POSIX shell wrapper so Pi config survives shell startup files', () => { + it('uses the POSIX shell wrapper so Pi config survives shell startup files', async () => { const originalPlatform = process.platform const originalShell = process.env.SHELL @@ -4196,7 +4199,7 @@ describe('registerPtyHandlers', () => { })) try { - const [shell, args, options] = spawnAndGetCall({ + const [shell, args, options] = await spawnAndGetCall({ cwd: '/tmp', env: { PI_CODING_AGENT_DIR: '/tmp/user-pi-agent' } }) @@ -4233,7 +4236,7 @@ describe('registerPtyHandlers', () => { process.env.SHELL = '/bin/bash' try { - spawnAndGetCall({ cwd: '/tmp', command: 'echo hello' }) + await spawnAndGetCall({ cwd: '/tmp', command: 'echo hello' }) const { getBashShellReadyRcfileContent } = await import('./pty') const bashRcContent = getBashShellReadyRcfileContent() @@ -4259,7 +4262,7 @@ describe('registerPtyHandlers', () => { try { registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, cwd: '/tmp', @@ -4288,7 +4291,7 @@ describe('registerPtyHandlers', () => { try { registerPtyHandlers(mainWindow as never) - handlers.get('pty:spawn')!(null, { + await handlers.get('pty:spawn')!(null, { cols: 80, rows: 24, cwd: '/tmp', diff --git a/src/renderer/src/components/mobile/MobileBrandIcons.tsx b/src/renderer/src/components/mobile/MobileBrandIcons.tsx new file mode 100644 index 000000000..f32e8d392 --- /dev/null +++ b/src/renderer/src/components/mobile/MobileBrandIcons.tsx @@ -0,0 +1,16 @@ +// Why: these are exact filled brand paths, not generic line approximations. +export function IosBrandIcon(): React.JSX.Element { + return ( + + + + ) +} + +export function AndroidLogo(): React.JSX.Element { + return ( + + + + ) +} diff --git a/src/renderer/src/components/mobile/MobileHero.tsx b/src/renderer/src/components/mobile/MobileHero.tsx index 74a50de9d..0c4ed3cf9 100644 --- a/src/renderer/src/components/mobile/MobileHero.tsx +++ b/src/renderer/src/components/mobile/MobileHero.tsx @@ -2,6 +2,8 @@ import { ArrowLeft, ArrowRight, Copy, RefreshCw, Smartphone, Trash2 } from 'luci import { cn } from '../../lib/utils' import type { MobileNetworkInterface } from '../settings/mobile-network-interface-selection' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select' +import { AndroidLogo, IosBrandIcon } from './MobileBrandIcons' +export { HeroIntro } from './MobileHeroIntro' import { translate } from '@/i18n/i18n' export type Platform = 'ios' | 'android' @@ -26,59 +28,6 @@ function getDeviceLabel(): string { return 'computer' } -export function HeroIntro({ onStart }: { onStart: () => void }): React.JSX.Element { - return ( -
-
- - {translate('auto.components.mobile.MobileHero.5410d55d79', 'Orca Mobile')} - -
-

- {translate( - 'auto.components.mobile.MobileHero.cd4e5e816f', - 'Your workspaces, in your pocket.' - )} -

-

- {translate( - 'auto.components.mobile.MobileHero.b4ccce5cb7', - "Control Orca from your phone. Check on agents, review changes, and kick off tasks while you're away from your desk." - )} -

-
- - {translate('auto.components.mobile.MobileHero.da1d5e5ed0', 'Available on')} - - - - {translate('auto.components.mobile.MobileHero.711e6f4b47', 'iOS')} - - - - {translate('auto.components.mobile.MobileHero.ac1eb64952', 'Android')} - -
-
- -
-
- ) -} - type HeroPairedProps = { devices: readonly PairedDevice[] onPairAnother: () => void @@ -424,20 +373,3 @@ export function HeroFlow({ ) } - -// Why: these are exact filled brand paths, not generic line approximations. -function IosBrandIcon(): React.JSX.Element { - return ( - - - - ) -} - -function AndroidLogo(): React.JSX.Element { - return ( - - - - ) -} diff --git a/src/renderer/src/components/mobile/MobileHeroIntro.tsx b/src/renderer/src/components/mobile/MobileHeroIntro.tsx new file mode 100644 index 000000000..d38c25578 --- /dev/null +++ b/src/renderer/src/components/mobile/MobileHeroIntro.tsx @@ -0,0 +1,56 @@ +import { ArrowRight } from 'lucide-react' +import { AndroidLogo, IosBrandIcon } from './MobileBrandIcons' +import { translate } from '@/i18n/i18n' + +export function HeroIntro({ onStart }: { onStart: () => void }): React.JSX.Element { + return ( +
+
+ + {translate('auto.components.mobile.MobileHero.5410d55d79', 'Orca Mobile')} + +
+

+ {translate( + 'auto.components.mobile.MobileHero.cd4e5e816f', + 'Your workspaces, in your pocket.' + )} +

+

+ {translate( + 'auto.components.mobile.MobileHero.b4ccce5cb7', + "Control Orca from your phone. Check on agents, review changes, and kick off tasks while you're away from your desk." + )} +

+
+ + {translate('auto.components.mobile.MobileHero.da1d5e5ed0', 'Available on')} + + + + {translate('auto.components.mobile.MobileHero.711e6f4b47', 'iOS')} + + + + {translate('auto.components.mobile.MobileHero.ac1eb64952', 'Android')} + +
+
+ +
+
+ ) +} diff --git a/src/renderer/src/components/onboarding/GhosttyDiscoveryRow.tsx b/src/renderer/src/components/onboarding/GhosttyDiscoveryRow.tsx new file mode 100644 index 000000000..9a2454725 --- /dev/null +++ b/src/renderer/src/components/onboarding/GhosttyDiscoveryRow.tsx @@ -0,0 +1,93 @@ +import { Check } from 'lucide-react' +import type { GhosttyImportPreview } from '../../../../shared/types' +import ghosttyIcon from '../../../../../resources/ghostty.svg' +import { translate } from '@/i18n/i18n' +import type { DiscoveryState } from './ThemeStep' + +export function GhosttyDiscoveryRow({ + discovery, + importing, + disabled, + onImport +}: { + discovery: DiscoveryState + importing: boolean + disabled: boolean + onImport: (preview: GhosttyImportPreview) => void +}) { + // Why: 'idle' is the pre-effect state that persists on non-Mac (the + // discovery effect short-circuits there), so render nothing instead of + // showing the dashed-border "Looking for a Ghostty config..." placeholder. + if (discovery.status === 'absent' || discovery.status === 'idle') { + return null + } + + if (discovery.status === 'detecting') { + return ( +
+ + {translate( + 'auto.components.onboarding.ThemeStep.2c3aa538f8', + 'Looking for a Ghostty config...' + )} +
+ ) + } + + if (discovery.status === 'imported') { + return ( +
+ + + + {translate('auto.components.onboarding.ThemeStep.78b6386140', 'Imported from Ghostty.')} + + {discovery.fields.length > 0 && ( + {discovery.fields.join(' · ')} + )} + +
+ ) + } + + const { preview, fields } = discovery + return ( +
+ +
+
+ + {translate( + 'auto.components.onboarding.ThemeStep.7ee9234e54', + 'Ghostty config detected.' + )} + {' '} + + {translate('auto.components.onboarding.ThemeStep.248c812283', 'Import')}{' '} + {fields.length > 0 + ? fields.map((f) => f.toLowerCase()).join(', ') + : translate('auto.components.onboarding.ThemeStep.906c4373fe', 'settings')} + ? + +
+ {preview.configPath && ( +
+ {preview.configPath} +
+ )} +
+ +
+ ) +} diff --git a/src/renderer/src/components/onboarding/ThemeStep.tsx b/src/renderer/src/components/onboarding/ThemeStep.tsx index bb00668dc..ad4217aca 100644 --- a/src/renderer/src/components/onboarding/ThemeStep.tsx +++ b/src/renderer/src/components/onboarding/ThemeStep.tsx @@ -4,12 +4,12 @@ import { toast } from 'sonner' import { cn } from '@/lib/utils' import { track } from '@/lib/telemetry' import { useMountedRef } from '@/hooks/useMountedRef' +import { GhosttyDiscoveryRow } from './GhosttyDiscoveryRow' import type { DiscoveryStatusEmitted, GhosttyImportPreview, GlobalSettings } from '../../../../shared/types' -import ghosttyIcon from '../../../../../resources/ghostty.svg' import { translate } from '@/i18n/i18n' type ThemeStepProps = { @@ -34,7 +34,7 @@ export function applyOnboardingThemeSelection( // remaining states are exactly `DiscoveryStatusEmitted`, which is the // schema-side enum the compile-time guard in // `src/shared/telemetry-events.ts` locks against. -type DiscoveryState = +export type DiscoveryState = | { status: 'idle' } | { status: 'detecting' } | { status: 'found'; preview: GhosttyImportPreview; fields: string[] } @@ -273,94 +273,6 @@ export function ThemeStep({ theme, onThemeChange, settings, updateSettings }: Th ) } -function GhosttyDiscoveryRow({ - discovery, - importing, - disabled, - onImport -}: { - discovery: DiscoveryState - importing: boolean - disabled: boolean - onImport: (preview: GhosttyImportPreview) => void -}) { - // Why: 'idle' is the pre-effect state that persists on non-Mac (the - // discovery effect short-circuits there), so render nothing instead of - // showing the dashed-border "Looking for a Ghostty config…" placeholder. - if (discovery.status === 'absent' || discovery.status === 'idle') { - return null - } - - if (discovery.status === 'detecting') { - return ( -
- - {translate( - 'auto.components.onboarding.ThemeStep.2c3aa538f8', - 'Looking for a Ghostty config…' - )} -
- ) - } - - if (discovery.status === 'imported') { - return ( -
- - - - {translate('auto.components.onboarding.ThemeStep.78b6386140', 'Imported from Ghostty.')} - - {discovery.fields.length > 0 && ( - {discovery.fields.join(' · ')} - )} - -
- ) - } - - const { preview, fields } = discovery - return ( -
- -
-
- - {translate( - 'auto.components.onboarding.ThemeStep.7ee9234e54', - 'Ghostty config detected.' - )} - {' '} - - {translate('auto.components.onboarding.ThemeStep.248c812283', 'Import')}{' '} - {fields.length > 0 - ? fields.map((f) => f.toLowerCase()).join(', ') - : translate('auto.components.onboarding.ThemeStep.906c4373fe', 'settings')} - ? - -
- {preview.configPath && ( -
- {preview.configPath} -
- )} -
- -
- ) -} - function ChromePreview({ variant }: { variant: GlobalSettings['theme'] }) { if (variant === 'system') { return ( diff --git a/src/renderer/src/components/right-sidebar/HostedReviewActions.tsx b/src/renderer/src/components/right-sidebar/HostedReviewActions.tsx index 1338b5586..ff88e8545 100644 --- a/src/renderer/src/components/right-sidebar/HostedReviewActions.tsx +++ b/src/renderer/src/components/right-sidebar/HostedReviewActions.tsx @@ -1,12 +1,5 @@ import React, { useCallback, useMemo, useState } from 'react' -import { - LoaderCircle, - GitMerge, - ChevronDown, - Trash2, - GitPullRequestClosed, - CircleDot -} from 'lucide-react' +import { LoaderCircle, GitMerge, ChevronDown, GitPullRequestClosed } from 'lucide-react' import { toast } from 'sonner' import { useAppStore } from '@/store' import { cn } from '@/lib/utils' @@ -27,6 +20,11 @@ import type { GitHubPRMergeMethod } from '../../../../shared/types' import { resolveGitHubPRMergeMethods } from '../../../../shared/github-pr-merge-methods' import { runWorktreeDelete } from '../sidebar/delete-worktree-flow' import { presentGitLabMRMergeState } from './gitlab-mr-merge-state' +import { + ClosedReviewActions, + HostedReviewActionError, + MergedReviewActions +} from './HostedReviewStateActions' import { translate } from '@/i18n/i18n' type HostedReviewActionInfo = Pick< @@ -376,65 +374,28 @@ export default function HostedReviewActions({ - {actionError &&
{actionError}
} + ) } if (review.state === 'closed') { return ( -
- - {actionError &&
{actionError}
} -
+ void handleReopenReview()} + /> ) } if (review.state === 'merged') { return ( - + ) } diff --git a/src/renderer/src/components/right-sidebar/HostedReviewStateActions.tsx b/src/renderer/src/components/right-sidebar/HostedReviewStateActions.tsx new file mode 100644 index 000000000..5ac25e3d4 --- /dev/null +++ b/src/renderer/src/components/right-sidebar/HostedReviewStateActions.tsx @@ -0,0 +1,84 @@ +import { CircleDot, LoaderCircle, Trash2 } from 'lucide-react' +import { Button } from '@/components/ui/button' +import { translate } from '@/i18n/i18n' + +export function HostedReviewActionError({ + message +}: { + message: string | null +}): React.JSX.Element | null { + return message ?
{message}
: null +} + +export function ClosedReviewActions({ + shortLabel, + stateUpdating, + actionError, + onReopenReview +}: { + shortLabel: string + stateUpdating: 'open' | 'closed' | null + actionError: string | null + onReopenReview: () => void +}): React.JSX.Element { + return ( +
+ + +
+ ) +} + +export function MergedReviewActions({ + isDeletingWorktree, + onDeleteWorktree +}: { + isDeletingWorktree: boolean + onDeleteWorktree: () => void +}): React.JSX.Element { + return ( + + ) +} diff --git a/src/renderer/src/components/settings/McpConfigSection.tsx b/src/renderer/src/components/settings/McpConfigSection.tsx index bbad0996c..541233c28 100644 --- a/src/renderer/src/components/settings/McpConfigSection.tsx +++ b/src/renderer/src/components/settings/McpConfigSection.tsx @@ -20,6 +20,7 @@ import { extractIpcErrorMessage } from '../../lib/ipc-error' import { Button } from '../ui/button' import { isWindowsUserAgent } from '../terminal-pane/pane-helpers' import { McpConfigFileRow, type LoadedMcpConfigInspection } from './McpConfigFileRow' +import { McpMissingConfigList } from './McpMissingConfigList' import { translate } from '@/i18n/i18n' type McpConfigSectionProps = { @@ -410,23 +411,7 @@ export function McpConfigSection({ repo }: McpConfigSectionProps): React.JSX.Ele )} - {missingConfigs.length > 0 && !inspectionUnavailable ? ( -
-

- {translate('auto.components.settings.McpConfigSection.4d16a0d9ac', 'Checked')} -

-
- {missingConfigs.map((config) => ( - - {config.candidate.relativePath} - - ))} -
-
- ) : null} + {!inspectionUnavailable ? : null} diff --git a/src/renderer/src/components/settings/McpMissingConfigList.tsx b/src/renderer/src/components/settings/McpMissingConfigList.tsx new file mode 100644 index 000000000..ba0641d0a --- /dev/null +++ b/src/renderer/src/components/settings/McpMissingConfigList.tsx @@ -0,0 +1,30 @@ +import type { LoadedMcpConfigInspection } from './McpConfigFileRow' +import { translate } from '@/i18n/i18n' + +export function McpMissingConfigList({ + missingConfigs +}: { + missingConfigs: LoadedMcpConfigInspection[] +}): React.JSX.Element | null { + if (missingConfigs.length === 0) { + return null + } + + return ( +
+

+ {translate('auto.components.settings.McpConfigSection.4d16a0d9ac', 'Checked')} +

+
+ {missingConfigs.map((config) => ( + + {config.candidate.relativePath} + + ))} +
+
+ ) +} diff --git a/src/renderer/src/components/sidebar/AddRepoDialogStepContent.test.tsx b/src/renderer/src/components/sidebar/AddRepoDialogStepContent.test.tsx index e84572d28..f422bb391 100644 --- a/src/renderer/src/components/sidebar/AddRepoDialogStepContent.test.tsx +++ b/src/renderer/src/components/sidebar/AddRepoDialogStepContent.test.tsx @@ -106,8 +106,8 @@ describe('AddRepoDialogStepContent nested imports', () => { const html = renderNestedStep(0) expect(html).toContain('Is this a monorepo?') - expect(html).toContain('aria-label="Monorepo name"') - expect(html).toContain('Yes, import as monorepo') + expect(html).toContain('aria-label="Group name"') + expect(html).toContain('Import as group') expect(html).toContain('No, import separately') expect(html).not.toContain('>Import') }) @@ -116,8 +116,8 @@ describe('AddRepoDialogStepContent nested imports', () => { const html = renderNestedStep(1) expect(html).toContain('Is this a monorepo?') - expect(html).toContain('aria-label="Monorepo name"') - expect(html).toContain('Yes, import as monorepo') + expect(html).toContain('aria-label="Group name"') + expect(html).toContain('Import as group') expect(html).toContain('No, import separately') expect(html).not.toContain('>Import') }) diff --git a/src/renderer/src/components/sidebar/AddRepoNestedImportStep.test.tsx b/src/renderer/src/components/sidebar/AddRepoNestedImportStep.test.tsx index 7f542c597..47d8ecd69 100644 --- a/src/renderer/src/components/sidebar/AddRepoNestedImportStep.test.tsx +++ b/src/renderer/src/components/sidebar/AddRepoNestedImportStep.test.tsx @@ -1,6 +1,6 @@ // @vitest-environment happy-dom -import { act, type ComponentProps } from 'react' +import { act, useState, type ComponentProps } from 'react' import { createRoot, type Root } from 'react-dom/client' import { renderToStaticMarkup } from 'react-dom/server' import { afterEach, describe, expect, it, vi } from 'vitest' @@ -78,13 +78,13 @@ describe('AddRepoNestedImportStep', () => { expect(html).toContain('Import repositories from folder') expect(html).toContain('Found 3 repositories in') expect(html).toContain('/workspace/platform') - expect(html).toContain('aria-label="Monorepo name"') - expect(html).toContain('aria-label="What is a monorepo name?"') + expect(html).toContain('aria-label="Group name"') + expect(html).not.toContain('What is a') expect(html).toContain('Is this a monorepo?') - expect(html).toContain('Choose this if these projects belong together') + expect(html).toContain('Import them as a group if they're a monorepo') expect(html).toContain('Orca will group them and let you work from the parent folder') expect(html).toContain('No, import separately') - expect(html).toContain('Yes, import as monorepo') + expect(html).toContain('Import as group') expect(html).toContain('payments/api') expect(html).toContain('billing/api') expect(html).not.toContain('disabled=""') @@ -97,9 +97,9 @@ describe('AddRepoNestedImportStep', () => { expect(html).toContain('Is this a monorepo?') expect(html).toContain('No, import separately') - expect(html).toContain('Yes, import as monorepo') + expect(html).toContain('Import as group') expect(html).toMatch(/]*disabled=""[^>]*>No, import separately<\/button>/) - expect(html).toMatch(/]*disabled=""[^>]*>Yes, import as monorepo<\/button>/) + expect(html).toMatch(/]*disabled=""[^>]*>Import as group<\/button>/) }) it('maps the monorepo choice to grouped import and the non-monorepo choice to separate import', () => { @@ -130,11 +130,55 @@ describe('AddRepoNestedImportStep', () => { }) act(() => { - findButton(host, 'Yes, import as monorepo').click() + findButton(host, 'Import as group').click() findButton(host, 'No, import separately').click() }) expect(onImport).toHaveBeenNthCalledWith(1, 'group') expect(onImport).toHaveBeenNthCalledWith(2, 'separate') }) + + it('shows progress only on the clicked import action', () => { + const onImport = vi.fn() + const host = document.createElement('div') + container = host + document.body.appendChild(host) + root = createRoot(host) + + function Harness(): React.JSX.Element { + const [isAdding, setIsAdding] = useState(false) + return ( + + + repo.path))} + isAdding={isAdding} + scanInProgress={false} + onGroupNameChange={vi.fn()} + onSelectedPathsChange={vi.fn()} + onImport={(mode) => { + onImport(mode) + setIsAdding(true) + }} + onStopScan={vi.fn()} + /> + + + ) + } + + act(() => { + root?.render() + }) + + act(() => { + findButton(host, 'Import as group').click() + }) + + expect(onImport).toHaveBeenCalledWith('group') + expect(findButton(host, 'Import as group').querySelector('.animate-spin')).not.toBeNull() + expect(findButton(host, 'No, import separately').querySelector('.animate-spin')).toBeNull() + }) }) diff --git a/src/renderer/src/components/sidebar/AddRepoNestedImportStep.tsx b/src/renderer/src/components/sidebar/AddRepoNestedImportStep.tsx index 76a1a2caf..4de4a9b46 100644 --- a/src/renderer/src/components/sidebar/AddRepoNestedImportStep.tsx +++ b/src/renderer/src/components/sidebar/AddRepoNestedImportStep.tsx @@ -1,5 +1,5 @@ -import { useId, type Dispatch, type SetStateAction } from 'react' -import { CircleHelp, CircleStop, Loader2 } from 'lucide-react' +import { useEffect, useId, useState, type Dispatch, type SetStateAction } from 'react' +import { CircleStop, Loader2 } from 'lucide-react' import { DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' @@ -36,6 +36,20 @@ export function AddRepoNestedImportStep({ }: AddRepoNestedImportStepProps): React.JSX.Element { const folderName = getRuntimePathBasename(scan.selectedPath) || scan.selectedPath const groupNameInputId = useId() + const [pendingImportMode, setPendingImportMode] = useState<'group' | 'separate' | null>(null) + const showSeparateSpinner = isAdding && pendingImportMode === 'separate' + const showGroupSpinner = isAdding && pendingImportMode === 'group' + + useEffect(() => { + if (!isAdding) { + setPendingImportMode(null) + } + }, [isAdding]) + + const handleImport = (mode: 'group' | 'separate'): void => { + setPendingImportMode(mode) + onImport(mode) + } const repoCountLabel = scan.repos.length === 1 ? translate('auto.components.sidebar.AddRepoNestedImportStep.8401a7a0d0', '1 repository') @@ -97,7 +111,7 @@ export function AddRepoNestedImportStep({

{translate( 'auto.components.sidebar.AddRepoNestedImportStep.d75170194e', - 'Choose this if these projects belong together. Orca will group them and let you work from the parent folder.' + "Import them as a group if they're a monorepo or otherwise belong together. Orca will group them and let you work from the parent folder." )}

@@ -106,37 +120,15 @@ export function AddRepoNestedImportStep({ - - - - - - {translate( - 'auto.components.sidebar.AddRepoNestedImportStep.b20bb7c24f', - 'Keeps these repos together in one group. Best for related repos like microservices.' - )} - - onGroupNameChange(event.target.value)} @@ -147,22 +139,24 @@ export function AddRepoNestedImportStep({
diff --git a/src/renderer/src/components/sidebar/FolderWorkspaceComposerDialog.tsx b/src/renderer/src/components/sidebar/FolderWorkspaceComposerDialog.tsx index ab09a6532..3ec00563c 100644 --- a/src/renderer/src/components/sidebar/FolderWorkspaceComposerDialog.tsx +++ b/src/renderer/src/components/sidebar/FolderWorkspaceComposerDialog.tsx @@ -335,17 +335,10 @@ export function FolderWorkspaceComposerDialog({ repoId={repoId} selectedRepoIsGit={true} onRepoChange={handleRepoChange} - primaryActionLabel={ - quickAgent - ? translate( - 'auto.components.sidebar.FolderWorkspaceComposerDialog.createStart', - 'Create & Start Agent' - ) - : translate( - 'auto.components.sidebar.FolderWorkspaceComposerDialog.create', - 'Create Workspace' - ) - } + primaryActionLabel={translate( + 'auto.components.sidebar.FolderWorkspaceComposerDialog.create', + 'Create workspace' + )} projectLabel={translate( 'auto.components.sidebar.FolderWorkspaceComposerDialog.sourceProject', 'Task Source' diff --git a/src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts b/src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts index b7235e6e1..44b3fde78 100644 --- a/src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts +++ b/src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts @@ -15,6 +15,16 @@ type WorktreeListComponent = React.ComponentType<{ let WorktreeList: WorktreeListComponent +function makeFolderWorkspacePathStatusMockState(): Record { + return { + fetchFolderWorkspacePathStatus: vi.fn(), + folderWorkspaces: [], + folderWorkspacePathStatuses: {}, + getFolderWorkspacePathStatusCacheKey: (request: unknown) => JSON.stringify(request), + getFreshFolderWorkspacePathStatus: () => null + } +} + vi.mock('@/store', () => { const useAppStore = ((selector: (state: Record) => unknown) => selector(mockStore.state)) as (( @@ -306,6 +316,7 @@ function setLineageFixtureState( grandchild.isUnread = unreadWorktreeIds.has(grandchild.id) mockStore.state = { + ...makeFolderWorkspacePathStatusMockState(), activeModal: '', activeView: 'terminal', activeWorktreeId: null, @@ -385,6 +396,7 @@ function setProjectGroupWithoutWorktreeRowsState(filterRepoIds: string[] = []): } mockStore.state = { + ...makeFolderWorkspacePathStatusMockState(), activeModal: '', activeView: 'terminal', activeWorktreeId: null, @@ -444,6 +456,7 @@ function setEmptyUngroupedProjectState(filterRepoIds: string[] = []): void { } mockStore.state = { + ...makeFolderWorkspacePathStatusMockState(), activeModal: '', activeView: 'terminal', activeWorktreeId: null, @@ -668,7 +681,7 @@ describe('WorktreeList lineage child card renderer', () => { const markup = await renderWorktreeListMarkup() expect(getOptionOpeningTag(markup, 'child')).toContain('padding-left:14px') - expect(getCardOpeningTag(markup, 'child')).toContain('data-content-indent="20"') + expect(getCardOpeningTag(markup, 'child')).toContain('data-content-indent="6"') expect(getCardOpeningTag(markup, 'child')).toContain('data-flush-surface="true"') }) @@ -677,7 +690,7 @@ describe('WorktreeList lineage child card renderer', () => { const markup = await renderWorktreeListMarkup() expect(getOptionOpeningTag(markup, 'child')).toContain('padding-left:14px') - expect(getCardOpeningTag(markup, 'child')).toContain('data-content-indent="38"') + expect(getCardOpeningTag(markup, 'child')).toContain('data-content-indent="24"') expect(getCardOpeningTag(markup, 'child')).toContain('data-flush-surface="true"') }) @@ -687,8 +700,8 @@ describe('WorktreeList lineage child card renderer', () => { const parentRow = getOptionOpeningTag(markup, 'parent') - expect(parentRow).not.toContain('padding-left') - expect(getCardOpeningTag(markup, 'parent')).toContain('data-content-indent="38"') + expect(parentRow).toContain('padding-left:14px') + expect(getCardOpeningTag(markup, 'parent')).toContain('data-content-indent="24"') expect(getCardOpeningTag(markup, 'parent')).toContain('data-flush-surface="true"') }) }) diff --git a/src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx b/src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx index 9130c45a0..dc91cf0c9 100644 --- a/src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx +++ b/src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx @@ -31,6 +31,16 @@ type WorktreeListComponent = React.ComponentType<{ let WorktreeList: WorktreeListComponent +function makeFolderWorkspacePathStatusMockState(): Record { + return { + fetchFolderWorkspacePathStatus: vi.fn(), + folderWorkspaces: [], + folderWorkspacePathStatuses: {}, + getFolderWorkspacePathStatusCacheKey: (request: unknown) => JSON.stringify(request), + getFreshFolderWorkspacePathStatus: () => null + } +} + vi.mock('@/store', () => { const useAppStore = ((selector: (state: Record) => unknown) => selector(mockStore.state)) as (( @@ -224,6 +234,7 @@ function setLineageState(options: { deletingChild?: boolean } = {}): void { } }) mockStore.state = { + ...makeFolderWorkspacePathStatusMockState(), activeModal: '', activeView: 'terminal', activeWorktreeId: null, diff --git a/src/renderer/src/components/sidebar/folder-workspace-composer-submit.test.ts b/src/renderer/src/components/sidebar/folder-workspace-composer-submit.test.ts new file mode 100644 index 000000000..3c2b4690c --- /dev/null +++ b/src/renderer/src/components/sidebar/folder-workspace-composer-submit.test.ts @@ -0,0 +1,91 @@ +// @vitest-environment happy-dom + +import { afterEach, describe, expect, it, vi } from 'vitest' +import type { FolderWorkspace, ProjectGroup } from '../../../../shared/types' + +const mocks = vi.hoisted(() => ({ + activateAndRevealFolderWorkspace: vi.fn() +})) + +vi.mock('@/lib/worktree-activation', () => ({ + activateAndRevealFolderWorkspace: mocks.activateAndRevealFolderWorkspace +})) + +import { submitFolderWorkspaceCreate } from './folder-workspace-composer-submit' + +function makeProjectGroup(): ProjectGroup { + return { + id: 'group-1', + name: 'Platform', + parentPath: '/repo/platform', + parentGroupId: null, + createdFrom: 'folder-scan', + tabOrder: 0, + isCollapsed: false, + color: null, + createdAt: 1, + updatedAt: 1 + } +} + +function makeFolderWorkspace(): FolderWorkspace { + return { + id: 'folder-workspace-1', + projectGroupId: 'group-1', + name: 'hi', + folderPath: '/repo/platform/hi', + linkedTask: null, + comment: '', + isArchived: false, + isUnread: false, + isPinned: false, + sortOrder: 0, + lastActivityAt: 1, + createdAt: 1, + updatedAt: 1 + } +} + +describe('submitFolderWorkspaceCreate', () => { + afterEach(() => { + mocks.activateAndRevealFolderWorkspace.mockReset() + vi.restoreAllMocks() + }) + + it('closes the composer after creation even when reveal fails', async () => { + const createFolderWorkspace = vi.fn(async () => makeFolderWorkspace()) + const onOpenChange = vi.fn() + const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) + mocks.activateAndRevealFolderWorkspace.mockImplementation(() => { + throw new Error('activation failed') + }) + + await submitFolderWorkspaceCreate({ + projectGroup: makeProjectGroup(), + name: 'hi', + lastAutoName: '', + linkedWorkItem: null, + note: '', + quickAgent: null, + autoRenameBranchFromWork: false, + agentCmdOverrides: {}, + createFolderWorkspace, + onOpenChange + }) + + expect(createFolderWorkspace).toHaveBeenCalledWith({ + projectGroupId: 'group-1', + name: 'hi', + linkedTask: null + }) + expect(onOpenChange).toHaveBeenCalledWith(false) + expect(mocks.activateAndRevealFolderWorkspace).toHaveBeenCalledWith( + 'folder-workspace-1', + undefined + ) + expect(consoleError).toHaveBeenCalledWith( + 'Failed to activate folder workspace after create:', + expect.any(Error) + ) + }) +}) diff --git a/src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts b/src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts index 8bddb367c..b4f1913e7 100644 --- a/src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts +++ b/src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts @@ -4,6 +4,7 @@ import { type LinkedWorkItemSummary } from '@/lib/new-workspace' import { getLinkedWorkItemPromptContext } from '@/lib/linked-work-item-context' +import { isOrcaCliAvailableForLaunch } from '@/lib/orca-cli-launch-availability' import { buildAgentStartupPlan } from '@/lib/tui-agent-startup' import { tuiAgentToAgentKind } from '@/lib/telemetry' import { activateAndRevealFolderWorkspace } from '@/lib/worktree-activation' @@ -67,7 +68,12 @@ export async function submitFolderWorkspaceCreate({ return } - const linkedPromptContext = getLinkedWorkItemPromptContext(linkedWorkItem) + const linearCliAvailable = linkedWorkItem?.linearIdentifier + ? await isOrcaCliAvailableForLaunch({ remote: projectGroup.connectionId != null }) + : false + const linkedPromptContext = getLinkedWorkItemPromptContext(linkedWorkItem, { + cliAvailable: linearCliAvailable + }) const startupPrompt = buildAgentPromptWithContext( note, [], @@ -95,6 +101,12 @@ export async function submitFolderWorkspaceCreate({ } } : undefined - activateAndRevealFolderWorkspace(workspace.id, startup ? { startup } : undefined) onOpenChange(false) + try { + activateAndRevealFolderWorkspace(workspace.id, startup ? { startup } : undefined) + } catch (error) { + // Why: creation already succeeded. Do not leave the completed create modal + // open if the follow-up reveal/startup path hits a transient issue. + console.error('Failed to activate folder workspace after create:', error) + } } diff --git a/src/renderer/src/components/stats/ClaudeUsagePane.tsx b/src/renderer/src/components/stats/ClaudeUsagePane.tsx index d7fb5d00b..0beae4aad 100644 --- a/src/renderer/src/components/stats/ClaudeUsagePane.tsx +++ b/src/renderer/src/components/stats/ClaudeUsagePane.tsx @@ -25,8 +25,10 @@ import { import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' import { ClaudeUsageDailyChart } from './ClaudeUsageDailyChart' import { ClaudeUsageLoadingState } from './ClaudeUsageLoadingState' +import { ClaudeUsageRecentSessionsTable } from './ClaudeUsageRecentSessionsTable' import { ShareUsageButton } from './ShareUsageButton' import { StatCard } from './StatCard' +import { formatCost, formatTokens, formatUpdatedAt } from './usage-formatters' import { translate } from '@/i18n/i18n' const RANGE_OPTIONS: ClaudeUsageRange[] = ['7d', '30d', '90d', 'all'] @@ -47,43 +49,6 @@ const RANGE_LABELS: Record = { all: 'All time' } -function formatTokens(value: number): string { - if (value >= 1_000_000) { - return `${(value / 1_000_000).toFixed(1)}M` - } - if (value >= 1_000) { - return `${(value / 1_000).toFixed(1)}k` - } - return value.toLocaleString() -} - -function formatCost(value: number | null): string { - if (value === null) { - return 'n/a' - } - return value < 0.01 ? `$${value.toFixed(4)}` : `$${value.toFixed(2)}` -} - -function formatUpdatedAt(timestamp: number | null): string { - if (!timestamp) { - return 'Not scanned yet' - } - return `Updated ${new Date(timestamp).toLocaleString()}` -} - -function formatSessionTime(timestamp: string): string { - const parsed = new Date(timestamp) - if (Number.isNaN(parsed.getTime())) { - return timestamp - } - return parsed.toLocaleString(undefined, { - month: 'short', - day: 'numeric', - hour: 'numeric', - minute: '2-digit' - }) -} - export function ClaudeUsagePane(): React.JSX.Element { const scanState = useAppStore((state) => state.claudeUsageScanState) const summary = useAppStore((state) => state.claudeUsageSummary) @@ -412,72 +377,7 @@ export function ClaudeUsagePane(): React.JSX.Element { -
-
-

- {translate('auto.components.stats.ClaudeUsagePane.7e76c84153', 'Recent sessions')} -

-

- {translate('auto.components.stats.ClaudeUsagePane.abfc4a4943', 'Cache reuse rate:')}{' '} - {summary?.cacheReuseRate !== null && summary?.cacheReuseRate !== undefined - ? `${Math.round(summary.cacheReuseRate * 100)}%` - : translate('auto.components.stats.ClaudeUsagePane.7765a4c3e1', 'n/a')} -

-
-
- - - - - - - - - - - - - - {recentSessions.map((row) => ( - - - - - - - - - - ))} - -
- {translate('auto.components.stats.ClaudeUsagePane.01476891c7', 'Last active')} - - {translate('auto.components.stats.ClaudeUsagePane.c17bed0416', 'Project')} - - {translate('auto.components.stats.ClaudeUsagePane.1afc25eb06', 'Model')} - - {translate('auto.components.stats.ClaudeUsagePane.0f03975d59', 'Turns')} - - {translate('auto.components.stats.ClaudeUsagePane.faf3444859', 'Input')} - - {translate('auto.components.stats.ClaudeUsagePane.a8b7487ff7', 'Output')} - - {translate('auto.components.stats.ClaudeUsagePane.21ea00bfa8', 'Cache')} -
- {formatSessionTime(row.lastActiveAt)} - {row.projectLabel} - {row.model ?? - translate('auto.components.stats.ClaudeUsagePane.cfe2282ffa', 'Unknown')} - {row.turns} - {formatTokens(row.inputTokens)} - - {formatTokens(row.outputTokens)} - - {formatTokens(row.cacheReadTokens + row.cacheWriteTokens)} -
-
-
+ )} diff --git a/src/renderer/src/components/stats/ClaudeUsageRecentSessionsTable.tsx b/src/renderer/src/components/stats/ClaudeUsageRecentSessionsTable.tsx new file mode 100644 index 000000000..57752c465 --- /dev/null +++ b/src/renderer/src/components/stats/ClaudeUsageRecentSessionsTable.tsx @@ -0,0 +1,81 @@ +import type { + ClaudeUsageSessionRow, + ClaudeUsageSummary +} from '../../../../shared/claude-usage-types' +import { translate } from '@/i18n/i18n' +import { formatSessionTime, formatTokens } from './usage-formatters' + +export function ClaudeUsageRecentSessionsTable({ + recentSessions, + summary +}: { + recentSessions: ClaudeUsageSessionRow[] + summary: ClaudeUsageSummary | null +}): React.JSX.Element { + return ( +
+
+

+ {translate('auto.components.stats.ClaudeUsagePane.7e76c84153', 'Recent sessions')} +

+

+ {translate('auto.components.stats.ClaudeUsagePane.abfc4a4943', 'Cache reuse rate:')}{' '} + {summary?.cacheReuseRate !== null && summary?.cacheReuseRate !== undefined + ? `${Math.round(summary.cacheReuseRate * 100)}%` + : translate('auto.components.stats.ClaudeUsagePane.7765a4c3e1', 'n/a')} +

+
+
+ + + + + + + + + + + + + + {recentSessions.map((row) => ( + + + + + + + + + + ))} + +
+ {translate('auto.components.stats.ClaudeUsagePane.01476891c7', 'Last active')} + + {translate('auto.components.stats.ClaudeUsagePane.c17bed0416', 'Project')} + + {translate('auto.components.stats.ClaudeUsagePane.1afc25eb06', 'Model')} + + {translate('auto.components.stats.ClaudeUsagePane.0f03975d59', 'Turns')} + + {translate('auto.components.stats.ClaudeUsagePane.faf3444859', 'Input')} + + {translate('auto.components.stats.ClaudeUsagePane.a8b7487ff7', 'Output')} + + {translate('auto.components.stats.ClaudeUsagePane.21ea00bfa8', 'Cache')} +
+ {formatSessionTime(row.lastActiveAt)} + {row.projectLabel} + {row.model ?? + translate('auto.components.stats.ClaudeUsagePane.cfe2282ffa', 'Unknown')} + {row.turns}{formatTokens(row.inputTokens)} + {formatTokens(row.outputTokens)} + + {formatTokens(row.cacheReadTokens + row.cacheWriteTokens)} +
+
+
+ ) +} diff --git a/src/renderer/src/components/stats/CodexUsagePane.tsx b/src/renderer/src/components/stats/CodexUsagePane.tsx index 58f46830e..8df30ccba 100644 --- a/src/renderer/src/components/stats/CodexUsagePane.tsx +++ b/src/renderer/src/components/stats/CodexUsagePane.tsx @@ -24,8 +24,10 @@ import { import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' import { ClaudeUsageLoadingState } from './ClaudeUsageLoadingState' import { CodexUsageDailyChart } from './CodexUsageDailyChart' +import { CodexUsageRecentSessionsTable } from './CodexUsageRecentSessionsTable' import { ShareUsageButton } from './ShareUsageButton' import { StatCard } from './StatCard' +import { formatCost, formatTokens, formatUpdatedAt } from './usage-formatters' import { translate } from '@/i18n/i18n' const RANGE_OPTIONS: CodexUsageRange[] = ['7d', '30d', '90d', 'all'] @@ -46,43 +48,6 @@ const RANGE_LABELS: Record = { all: 'All time' } -function formatTokens(value: number): string { - if (value >= 1_000_000) { - return `${(value / 1_000_000).toFixed(1)}M` - } - if (value >= 1_000) { - return `${(value / 1_000).toFixed(1)}k` - } - return value.toLocaleString() -} - -function formatCost(value: number | null): string { - if (value === null) { - return 'n/a' - } - return value < 0.01 ? `$${value.toFixed(4)}` : `$${value.toFixed(2)}` -} - -function formatUpdatedAt(timestamp: number | null): string { - if (!timestamp) { - return 'Not scanned yet' - } - return `Updated ${new Date(timestamp).toLocaleString()}` -} - -function formatSessionTime(timestamp: string): string { - const parsed = new Date(timestamp) - if (Number.isNaN(parsed.getTime())) { - return timestamp - } - return parsed.toLocaleString(undefined, { - month: 'short', - day: 'numeric', - hour: 'numeric', - minute: '2-digit' - }) -} - export function CodexUsagePane(): React.JSX.Element { const scanState = useAppStore((state) => state.codexUsageScanState) const summary = useAppStore((state) => state.codexUsageSummary) @@ -396,73 +361,7 @@ export function CodexUsagePane(): React.JSX.Element { -
-
-

- {translate('auto.components.stats.CodexUsagePane.0cb0983c07', 'Recent sessions')} -

-

- {translate( - 'auto.components.stats.CodexUsagePane.0bd8655475', - 'Most recent local Codex sessions in this scope.' - )} -

-
-
- - - - - - - - - - - - - - {recentSessions.map((row) => ( - - - - - - - - - - ))} - -
- {translate('auto.components.stats.CodexUsagePane.0c36b100be', 'Last active')} - - {translate('auto.components.stats.CodexUsagePane.1a65900aea', 'Project')} - - {translate('auto.components.stats.CodexUsagePane.c2478bcc3c', 'Model')} - - {translate('auto.components.stats.CodexUsagePane.bd0822ca47', 'Events')} - - {translate('auto.components.stats.CodexUsagePane.3acc582214', 'Input')} - - {translate('auto.components.stats.CodexUsagePane.bbd20344b8', 'Output')} - - {translate('auto.components.stats.CodexUsagePane.e0b988599d', 'Total')} -
- {formatSessionTime(row.lastActiveAt)} - {row.projectLabel} - {row.model ?? - translate('auto.components.stats.CodexUsagePane.bf6cf2d4dd', 'Unknown')} - {row.hasInferredPricing ? ' *' : ''} - {row.events} - {formatTokens(row.inputTokens)} - - {formatTokens(row.outputTokens)} - - {formatTokens(row.totalTokens)} -
-
-
+ )} diff --git a/src/renderer/src/components/stats/CodexUsageRecentSessionsTable.tsx b/src/renderer/src/components/stats/CodexUsageRecentSessionsTable.tsx new file mode 100644 index 000000000..f5ee1a7a4 --- /dev/null +++ b/src/renderer/src/components/stats/CodexUsageRecentSessionsTable.tsx @@ -0,0 +1,75 @@ +import type { CodexUsageSessionRow } from '../../../../shared/codex-usage-types' +import { translate } from '@/i18n/i18n' +import { formatSessionTime, formatTokens } from './usage-formatters' + +export function CodexUsageRecentSessionsTable({ + recentSessions +}: { + recentSessions: CodexUsageSessionRow[] +}): React.JSX.Element { + return ( +
+
+

+ {translate('auto.components.stats.CodexUsagePane.0cb0983c07', 'Recent sessions')} +

+

+ {translate( + 'auto.components.stats.CodexUsagePane.0bd8655475', + 'Most recent local Codex sessions in this scope.' + )} +

+
+
+ + + + + + + + + + + + + + {recentSessions.map((row) => ( + + + + + + + + + + ))} + +
+ {translate('auto.components.stats.CodexUsagePane.0c36b100be', 'Last active')} + + {translate('auto.components.stats.CodexUsagePane.1a65900aea', 'Project')} + + {translate('auto.components.stats.CodexUsagePane.c2478bcc3c', 'Model')} + + {translate('auto.components.stats.CodexUsagePane.bd0822ca47', 'Events')} + + {translate('auto.components.stats.CodexUsagePane.3acc582214', 'Input')} + + {translate('auto.components.stats.CodexUsagePane.bbd20344b8', 'Output')} + + {translate('auto.components.stats.CodexUsagePane.e0b988599d', 'Total')} +
+ {formatSessionTime(row.lastActiveAt)} + {row.projectLabel} + {row.model ?? + translate('auto.components.stats.CodexUsagePane.bf6cf2d4dd', 'Unknown')} + {row.hasInferredPricing ? ' *' : ''} + {row.events}{formatTokens(row.inputTokens)} + {formatTokens(row.outputTokens)} + {formatTokens(row.totalTokens)}
+
+
+ ) +} diff --git a/src/renderer/src/components/stats/OpenCodeUsagePane.tsx b/src/renderer/src/components/stats/OpenCodeUsagePane.tsx index b21dfb5db..721cc3e3f 100644 --- a/src/renderer/src/components/stats/OpenCodeUsagePane.tsx +++ b/src/renderer/src/components/stats/OpenCodeUsagePane.tsx @@ -27,7 +27,9 @@ import { import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' import { ClaudeUsageLoadingState } from './ClaudeUsageLoadingState' import { CodexUsageDailyChart } from './CodexUsageDailyChart' +import { OpenCodeUsageRecentSessionsTable } from './OpenCodeUsageRecentSessionsTable' import { StatCard } from './StatCard' +import { formatCost, formatTokens, formatUpdatedAt } from './usage-formatters' import { translate } from '@/i18n/i18n' const RANGE_OPTIONS: OpenCodeUsageRange[] = ['7d', '30d', '90d', 'all'] @@ -51,43 +53,6 @@ const RANGE_LABELS: Record = { all: 'All time' } -function formatTokens(value: number): string { - if (value >= 1_000_000) { - return `${(value / 1_000_000).toFixed(1)}M` - } - if (value >= 1_000) { - return `${(value / 1_000).toFixed(1)}k` - } - return value.toLocaleString() -} - -function formatCost(value: number | null): string { - if (value === null) { - return 'n/a' - } - return value < 0.01 ? `$${value.toFixed(4)}` : `$${value.toFixed(2)}` -} - -function formatUpdatedAt(timestamp: number | null): string { - if (!timestamp) { - return 'Not scanned yet' - } - return `Updated ${new Date(timestamp).toLocaleString()}` -} - -function formatSessionTime(timestamp: string): string { - const parsed = new Date(timestamp) - if (Number.isNaN(parsed.getTime())) { - return timestamp - } - return parsed.toLocaleString(undefined, { - month: 'short', - day: 'numeric', - hour: 'numeric', - minute: '2-digit' - }) -} - export function OpenCodeUsagePane(): React.JSX.Element { const scanState = useAppStore((state) => state.openCodeUsageScanState) const summary = useAppStore((state) => state.openCodeUsageSummary) @@ -422,78 +387,7 @@ export function OpenCodeUsagePane(): React.JSX.Element { -
-
-

- {translate('auto.components.stats.OpenCodeUsagePane.4799177b1c', 'Recent sessions')} -

-

- {translate( - 'auto.components.stats.OpenCodeUsagePane.81817a641a', - 'Most recent local OpenCode sessions in this scope.' - )} -

-
-
- - - - - - - - - - - - - - {recentSessions.map((row) => ( - - - - - - - - - - ))} - -
- {translate( - 'auto.components.stats.OpenCodeUsagePane.d97bdf6e27', - 'Last active' - )} - - {translate('auto.components.stats.OpenCodeUsagePane.a4738de041', 'Project')} - - {translate('auto.components.stats.OpenCodeUsagePane.08c78441b7', 'Model')} - - {translate('auto.components.stats.OpenCodeUsagePane.d416f5cf92', 'Events')} - - {translate('auto.components.stats.OpenCodeUsagePane.0f2f266c9d', 'Input')} - - {translate('auto.components.stats.OpenCodeUsagePane.dfc4513657', 'Output')} - - {translate('auto.components.stats.OpenCodeUsagePane.349f7c3f5c', 'Total')} -
- {formatSessionTime(row.lastActiveAt)} - {row.projectLabel} - {row.model ?? - translate( - 'auto.components.stats.OpenCodeUsagePane.362231082f', - 'Unknown' - )} - {row.events} - {formatTokens(row.inputTokens)} - - {formatTokens(row.outputTokens)} - - {formatTokens(row.totalTokens)} -
-
-
+ )} diff --git a/src/renderer/src/components/stats/OpenCodeUsageRecentSessionsTable.tsx b/src/renderer/src/components/stats/OpenCodeUsageRecentSessionsTable.tsx new file mode 100644 index 000000000..ad8e3a381 --- /dev/null +++ b/src/renderer/src/components/stats/OpenCodeUsageRecentSessionsTable.tsx @@ -0,0 +1,74 @@ +import type { OpenCodeUsageSessionRow } from '../../../../shared/opencode-usage-types' +import { translate } from '@/i18n/i18n' +import { formatSessionTime, formatTokens } from './usage-formatters' + +export function OpenCodeUsageRecentSessionsTable({ + recentSessions +}: { + recentSessions: OpenCodeUsageSessionRow[] +}): React.JSX.Element { + return ( +
+
+

+ {translate('auto.components.stats.OpenCodeUsagePane.4799177b1c', 'Recent sessions')} +

+

+ {translate( + 'auto.components.stats.OpenCodeUsagePane.81817a641a', + 'Most recent local OpenCode sessions in this scope.' + )} +

+
+
+ + + + + + + + + + + + + + {recentSessions.map((row) => ( + + + + + + + + + + ))} + +
+ {translate('auto.components.stats.OpenCodeUsagePane.d97bdf6e27', 'Last active')} + + {translate('auto.components.stats.OpenCodeUsagePane.a4738de041', 'Project')} + + {translate('auto.components.stats.OpenCodeUsagePane.08c78441b7', 'Model')} + + {translate('auto.components.stats.OpenCodeUsagePane.d416f5cf92', 'Events')} + + {translate('auto.components.stats.OpenCodeUsagePane.0f2f266c9d', 'Input')} + + {translate('auto.components.stats.OpenCodeUsagePane.dfc4513657', 'Output')} + + {translate('auto.components.stats.OpenCodeUsagePane.349f7c3f5c', 'Total')} +
+ {formatSessionTime(row.lastActiveAt)} + {row.projectLabel} + {row.model ?? + translate('auto.components.stats.OpenCodeUsagePane.362231082f', 'Unknown')} + {row.events}{formatTokens(row.inputTokens)} + {formatTokens(row.outputTokens)} + {formatTokens(row.totalTokens)}
+
+
+ ) +} diff --git a/src/renderer/src/components/stats/usage-formatters.ts b/src/renderer/src/components/stats/usage-formatters.ts new file mode 100644 index 000000000..ae3345a1e --- /dev/null +++ b/src/renderer/src/components/stats/usage-formatters.ts @@ -0,0 +1,36 @@ +export function formatTokens(value: number): string { + if (value >= 1_000_000) { + return `${(value / 1_000_000).toFixed(1)}M` + } + if (value >= 1_000) { + return `${(value / 1_000).toFixed(1)}k` + } + return value.toLocaleString() +} + +export function formatCost(value: number | null): string { + if (value === null) { + return 'n/a' + } + return value < 0.01 ? `$${value.toFixed(4)}` : `$${value.toFixed(2)}` +} + +export function formatUpdatedAt(timestamp: number | null): string { + if (!timestamp) { + return 'Not scanned yet' + } + return `Updated ${new Date(timestamp).toLocaleString()}` +} + +export function formatSessionTime(timestamp: string): string { + const parsed = new Date(timestamp) + if (Number.isNaN(parsed.getTime())) { + return timestamp + } + return parsed.toLocaleString(undefined, { + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: '2-digit' + }) +} diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 3aa1f5c4c..74a6e581f 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -3067,7 +3067,6 @@ "2f8298f3c3": "Stop scan", "c157f31a95": "Import as group", "40199ef7b3": "Group name", - "b20bb7c24f": "Keeps these repos together in one group. Best for related repos like microservices.", "787412361a": "What is a group name?", "5f857ba8e6": "in", "4df0d08cc5": "Found", @@ -3076,11 +3075,10 @@ "cf9d382ca1": "Import", "220dd32d83": "Scanning...", "fb33359f69": "Is this a monorepo?", - "d75170194e": "Choose this if these projects belong together. Orca will group them and let you work from the parent folder.", - "39d51212cc": "Monorepo name", - "e907ec8935": "What is a monorepo name?", + "d75170194e": "Import them as a group if they're a monorepo or otherwise belong together. Orca will group them and let you work from the parent folder.", + "39d51212cc": "Group name", "aa0247680d": "No, import separately", - "a0bc4d1f8e": "Yes, import as monorepo", + "a0bc4d1f8e": "Import as group", "8401a7a0d0": "1 repository", "d4f1df62ef": "{{value0}} repositories", "b4263a2ac4": "Found {{value0}} in {{value1}}.", @@ -3812,8 +3810,7 @@ "connectFailed": "Failed to connect to project.", "noRepos": "Add a Git project under this folder to attach GitHub or GitLab tasks.", "title": "Create Folder Workspace", - "createStart": "Create & Start Agent", - "create": "Create Workspace", + "create": "Create workspace", "sourceProject": "Task Source", "chooseSourceProject": "Choose task source" } diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index 2b241f59a..81cb45855 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -3067,7 +3067,6 @@ "2f8298f3c3": "Detener escaneo", "c157f31a95": "Importar como grupo", "40199ef7b3": "Nombre del grupo", - "b20bb7c24f": "Mantiene estos repos juntos en un grupo. Lo mejor para repos relacionados como microservicios.", "787412361a": "¿Qué es el nombre de un grupo?", "5f857ba8e6": "en", "4df0d08cc5": "Encontró", @@ -3076,11 +3075,10 @@ "cf9d382ca1": "Importar", "220dd32d83": "Exploración...", "fb33359f69": "¿Es esto un monorepo?", - "d75170194e": "Elige esto si estos proyectos pertenecen juntos. Orca los agrupará y te permitirá trabajar desde la carpeta principal.", - "39d51212cc": "Nombre del monorepo", - "e907ec8935": "¿Qué es un nombre de monorepo?", + "d75170194e": "Impórtalos como grupo si son un monorepo o si pertenecen juntos. Orca los agrupará y te permitirá trabajar desde la carpeta principal.", + "39d51212cc": "Nombre del grupo", "aa0247680d": "No, importar por separado", - "a0bc4d1f8e": "Sí, importar como monorepo", + "a0bc4d1f8e": "Importar como grupo", "8401a7a0d0": "1 repositorio", "d4f1df62ef": "{{value0}} repositorios", "b4263a2ac4": "Se encontraron {{value0}} en {{value1}}.", @@ -3812,8 +3810,7 @@ "connectFailed": "Failed to connect to project.", "noRepos": "Add a Git project under this folder to attach GitHub or GitLab tasks.", "title": "Create Folder Workspace", - "createStart": "Create & Start Agent", - "create": "Create Workspace", + "create": "Create workspace", "sourceProject": "Task Source", "chooseSourceProject": "Choose task source" } diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 9d09ce974..ee4e46415 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -3048,7 +3048,6 @@ "2f8298f3c3": "スキャンの停止", "c157f31a95": "グループとしてインポート", "40199ef7b3": "グループ名", - "b20bb7c24f": "これらの repos を 1 つのグループにまとめます。マイクロサービスなどの関連 repos に最適です。", "787412361a": "グループ名とは何ですか?", "5f857ba8e6": "で", "4df0d08cc5": "見つかった", @@ -3057,11 +3056,10 @@ "cf9d382ca1": "輸入", "220dd32d83": "走査...", "fb33359f69": "これはモノレポですか?", - "d75170194e": "これらのプロジェクトがまとまっている場合は、これを選択してください。Orca がグループ化し、親フォルダーから作業できるようにします。", - "39d51212cc": "モノレポ名", - "e907ec8935": "モノレポ名とは何ですか?", + "d75170194e": "モノレポ、または一緒に扱うべきプロジェクトの場合は、グループとしてインポートします。Orca がグループ化し、親フォルダーから作業できるようにします。", + "39d51212cc": "グループ名", "aa0247680d": "いいえ、個別にインポート", - "a0bc4d1f8e": "はい、モノレポとしてインポート", + "a0bc4d1f8e": "グループとしてインポート", "8401a7a0d0": "1 個のリポジトリ", "d4f1df62ef": "{{value0}} 個のリポジトリ", "b4263a2ac4": "{{value1}} で {{value0}} が見つかりました。", @@ -3812,8 +3810,7 @@ "connectFailed": "Failed to connect to project.", "noRepos": "Add a Git project under this folder to attach GitHub or GitLab tasks.", "title": "Create Folder Workspace", - "createStart": "Create & Start Agent", - "create": "Create Workspace", + "create": "Create workspace", "sourceProject": "Task Source", "chooseSourceProject": "Choose task source" } diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index bdaa1af36..cece5c20d 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -3048,7 +3048,6 @@ "2f8298f3c3": "스캔 중지", "c157f31a95": "그룹으로 가져오기", "40199ef7b3": "그룹 이름", - "b20bb7c24f": "이러한 repos를 하나의 그룹에 함께 유지합니다. 마이크로서비스와 같은 관련 repos 에 가장 적합합니다.", "787412361a": "그룹 이름은 무엇입니까?", "5f857ba8e6": "~에", "4df0d08cc5": "발견됨", @@ -3057,11 +3056,10 @@ "cf9d382ca1": "수입", "220dd32d83": "스캐닝...", "fb33359f69": "이 폴더가 모노레포인가요?", - "d75170194e": "이 프로젝트들이 함께 속한다면 이것을 선택하세요. Orca가 그룹으로 묶고 상위 폴더에서 작업할 수 있게 합니다.", - "39d51212cc": "모노레포 이름", - "e907ec8935": "모노레포 이름이란 무엇인가요?", + "d75170194e": "모노레포이거나 함께 속한 프로젝트라면 그룹으로 가져오세요. Orca가 그룹으로 묶고 상위 폴더에서 작업할 수 있게 합니다.", + "39d51212cc": "그룹 이름", "aa0247680d": "아니요, 별도로 가져오기", - "a0bc4d1f8e": "예, 모노레포로 가져오기", + "a0bc4d1f8e": "그룹으로 가져오기", "8401a7a0d0": "저장소 1개", "d4f1df62ef": "저장소 {{value0}}개", "b4263a2ac4": "{{value1}}에서 {{value0}}을(를) 찾았습니다.", @@ -3580,7 +3578,7 @@ "c1f4a31623": "{{value0}}개 하위 워크스페이스 표시", "e97297cb75": "{{value0}}개 하위 워크스페이스 숨기기", "0cd15956d4": "{{value0}}개 하위 워크스페이스 숨기기", - "bd37a57ac8": "Create workspace for {{value0}}", + "bd37a57ac8": "{{value0}}에 대한 워크스페이스 만들기", "b667b59632": "Some projects could not be removed from Orca", "f94466bc39": "{{value0}} of {{value1}} contained project{{value2}} remained after deleting the group.", "groupDeleteFailed": "Failed to delete group", @@ -3812,8 +3810,7 @@ "connectFailed": "Failed to connect to project.", "noRepos": "Add a Git project under this folder to attach GitHub or GitLab tasks.", "title": "Create Folder Workspace", - "createStart": "Create & Start Agent", - "create": "Create Workspace", + "create": "워크스페이스 만들기", "sourceProject": "Task Source", "chooseSourceProject": "Choose task source" } diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index cf83bcf75..e257e257c 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -3048,7 +3048,6 @@ "2f8298f3c3": "停止扫描", "c157f31a95": "作为组导入", "40199ef7b3": "团体名称", - "b20bb7c24f": "将这些 repos 放在一组中。最适合微服务等相关 repos。", "787412361a": "什么是群组名称?", "5f857ba8e6": "在", "4df0d08cc5": "成立", @@ -3057,11 +3056,10 @@ "cf9d382ca1": "导入", "220dd32d83": "扫描...", "fb33359f69": "这是 Monorepo 吗?", - "d75170194e": "如果这些项目属于同一组,请选择此项。Orca 会将它们分组,并让你从父文件夹开始工作。", - "39d51212cc": "Monorepo 名称", - "e907ec8935": "什么是 Monorepo 名称?", + "d75170194e": "如果它们是 Monorepo,或本来就应该放在一起,请将它们作为组导入。Orca 会将它们分组,并让你从父文件夹开始工作。", + "39d51212cc": "组名称", "aa0247680d": "否,单独导入", - "a0bc4d1f8e": "是,作为 Monorepo 导入", + "a0bc4d1f8e": "作为组导入", "8401a7a0d0": "1 个仓库", "d4f1df62ef": "{{value0}} 个仓库", "b4263a2ac4": "在 {{value1}} 中找到 {{value0}}。", @@ -3580,7 +3578,7 @@ "c1f4a31623": "显示 {{value0}} 个子工作区", "e97297cb75": "隐藏 {{value0}} 个子工作区", "0cd15956d4": "隐藏 {{value0}} 个子工作区", - "bd37a57ac8": "Create workspace for {{value0}}", + "bd37a57ac8": "为 {{value0}} 创建工作区", "b667b59632": "Some projects could not be removed from Orca", "f94466bc39": "{{value0}} of {{value1}} contained project{{value2}} remained after deleting the group.", "groupDeleteFailed": "Failed to delete group", @@ -3812,8 +3810,7 @@ "connectFailed": "Failed to connect to project.", "noRepos": "Add a Git project under this folder to attach GitHub or GitLab tasks.", "title": "Create Folder Workspace", - "createStart": "Create & Start Agent", - "create": "Create Workspace", + "create": "创建工作区", "sourceProject": "Task Source", "chooseSourceProject": "Choose task source" }