diff --git a/config/host-list-render-baseline.txt b/config/host-list-render-baseline.txt index 6bed7509997..40b4881f54b 100644 --- a/config/host-list-render-baseline.txt +++ b/config/host-list-render-baseline.txt @@ -8,7 +8,7 @@ 1 src/renderer/src/components/settings/BrowserSessionCookiesSection.tsx 1 src/renderer/src/components/settings/BrowserSshWorkspaceRoutingSetting.tsx 1 src/renderer/src/components/settings/QuickCommandsToolbar.tsx -1 src/renderer/src/components/settings/RepositoryHostSetupsSection.tsx +1 src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.tsx 1 src/renderer/src/components/sidebar/AddRemoteHostSshConfigPicker.tsx 4 src/renderer/src/components/status-bar/SshStatusSegment.tsx 1 src/renderer/src/components/status-bar/resource-usage-popover-body.tsx diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index a42bff50451..3803848a9b5 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -8005,10 +8005,10 @@ "src/renderer/src/components/settings/RepositoryForkSyncSection.test.tsx": 750, "src/renderer/src/components/settings/RepositoryGitHubAccountSection.inventory-lifetime.test.tsx": 578, "src/renderer/src/components/settings/RepositoryGitHubAccountSection.test.tsx": 506, - "src/renderer/src/components/settings/RepositoryHooksSection.test.ts": 776, - "src/renderer/src/components/settings/RepositoryHostSetupsSection.settings-entry.test.tsx": 1648, - "src/renderer/src/components/settings/RepositoryHostSetupsSection.test.tsx": 1935, - "src/renderer/src/components/settings/RepositoryHostSetupsSection.workspace-window.test.tsx": 1452, + "src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.test.ts": 776, + "src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.settings-entry.test.tsx": 1648, + "src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.test.tsx": 1935, + "src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.workspace-window.test.tsx": 1452, "src/renderer/src/components/settings/RepositoryIconEmojiPicker.test.tsx": 252, "src/renderer/src/components/settings/RepositoryIconPicker.github-avatar-refresh.test.tsx": 494, "src/renderer/src/components/settings/repository/RepositoryJiraProjectSection.test.tsx": 309, @@ -8097,9 +8097,9 @@ "src/renderer/src/components/settings/provider-account-scope.test.ts": 75, "src/renderer/src/components/settings/provider-account-visibility.test.ts": 44, "src/renderer/src/components/settings/provider-rate-limit-scope-panels.test.tsx": 320, - "src/renderer/src/components/settings/repository-description-templates.test.tsx": 783, - "src/renderer/src/components/settings/repository-hook-settings-draft.test.ts": 409, - "src/renderer/src/components/settings/repository-host-setup-options.test.ts": 268, + "src/renderer/src/components/settings/repository/execution/repository-description-templates.test.tsx": 783, + "src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.test.ts": 409, + "src/renderer/src/components/settings/repository/execution/repository-host-setup-options.test.ts": 268, "src/renderer/src/components/settings/repository-icon-github.test.ts": 49, "src/renderer/src/components/settings/repository-source-control-ai-global-ux.test.ts": 389, "src/renderer/src/components/settings/repository/source-control/repository-source-control-ai-persist-queue.test.ts": 86, diff --git a/src/renderer/src/components/settings/ProjectWindowsRuntimeSetting.tsx b/src/renderer/src/components/settings/ProjectWindowsRuntimeSetting.tsx index b6a140d6844..dd6b7c8b693 100644 --- a/src/renderer/src/components/settings/ProjectWindowsRuntimeSetting.tsx +++ b/src/renderer/src/components/settings/ProjectWindowsRuntimeSetting.tsx @@ -9,7 +9,7 @@ import { useState } from 'react' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select' import { Button } from '../ui/button' import { SettingsRow, SettingsSegmentedControl } from './SettingsFormControls' -import type { ProjectRuntimeSessionSummary } from './repository-runtime-session-summary' +import type { ProjectRuntimeSessionSummary } from './repository/execution/repository-runtime-session-summary' import { translate } from '@/i18n/i18n' import { projectRuntimeRepairSentence } from '../../../../shared/project-runtime-repair-message' diff --git a/src/renderer/src/components/settings/RepositoryPane.tsx b/src/renderer/src/components/settings/RepositoryPane.tsx index f17ebb1a2f4..ec635221380 100644 --- a/src/renderer/src/components/settings/RepositoryPane.tsx +++ b/src/renderer/src/components/settings/RepositoryPane.tsx @@ -8,7 +8,7 @@ import { getRepoExecutionHostId, type ExecutionHostId } from '../../../../shared import { Label } from '../ui/label' import { Separator } from '../ui/separator' import { useShallow } from 'zustand/react/shallow' -import { RepositoryHooksSection } from './RepositoryHooksSection' +import { RepositoryHooksSection } from './repository/execution/RepositoryHooksSection' import { McpConfigSection } from './McpConfigSection' import { WorktreeSymlinksSection } from './WorktreeSymlinksSection' import { SparsePresetSettingsSection } from './SparsePresetSettingsSection' @@ -21,16 +21,16 @@ import { useAppStore } from '@/store/index' import { getRepositoryIconSectionId } from './repository-settings-targets' import { RepositoryIconPicker } from './repository/identity/RepositoryIconPicker' import { getRepositoryPaneSearchEntries } from './repository-search' -import { RepositoryHostSetupsSection } from './RepositoryHostSetupsSection' +import { RepositoryHostSetupsSection } from './repository/execution/RepositoryHostSetupsSection' import { RepoSettingsDraftInput } from './repository/RepositorySettingsDraftInput' import { RepositoryForkSyncSection } from './repository/identity/RepositoryForkSyncSection' import { RepositoryGitHubAccountSection } from './RepositoryGitHubAccountSection' import { translate } from '@/i18n/i18n' -import { RepositoryWindowsRuntimeSection } from './RepositoryWindowsRuntimeSection' +import { RepositoryWindowsRuntimeSection } from './repository/execution/RepositoryWindowsRuntimeSection' import { matchesRepositoryIdentitySearch } from './repository/identity/repository-identity-search' import { RepositoryWorktreeDefaultsSection } from './repository/execution/RepositoryWorktreeDefaultsSection' import { RepositoryJiraProjectSection } from './repository/RepositoryJiraProjectSection' -import { getProjectRuntimeSessionSummary } from './repository-runtime-session-summary' +import { getProjectRuntimeSessionSummary } from './repository/execution/repository-runtime-session-summary' import { getRepoOwnerWorktreeVisibilityDefaults } from '../../store/worktree-visibility-defaults-by-host' export { getRepositoryPaneSearchEntries } diff --git a/src/renderer/src/components/settings/repository-search.ts b/src/renderer/src/components/settings/repository-search.ts index ae7112e2edf..6210c6ca448 100644 --- a/src/renderer/src/components/settings/repository-search.ts +++ b/src/renderer/src/components/settings/repository-search.ts @@ -5,8 +5,8 @@ import type { SettingsSearchEntry } from './settings-search' import { translate } from '@/i18n/i18n' import { translateSearchKeyword } from './settings-search-keywords' import { getRepositoryGitAuthorSearchEntries } from './repository-git-author-search-entries' -import { getRepositoryGitHooksSearchEntries } from './repository-git-hooks-search-entries' -import { getRepositoryGitWorktreeSearchEntries } from './repository-git-worktree-search-entries' +import { getRepositoryGitHooksSearchEntries } from './repository/execution/repository-git-hooks-search-entries' +import { getRepositoryGitWorktreeSearchEntries } from './repository/execution/repository-git-worktree-search-entries' type RepositoryPaneSearchOptions = { isLocalWindowsProject?: boolean diff --git a/src/renderer/src/components/settings/RepositoryHookPolicySettings.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHookPolicySettings.tsx similarity index 98% rename from src/renderer/src/components/settings/RepositoryHookPolicySettings.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHookPolicySettings.tsx index e062f43c997..8cb888d800c 100644 --- a/src/renderer/src/components/settings/RepositoryHookPolicySettings.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHookPolicySettings.tsx @@ -4,11 +4,11 @@ import type { OrcaHooks, SetupAgentStartupPolicy, SetupRunPolicy -} from '../../../../shared/orca-yaml-hook-types' +} from '../../../../../../shared/orca-yaml-hook-types' import { Trans } from 'react-i18next' import { i18n, translate } from '@/i18n/i18n' -import { matchesSettingsSearch } from './settings-search' -import { SettingsSwitch } from './SettingsFormControls' +import { matchesSettingsSearch } from '../../settings-search' +import { SettingsSwitch } from '../../SettingsFormControls' import { RepositoryHooksYamlStatus } from './RepositoryHooksYamlStatus' type PolicyOption = { policy: Policy; label: string; description: string } diff --git a/src/renderer/src/components/settings/RepositoryHookScriptSetting.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHookScriptSetting.tsx similarity index 99% rename from src/renderer/src/components/settings/RepositoryHookScriptSetting.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHookScriptSetting.tsx index c6457140ffa..418297b3d1e 100644 --- a/src/renderer/src/components/settings/RepositoryHookScriptSetting.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHookScriptSetting.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react' import { AlertTriangle, Plus } from 'lucide-react' -import { Button } from '../ui/button' -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' +import { Button } from '../../../ui/button' +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../../ui/tooltip' import { translate } from '@/i18n/i18n' import { getRepositoryHookScriptTextareaRows } from '@/lib/script-textarea-rows' import type { diff --git a/src/renderer/src/components/settings/RepositoryHooksSection.test.ts b/src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.test.ts similarity index 95% rename from src/renderer/src/components/settings/RepositoryHooksSection.test.ts rename to src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.test.ts index 83902cdebf1..c8c6a8b0106 100644 --- a/src/renderer/src/components/settings/RepositoryHooksSection.test.ts +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.test.ts @@ -3,11 +3,12 @@ import React, { act } from 'react' import { createRoot, type Root } from 'react-dom/client' import { afterEach, describe, expect, it, vi } from 'vitest' -import type { Repo } from '../../../../shared/repo-types' +import type { Repo } from '../../../../../../shared/repo-types' import { readRuntimeIssueCommand } from '@/runtime/runtime-hooks-client' -import { getLocalCommandSourcePolicyNotice, RepositoryHooksSection } from './RepositoryHooksSection' +import { getLocalCommandSourcePolicyNotice } from './repository-hook-settings-draft' +import { RepositoryHooksSection } from './RepositoryHooksSection' -vi.mock('@/store', () => ({ +vi.mock('@/store/index', () => ({ useAppStore: (selector: (state: unknown) => unknown) => selector({ settings: {}, diff --git a/src/renderer/src/components/settings/RepositoryHooksSection.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.tsx similarity index 91% rename from src/renderer/src/components/settings/RepositoryHooksSection.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.tsx index 4a1b13fcb6a..1159f7ce524 100644 --- a/src/renderer/src/components/settings/RepositoryHooksSection.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHooksSection.tsx @@ -6,18 +6,17 @@ import type { RepoHookSettings, SetupAgentStartupPolicy, SetupRunPolicy -} from '../../../../shared/orca-yaml-hook-types' -import type { Repo } from '../../../../shared/repo-types' -import { getRepoExecutionHostId } from '../../../../shared/execution-host' -import { resolveHookCommandSourcePolicy } from '../../../../shared/hook-command-source-policy' -import { useAppStore } from '@/store' +} from '../../../../../../shared/orca-yaml-hook-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { getRepoExecutionHostId } from '../../../../../../shared/execution-host' +import { resolveHookCommandSourcePolicy } from '../../../../../../shared/hook-command-source-policy' +import { useAppStore } from '@/store/index' import { translate } from '@/i18n/i18n' -import { SearchableSetting } from './SearchableSetting' -import { getRepositoryLocalCommandsSectionId } from './repository-settings-targets' +import { SearchableSetting } from '../../SearchableSetting' +import { getRepositoryLocalCommandsSectionId } from '../../repository-settings-targets' import { getLocalHookFields, - getLocalCommandSourcePolicyNotice, - type LocalCommandSourcePolicyNotice + getLocalCommandSourcePolicyNotice } from './repository-hook-settings-draft' import { LocalCommandSourceNotice, @@ -28,11 +27,8 @@ import { RepositorySetupPolicySetting } from './RepositoryHookPolicySettings' import { RepositoryIssueCommandSetting } from './RepositoryIssueCommandSetting' -import { useRepositoryHookSettingsDraft } from './use-repository-hook-settings-draft' -import { useRepositoryIssueCommand } from './use-repository-issue-command' - -export { getLocalCommandSourcePolicyNotice } -export type { LocalCommandSourcePolicyNotice } +import { useRepositoryHookSettingsDraft } from '../../use-repository-hook-settings-draft' +import { useRepositoryIssueCommand } from '../../use-repository-issue-command' type RepositoryHooksSectionProps = { repo: Repo diff --git a/src/renderer/src/components/settings/RepositoryHooksYamlStatus.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHooksYamlStatus.tsx similarity index 98% rename from src/renderer/src/components/settings/RepositoryHooksYamlStatus.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHooksYamlStatus.tsx index a2e8fe7581b..92faf917190 100644 --- a/src/renderer/src/components/settings/RepositoryHooksYamlStatus.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHooksYamlStatus.tsx @@ -1,6 +1,6 @@ import { AlertTriangle } from 'lucide-react' -import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types' -import { Button } from '../ui/button' +import type { OrcaHooks } from '../../../../../../shared/orca-yaml-hook-types' +import { Button } from '../../../ui/button' import { translate } from '@/i18n/i18n' import { renderYamlScriptPreview } from './repository-hook-settings-draft' diff --git a/src/renderer/src/components/settings/RepositoryHostSetupActions.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupActions.tsx similarity index 97% rename from src/renderer/src/components/settings/RepositoryHostSetupActions.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHostSetupActions.tsx index f035ad60bb3..3049e477b8f 100644 --- a/src/renderer/src/components/settings/RepositoryHostSetupActions.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupActions.tsx @@ -1,15 +1,15 @@ import { useState } from 'react' import { Plus, X } from 'lucide-react' -import type { ExecutionHostId } from '../../../../shared/execution-host' +import type { ExecutionHostId } from '../../../../../../shared/execution-host' import type { ProjectHostSetup, ProjectHostSetupCreateResult, ProjectHostSetupResult -} from '../../../../shared/project-types' +} from '../../../../../../shared/project-types' import { translate } from '@/i18n/i18n' -import { Button } from '../ui/button' -import { Label } from '../ui/label' -import { HostCombobox } from '../host-picker/HostCombobox' +import { Button } from '../../../ui/button' +import { Label } from '../../../ui/label' +import { HostCombobox } from '../../../host-picker/HostCombobox' import type { SetupHostOption } from './repository-host-setup-options' import { HostSetupCloneStep, diff --git a/src/renderer/src/components/settings/RepositoryHostSetupsSection.settings-entry.test.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.settings-entry.test.tsx similarity index 94% rename from src/renderer/src/components/settings/RepositoryHostSetupsSection.settings-entry.test.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.settings-entry.test.tsx index 5fdaf6cf09e..4cbc334afd4 100644 --- a/src/renderer/src/components/settings/RepositoryHostSetupsSection.settings-entry.test.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.settings-entry.test.tsx @@ -3,10 +3,10 @@ import React, { act } from 'react' import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { toSshExecutionHostId } from '../../../../shared/execution-host' -import type { ProjectHostSetup } from '../../../../shared/project-types' -import type { Repo } from '../../../../shared/repo-types' -import { useAppStore } from '../../store' +import { toSshExecutionHostId } from '../../../../../../shared/execution-host' +import type { ProjectHostSetup } from '../../../../../../shared/project-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { useAppStore } from '../../../../store/index' import { RepositoryHostSetupsSection } from './RepositoryHostSetupsSection' let container: HTMLDivElement diff --git a/src/renderer/src/components/settings/RepositoryHostSetupsSection.test.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.test.tsx similarity index 98% rename from src/renderer/src/components/settings/RepositoryHostSetupsSection.test.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.test.tsx index d8ea235b852..4e837075dd7 100644 --- a/src/renderer/src/components/settings/RepositoryHostSetupsSection.test.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.test.tsx @@ -3,15 +3,18 @@ import React, { act } from 'react' import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { getExecutionHostLabel, toSshExecutionHostId } from '../../../../shared/execution-host' +import { + getExecutionHostLabel, + toSshExecutionHostId +} from '../../../../../../shared/execution-host' import { PROJECT_HOST_SETUP_RUNTIME_CAPABILITY, - RUNTIME_PROTOCOL_VERSION, WORKSPACE_RUN_CONTEXT_RUNTIME_CAPABILITY -} from '../../../../shared/protocol-version' -import type { Project, ProjectHostSetup } from '../../../../shared/project-types' -import type { Repo } from '../../../../shared/repo-types' -import { useAppStore } from '../../store' +} from '../../../../../../shared/worktree-runtime-capabilities' +import { RUNTIME_PROTOCOL_VERSION } from '../../../../../../shared/protocol-version' +import type { Project, ProjectHostSetup } from '../../../../../../shared/project-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { useAppStore } from '../../../../store/index' import { RepositoryHostSetupsSection } from './RepositoryHostSetupsSection' let container: HTMLDivElement diff --git a/src/renderer/src/components/settings/RepositoryHostSetupsSection.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.tsx similarity index 94% rename from src/renderer/src/components/settings/RepositoryHostSetupsSection.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.tsx index d00508656db..bbc5da2d1bd 100644 --- a/src/renderer/src/components/settings/RepositoryHostSetupsSection.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.tsx @@ -4,28 +4,28 @@ import { parseExecutionHostId, toRuntimeExecutionHostId, type ExecutionHostId -} from '../../../../shared/execution-host' -import { buildExecutionHostRegistry } from '../../../../shared/execution-host-registry' -import { getHostDisplayLabelOverrides } from '../../../../shared/host-setting-overrides' -import type { ProjectHostSetup } from '../../../../shared/project-types' -import type { Repo } from '../../../../shared/repo-types' -import { useAppStore } from '../../store' -import { getProjectHostSetupProjectionFromState } from '../../store/selectors' -import { cn } from '../../lib/utils' -import { Button } from '../ui/button' -import { Label } from '../ui/label' -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select' -import { SearchableSetting } from './SearchableSetting' -import { SettingsBadge } from './SettingsFormControls' -import { matchesSettingsSearch } from './settings-search' -import type { SettingsSearchEntry } from './settings-search' +} from '../../../../../../shared/execution-host' +import { buildExecutionHostRegistry } from '../../../../../../shared/execution-host-registry' +import { getHostDisplayLabelOverrides } from '../../../../../../shared/host-setting-overrides' +import type { ProjectHostSetup } from '../../../../../../shared/project-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { useAppStore } from '../../../../store/index' +import { getProjectHostSetupProjectionFromState } from '../../../../store/project-host-setup-selector' +import { cn } from '../../../../lib/utils' +import { Button } from '../../../ui/button' +import { Label } from '../../../ui/label' +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../../ui/select' +import { SearchableSetting } from '../../SearchableSetting' +import { SettingsBadge } from '../../SettingsFormControls' +import { matchesSettingsSearch } from '../../settings-search' +import type { SettingsSearchEntry } from '../../settings-search' import { translate } from '@/i18n/i18n' import { buildSetupHostOptions, getSetupStateLabel } from './repository-host-setup-options' import { RepositoryHostSetupActions } from './RepositoryHostSetupActions' import { selectRuntimeAwareSshStatus, selectRuntimeAwareSshTargetLabel -} from '@/store/slices/runtime-environment-ssh' +} from '@/store/slices/runtime-environment-ssh-selectors' import { isConnectedRuntimeHostState, runtimeHostConnectionStateForEntry diff --git a/src/renderer/src/components/settings/RepositoryHostSetupsSection.workspace-window.test.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.workspace-window.test.tsx similarity index 92% rename from src/renderer/src/components/settings/RepositoryHostSetupsSection.workspace-window.test.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.workspace-window.test.tsx index dee1b0e3a35..144f3f433a7 100644 --- a/src/renderer/src/components/settings/RepositoryHostSetupsSection.workspace-window.test.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryHostSetupsSection.workspace-window.test.tsx @@ -5,13 +5,13 @@ import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it } from 'vitest' import { PROJECT_HOST_SETUP_RUNTIME_CAPABILITY, - RUNTIME_PROTOCOL_VERSION, WORKSPACE_RUN_CONTEXT_RUNTIME_CAPABILITY -} from '../../../../shared/protocol-version' -import type { RuntimeStatus } from '../../../../shared/runtime-types' -import type { Project, ProjectHostSetup } from '../../../../shared/project-types' -import type { Repo } from '../../../../shared/repo-types' -import { useAppStore } from '../../store' +} from '../../../../../../shared/worktree-runtime-capabilities' +import { RUNTIME_PROTOCOL_VERSION } from '../../../../../../shared/protocol-version' +import type { RuntimeStatus } from '../../../../../../shared/runtime-session-contracts' +import type { Project, ProjectHostSetup } from '../../../../../../shared/project-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { useAppStore } from '../../../../store/index' import { RepositoryHostSetupsSection } from './RepositoryHostSetupsSection' let container: HTMLDivElement diff --git a/src/renderer/src/components/settings/RepositoryIssueCommandSetting.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryIssueCommandSetting.tsx similarity index 100% rename from src/renderer/src/components/settings/RepositoryIssueCommandSetting.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryIssueCommandSetting.tsx diff --git a/src/renderer/src/components/settings/RepositoryWindowsRuntimeSection.tsx b/src/renderer/src/components/settings/repository/execution/RepositoryWindowsRuntimeSection.tsx similarity index 82% rename from src/renderer/src/components/settings/RepositoryWindowsRuntimeSection.tsx rename to src/renderer/src/components/settings/repository/execution/RepositoryWindowsRuntimeSection.tsx index 7c5743c196b..f6f7b520980 100644 --- a/src/renderer/src/components/settings/RepositoryWindowsRuntimeSection.tsx +++ b/src/renderer/src/components/settings/repository/execution/RepositoryWindowsRuntimeSection.tsx @@ -1,9 +1,9 @@ -import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { Project, ProjectUpdateArgs } from '../../../../shared/project-types' -import { SearchableSetting } from './SearchableSetting' -import type { SettingsSearchEntry } from './settings-search' -import { matchesSettingsSearch } from './settings-search' -import { ProjectWindowsRuntimeSetting } from './ProjectWindowsRuntimeSetting' +import type { GlobalSettings } from '../../../../../../shared/global-settings-types' +import type { Project, ProjectUpdateArgs } from '../../../../../../shared/project-types' +import { SearchableSetting } from '../../SearchableSetting' +import type { SettingsSearchEntry } from '../../settings-search' +import { matchesSettingsSearch } from '../../settings-search' +import { ProjectWindowsRuntimeSetting } from '../../ProjectWindowsRuntimeSetting' import type { ProjectRuntimeSessionSummary } from './repository-runtime-session-summary' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/settings/repository-description-templates.test.tsx b/src/renderer/src/components/settings/repository/execution/repository-description-templates.test.tsx similarity index 100% rename from src/renderer/src/components/settings/repository-description-templates.test.tsx rename to src/renderer/src/components/settings/repository/execution/repository-description-templates.test.tsx diff --git a/src/renderer/src/components/settings/repository-git-hooks-search-entries.ts b/src/renderer/src/components/settings/repository/execution/repository-git-hooks-search-entries.ts similarity index 96% rename from src/renderer/src/components/settings/repository-git-hooks-search-entries.ts rename to src/renderer/src/components/settings/repository/execution/repository-git-hooks-search-entries.ts index 281622b66db..89a9f2cad59 100644 --- a/src/renderer/src/components/settings/repository-git-hooks-search-entries.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-git-hooks-search-entries.ts @@ -1,7 +1,7 @@ -import type { Repo } from '../../../../shared/repo-types' -import type { SettingsSearchEntry } from './settings-search' +import type { Repo } from '../../../../../../shared/repo-types' +import type { SettingsSearchEntry } from '../../settings-search' import { translate } from '@/i18n/i18n' -import { translateSearchKeyword } from './settings-search-keywords' +import { translateSearchKeyword } from '../../settings-search-keywords' export function getRepositoryGitHooksSearchEntries(repo: Repo): SettingsSearchEntry[] { return [ diff --git a/src/renderer/src/components/settings/repository-git-worktree-search-entries.ts b/src/renderer/src/components/settings/repository/execution/repository-git-worktree-search-entries.ts similarity index 96% rename from src/renderer/src/components/settings/repository-git-worktree-search-entries.ts rename to src/renderer/src/components/settings/repository/execution/repository-git-worktree-search-entries.ts index c3a7c5b5b3a..5dc70be13ec 100644 --- a/src/renderer/src/components/settings/repository-git-worktree-search-entries.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-git-worktree-search-entries.ts @@ -1,7 +1,7 @@ -import type { Repo } from '../../../../shared/repo-types' -import type { SettingsSearchEntry } from './settings-search' +import type { Repo } from '../../../../../../shared/repo-types' +import type { SettingsSearchEntry } from '../../settings-search' import { translate } from '@/i18n/i18n' -import { translateSearchKeyword } from './settings-search-keywords' +import { translateSearchKeyword } from '../../settings-search-keywords' export function getRepositoryGitWorktreeSearchEntries(repo: Repo): SettingsSearchEntry[] { return [ diff --git a/src/renderer/src/components/settings/repository-hook-settings-draft.test.ts b/src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.test.ts similarity index 100% rename from src/renderer/src/components/settings/repository-hook-settings-draft.test.ts rename to src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.test.ts diff --git a/src/renderer/src/components/settings/repository-hook-settings-draft.ts b/src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.ts similarity index 95% rename from src/renderer/src/components/settings/repository-hook-settings-draft.ts rename to src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.ts index 8ddde70e95f..868beaab524 100644 --- a/src/renderer/src/components/settings/repository-hook-settings-draft.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-hook-settings-draft.ts @@ -2,9 +2,9 @@ import type { HookCommandSourcePolicy, OrcaHooks, RepoHookSettings -} from '../../../../shared/orca-yaml-hook-types' -import type { Repo } from '../../../../shared/repo-types' -import { DEFAULT_REPO_HOOK_SETTINGS } from './SettingsConstants' +} from '../../../../../../shared/orca-yaml-hook-types' +import type { Repo } from '../../../../../../shared/repo-types' +import { DEFAULT_REPO_HOOK_SETTINGS } from '../../SettingsConstants' import { translate } from '@/i18n/i18n' export type LocalHookName = 'setup' | 'archive' diff --git a/src/renderer/src/components/settings/repository-host-add-project-steps.tsx b/src/renderer/src/components/settings/repository/execution/repository-host-add-project-steps.tsx similarity index 98% rename from src/renderer/src/components/settings/repository-host-add-project-steps.tsx rename to src/renderer/src/components/settings/repository/execution/repository-host-add-project-steps.tsx index 7a26255fc22..0c8c619516f 100644 --- a/src/renderer/src/components/settings/repository-host-add-project-steps.tsx +++ b/src/renderer/src/components/settings/repository/execution/repository-host-add-project-steps.tsx @@ -2,9 +2,9 @@ import type { ComponentType } from 'react' import { ArrowLeft, Download, FolderOpen, Plus } from 'lucide-react' import { translate } from '@/i18n/i18n' import { cn } from '@/lib/utils' -import { Button } from '../ui/button' -import { Input } from '../ui/input' -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select' +import { Button } from '../../../ui/button' +import { Input } from '../../../ui/input' +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../../ui/select' export function HostSetupStartActions({ pathActionsDisabled, diff --git a/src/renderer/src/components/settings/repository-host-setup-options.test.ts b/src/renderer/src/components/settings/repository/execution/repository-host-setup-options.test.ts similarity index 94% rename from src/renderer/src/components/settings/repository-host-setup-options.test.ts rename to src/renderer/src/components/settings/repository/execution/repository-host-setup-options.test.ts index 6ec07deca58..8f3d74a01c9 100644 --- a/src/renderer/src/components/settings/repository-host-setup-options.test.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-host-setup-options.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it, vi } from 'vitest' -import type { ExecutionHostRegistryEntry } from '../../../../shared/execution-host-registry' +import type { ExecutionHostRegistryEntry } from '../../../../../../shared/execution-host-registry' import { PROJECT_HOST_SETUP_RUNTIME_CAPABILITY, WORKSPACE_RUN_CONTEXT_RUNTIME_CAPABILITY -} from '../../../../shared/protocol-version' +} from '../../../../../../shared/worktree-runtime-capabilities' import { buildSetupHostOptions } from './repository-host-setup-options' vi.mock('@/i18n/i18n', () => ({ diff --git a/src/renderer/src/components/settings/repository-host-setup-options.ts b/src/renderer/src/components/settings/repository/execution/repository-host-setup-options.ts similarity index 85% rename from src/renderer/src/components/settings/repository-host-setup-options.ts rename to src/renderer/src/components/settings/repository/execution/repository-host-setup-options.ts index 6b211096338..4bb220001fa 100644 --- a/src/renderer/src/components/settings/repository-host-setup-options.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-host-setup-options.ts @@ -1,9 +1,15 @@ -import { getExecutionHostLabel, type ExecutionHostId } from '../../../../shared/execution-host' -import type { ExecutionHostRegistryEntry } from '../../../../shared/execution-host-registry' -import type { ProjectHostSetup, ProjectHostSetupState } from '../../../../shared/project-types' +import { + getExecutionHostLabel, + type ExecutionHostId +} from '../../../../../../shared/execution-host' +import type { ExecutionHostRegistryEntry } from '../../../../../../shared/execution-host-registry' +import type { + ProjectHostSetup, + ProjectHostSetupState +} from '../../../../../../shared/project-types' import { translate } from '@/i18n/i18n' import { getHostSetupUnavailableDetail } from '@/lib/project-host-setup-options' -import { pickerExecutionHosts } from '../../../../shared/managed-orcad-execution-host' +import { pickerExecutionHosts } from '../../../../../../shared/managed-orcad-execution-host' export type SetupHostOption = { id: ExecutionHostId diff --git a/src/renderer/src/components/settings/repository-runtime-session-summary.ts b/src/renderer/src/components/settings/repository/execution/repository-runtime-session-summary.ts similarity index 93% rename from src/renderer/src/components/settings/repository-runtime-session-summary.ts rename to src/renderer/src/components/settings/repository/execution/repository-runtime-session-summary.ts index 62bfd7053e8..6fdb66f01d1 100644 --- a/src/renderer/src/components/settings/repository-runtime-session-summary.ts +++ b/src/renderer/src/components/settings/repository/execution/repository-runtime-session-summary.ts @@ -1,6 +1,6 @@ -import type { AppState } from '../../store/types' -import { getRepoIdFromWorktreeId } from '../../../../shared/worktree/id' -import { getTabIdToWorktreeId } from '../sidebar/worktree-agent-row-selectors' +import type { AppState } from '../../../../store/types' +import { getRepoIdFromWorktreeId } from '../../../../../../shared/worktree/id' +import { getTabIdToWorktreeId } from '../../../sidebar/worktree-agent-row-selectors' export type ProjectRuntimeSessionSummary = { liveTerminalCount: number diff --git a/src/renderer/src/components/settings/use-repository-hook-settings-draft.ts b/src/renderer/src/components/settings/use-repository-hook-settings-draft.ts index ff27679f85b..df84d00c0c6 100644 --- a/src/renderer/src/components/settings/use-repository-hook-settings-draft.ts +++ b/src/renderer/src/components/settings/use-repository-hook-settings-draft.ts @@ -6,7 +6,7 @@ import { getHookSettingsDraft, type HookSettingsPolicyDraft, type LocalHookName -} from './repository-hook-settings-draft' +} from './repository/execution/repository-hook-settings-draft' export function useRepositoryHookSettingsDraft({ repo, diff --git a/src/renderer/src/store/always-mounted-selector-scan-cost.test.ts b/src/renderer/src/store/always-mounted-selector-scan-cost.test.ts index 60c85be7728..e1a2dd44d45 100644 --- a/src/renderer/src/store/always-mounted-selector-scan-cost.test.ts +++ b/src/renderer/src/store/always-mounted-selector-scan-cost.test.ts @@ -10,7 +10,7 @@ import type { TerminalTab } from '../../../shared/terminal-tab-types' import type { Worktree } from '../../../shared/worktree/types' import { WORKTREE_ID_SEPARATOR } from '../../../shared/worktree/id' import { getLocalPreflightContext } from '../lib/local-preflight-context' -import { getProjectRuntimeSessionSummary } from '../components/settings/repository-runtime-session-summary' +import { getProjectRuntimeSessionSummary } from '../components/settings/repository/execution/repository-runtime-session-summary' import type { AppState } from './types' import { selectRepoByIdForActiveWorkspace } from './selectors'