diff --git a/src/main/orcad/orcad-launch-contract.test.ts b/src/main/orcad/orcad-launch-contract.test.ts index 09241e5372e..328211445ee 100644 --- a/src/main/orcad/orcad-launch-contract.test.ts +++ b/src/main/orcad/orcad-launch-contract.test.ts @@ -6,7 +6,7 @@ import { mkdtemp, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import { describe, expect, it, vi } from 'vitest' -import { parseArgs } from './orcad-entry' +import { parseArgs } from './orcad-command-arguments' import { ORCAD_EXIT_CONFIGURATION } from './orcad-configuration-exit' import { ORCAD_EXIT_FAILED, resolveOrcadExitCode } from './orcad-exit-code' import { startOrcadWithLifecycle } from './orcad-lifecycle' diff --git a/src/main/orcad/orcad-push-startup.test.ts b/src/main/orcad/orcad-push-startup.test.ts index 20f905a9a37..0b2e252773f 100644 --- a/src/main/orcad/orcad-push-startup.test.ts +++ b/src/main/orcad/orcad-push-startup.test.ts @@ -194,8 +194,10 @@ afterEach(() => { it('refuses recovery overlap before initializing the browser provider or runtime', async () => { state.root = mkdtempSync(join(tmpdir(), 'orca-headless-recovery-')) const maintenance = acquireProfileStateMaintenance(state.root) - const { startOrcad } = await import('./orcad-entry') + const { startOrcad, parseArgs } = await import('./orcad-entry') + const commandArguments = await import('./orcad-command-arguments') try { + expect(parseArgs).toBe(commandArguments.parseArgs) await expect(startOrcad({ noPairing: true, json: true })).rejects.toThrow() expect(state.browserProvider).not.toHaveBeenCalled() expect(state.rpcStarted).toBe(false) diff --git a/src/main/persistence/profile-state/profile-state-startup-failure.test.ts b/src/main/persistence/profile-state/profile-state-startup-failure.test.ts index e82ee6ba56f..e33b4b5148d 100644 --- a/src/main/persistence/profile-state/profile-state-startup-failure.test.ts +++ b/src/main/persistence/profile-state/profile-state-startup-failure.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { ProfileStateAuthorityBootstrapError, ProfileStateRecoveryRequiredError -} from './profile-state-authority-bootstrap' +} from './profile-state-recovery-required' import { formatProfileStateStartupFailure, profileStateStartupFailureClass diff --git a/src/main/runtime/rpc/methods/orchestration/gates/gate-run-authorization.test.ts b/src/main/runtime/rpc/methods/orchestration/gates/gate-run-authorization.test.ts index 6093f3eba49..2ed43d5d677 100644 --- a/src/main/runtime/rpc/methods/orchestration/gates/gate-run-authorization.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/gates/gate-run-authorization.test.ts @@ -1,3 +1,4 @@ +import '../../../unused-default-rpc-methods.test-fixture' import { afterEach, describe, expect, it } from 'vitest' import { cleanupLegacyCompatibilityDispatcherHarnesses, diff --git a/src/main/runtime/rpc/orchestration-11745-regression-verification.test.ts b/src/main/runtime/rpc/orchestration-11745-regression-verification.test.ts index 7a644cc9def..cd2899deb88 100644 --- a/src/main/runtime/rpc/orchestration-11745-regression-verification.test.ts +++ b/src/main/runtime/rpc/orchestration-11745-regression-verification.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' // Why: independent adversarial verification of every #11745 fix. Each case reproduces the ORIGINAL // defect and asserts it is closed by observing state, not just the response envelope — a refusal // that still mutated the graph is a failure, and so is a fix that fences a legitimate coordinator. diff --git a/src/main/runtime/rpc/orchestration-caller-show.test.ts b/src/main/runtime/rpc/orchestration-caller-show.test.ts index 051123fa0b7..b038200e04a 100644 --- a/src/main/runtime/rpc/orchestration-caller-show.test.ts +++ b/src/main/runtime/rpc/orchestration-caller-show.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { ORCHESTRATION_SESSION_CALLER_ERROR_CODES as CODES } from '../../../shared/orchestration-session-caller-codes' import { diff --git a/src/main/runtime/rpc/orchestration-current-authority-precedence.test.ts b/src/main/runtime/rpc/orchestration-current-authority-precedence.test.ts index d13a823ba46..17664f10b8e 100644 --- a/src/main/runtime/rpc/orchestration-current-authority-precedence.test.ts +++ b/src/main/runtime/rpc/orchestration-current-authority-precedence.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, describe, expect, it } from 'vitest' import { cleanupLegacyCompatibilityDispatcherHarnesses, diff --git a/src/main/runtime/rpc/orchestration-legacy-fence-jurisdiction.test.ts b/src/main/runtime/rpc/orchestration-legacy-fence-jurisdiction.test.ts index d04c24dbbd1..14938e63c63 100644 --- a/src/main/runtime/rpc/orchestration-legacy-fence-jurisdiction.test.ts +++ b/src/main/runtime/rpc/orchestration-legacy-fence-jurisdiction.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, describe, expect, it } from 'vitest' import type { OrchestrationCompatibilityEvidence } from '../../../shared/orchestration-compatibility-evidence' import { diff --git a/src/main/runtime/rpc/orchestration-legacy-run-routing.test.ts b/src/main/runtime/rpc/orchestration-legacy-run-routing.test.ts index 49e2b78d6ae..f6ff659c7a0 100644 --- a/src/main/runtime/rpc/orchestration-legacy-run-routing.test.ts +++ b/src/main/runtime/rpc/orchestration-legacy-run-routing.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, describe, expect, it } from 'vitest' import { cleanupLegacyCompatibilityDispatcherHarnesses, diff --git a/src/main/runtime/rpc/orchestration-legacy-session-address-migration.test.ts b/src/main/runtime/rpc/orchestration-legacy-session-address-migration.test.ts index 5239415ee96..27c8bd29c28 100644 --- a/src/main/runtime/rpc/orchestration-legacy-session-address-migration.test.ts +++ b/src/main/runtime/rpc/orchestration-legacy-session-address-migration.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { OrchestrationDb } from '../orchestration/db' import { migrateV43 } from '../orchestration/db/schema/migrate-v43' diff --git a/src/main/runtime/rpc/orchestration-party-addressing.test.ts b/src/main/runtime/rpc/orchestration-party-addressing.test.ts index e7ac814bf03..e071ec04fd5 100644 --- a/src/main/runtime/rpc/orchestration-party-addressing.test.ts +++ b/src/main/runtime/rpc/orchestration-party-addressing.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { formatOrcaSessionAddress } from '../../../shared/orca-session-address' import { testOrcaSessionId } from '../../../shared/orca-session-address-test-fixture' diff --git a/src/main/runtime/rpc/orchestration-party-agreement.test.ts b/src/main/runtime/rpc/orchestration-party-agreement.test.ts index b0e0d302474..04097d4cd17 100644 --- a/src/main/runtime/rpc/orchestration-party-agreement.test.ts +++ b/src/main/runtime/rpc/orchestration-party-agreement.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { formatOrcaSessionAddress, type OrcaSessionId } from '../../../shared/orca-session-address' import { testOrcaSessionId } from '../../../shared/orca-session-address-test-fixture' diff --git a/src/main/runtime/rpc/orchestration-session-coordinator.test.ts b/src/main/runtime/rpc/orchestration-session-coordinator.test.ts index a60c3a16916..7ddd71f244e 100644 --- a/src/main/runtime/rpc/orchestration-session-coordinator.test.ts +++ b/src/main/runtime/rpc/orchestration-session-coordinator.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { mintStructuredWorkerHandle, diff --git a/src/main/runtime/rpc/orchestration-session-recipient.test.ts b/src/main/runtime/rpc/orchestration-session-recipient.test.ts index 415ff42ba32..5d675ce76c6 100644 --- a/src/main/runtime/rpc/orchestration-session-recipient.test.ts +++ b/src/main/runtime/rpc/orchestration-session-recipient.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { mintStructuredWorkerHandle, diff --git a/src/main/runtime/rpc/orchestration-session-run-binding.test.ts b/src/main/runtime/rpc/orchestration-session-run-binding.test.ts index 0f6b65d6571..54edde9a03c 100644 --- a/src/main/runtime/rpc/orchestration-session-run-binding.test.ts +++ b/src/main/runtime/rpc/orchestration-session-run-binding.test.ts @@ -1,3 +1,4 @@ +import './unused-default-rpc-methods.test-fixture' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { mintStructuredWorkerHandle, diff --git a/src/main/window/attach-main-window-services.test.ts b/src/main/window/attach-main-window-services.test.ts index 15844ea081a..acae6865f3f 100644 --- a/src/main/window/attach-main-window-services.test.ts +++ b/src/main/window/attach-main-window-services.test.ts @@ -156,7 +156,8 @@ vi.mock('../macos-tcc-prompt-notice', () => ({ releasePendingTccPromptNotice: releasePendingTccPromptNoticeMock })) -import { attachMainWindowServices } from './attach-main-window-services' +import { attachMainWindowServices, registerUpdaterHandlers } from './attach-main-window-services' +import { registerUpdaterHandlers as registerWindowUpdaterHandlers } from './main-window-updater' type MockFn = ReturnType @@ -198,6 +199,10 @@ async function fireReadyToShow(mainWindow: MainWindowStub): Promise { } describe('attachMainWindowServices', () => { + it('exports the updater handlers exercised by the recovery tests', () => { + expect(registerUpdaterHandlers).toBe(registerWindowUpdaterHandlers) + }) + afterEach(() => { cancelHistoryGc() }) diff --git a/src/main/window/updater-package-recovery-ipc.test.ts b/src/main/window/updater-package-recovery-ipc.test.ts index 6b6551092d8..878b40e0d49 100644 --- a/src/main/window/updater-package-recovery-ipc.test.ts +++ b/src/main/window/updater-package-recovery-ipc.test.ts @@ -67,7 +67,7 @@ vi.mock('../ipc/ui', async (importOriginal) => ({ isTrustedUIRenderer: (sender: unknown) => isTrustedUIRendererMock(sender) })) -import { registerUpdaterHandlers } from './attach-main-window-services' +import { registerUpdaterHandlers } from './main-window-updater' const RECOVERY_CHANNELS = [ 'updater:getLinuxPackageInstallInstructions', diff --git a/src/renderer/src/components/quick-open-file-list.react.test.tsx b/src/renderer/src/components/quick-open-file-list.react.test.tsx index a9f35d78ff2..1fa860ea9d7 100644 --- a/src/renderer/src/components/quick-open-file-list.react.test.tsx +++ b/src/renderer/src/components/quick-open-file-list.react.test.tsx @@ -5,7 +5,15 @@ import { folderWorkspaceKey } from '../../../shared/workspace-scope' import { QUICK_OPEN_LISTING_MAX_RESULTS } from '../../../shared/quick-open-listing-limits' import { useAppStore } from '@/store' import type { AppState } from '@/store/types' -import type { RuntimeFileListState } from './quick-open-file-list' +import { + getRuntimeFileListTarget, + getNestedWorktreeExcludeRequest, + getNestedWorktreeExcludePaths, + isNestedWorktreePath, + type RuntimeFileListState +} from './quick-open-file-list' +import * as fileListTarget from './quick-open-file-list-target' +import * as nestedWorktrees from './quick-open-nested-worktrees' import { QUICK_OPEN_REMOTE_QUERY_MAX_CODE_UNITS } from './quick-open-search' import { listRuntimeFilesMock, @@ -30,6 +38,13 @@ vi.mock('@/runtime/runtime-file-search-client', async () => { } }) +it('keeps the pure file list functions available through the hook module', () => { + expect(getRuntimeFileListTarget).toBe(fileListTarget.getRuntimeFileListTarget) + expect(getNestedWorktreeExcludeRequest).toBe(fileListTarget.getNestedWorktreeExcludeRequest) + expect(getNestedWorktreeExcludePaths).toBe(nestedWorktrees.getNestedWorktreeExcludePaths) + expect(isNestedWorktreePath).toBe(nestedWorktrees.isNestedWorktreePath) +}) + describe('useRuntimeFileListForWorktree', () => { it('settles a Windows folder listing failure and recovers after reopening', async () => { const workspaceKey = folderWorkspaceKey('folder-workspace-1') diff --git a/src/renderer/src/components/quick-open-file-list.test.ts b/src/renderer/src/components/quick-open-file-list.test.ts index be5370b4d8c..e2220704330 100644 --- a/src/renderer/src/components/quick-open-file-list.test.ts +++ b/src/renderer/src/components/quick-open-file-list.test.ts @@ -3,10 +3,9 @@ import type { Worktree } from '../../../shared/worktree/types' import { buildExcludePathPrefixes } from '../../../shared/quick-open-filter' import { getRuntimeFileListTarget, - getNestedWorktreeExcludePaths, - getNestedWorktreeExcludeRequest, - isNestedWorktreePath -} from './quick-open-file-list' + getNestedWorktreeExcludeRequest +} from './quick-open-file-list-target' +import { getNestedWorktreeExcludePaths, isNestedWorktreePath } from './quick-open-nested-worktrees' function makeWorktree(id: string, path: string): Worktree { return { diff --git a/src/renderer/src/components/sidebar/default-branch-folder-project-root.test.ts b/src/renderer/src/components/sidebar/default-branch-folder-project-root.test.ts index ad908fbbaab..12934a132d5 100644 --- a/src/renderer/src/components/sidebar/default-branch-folder-project-root.test.ts +++ b/src/renderer/src/components/sidebar/default-branch-folder-project-root.test.ts @@ -4,7 +4,7 @@ import type { Repo } from '../../../../shared/repo-types' import type { WorktreeLineage } from '../../../../shared/worktree/lineage-types' import type { Worktree } from '../../../../shared/worktree/types' import { isDefaultBranchWorkspace } from '../../../../shared/worktree/workspace-kinds' -import { computeVisibleWorktreeIds } from './visible-worktrees' +import { computeVisibleWorktreeIds } from './compute-visible-worktrees' function makeRepo(id: string, path: string, kind: Repo['kind']): Repo { return { id, path, displayName: id, badgeColor: '#000', addedAt: 0, kind } diff --git a/src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts b/src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts index 81292131307..714ba19dc1a 100644 --- a/src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts +++ b/src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { computeVisibleWorktreeIds } from './visible-worktrees' +import { computeVisibleWorktreeIds } from './compute-visible-worktrees' import { isDefaultBranchWorkspace } from '../../../../shared/worktree/workspace-kinds' import type { Repo } from '../../../../shared/repo-types' import type { Worktree } from '../../../../shared/worktree/types' diff --git a/src/renderer/src/components/sidebar/sidebar-filter-state.test.ts b/src/renderer/src/components/sidebar/sidebar-filter-state.test.ts index 5e998b1595d..cf93f91dc72 100644 --- a/src/renderer/src/components/sidebar/sidebar-filter-state.test.ts +++ b/src/renderer/src/components/sidebar/sidebar-filter-state.test.ts @@ -1,9 +1,6 @@ import { describe, expect, it } from 'vitest' -import { - computeClearFilterActions, - isSleepingSweepExemptionNarrowingList, - sidebarHasActiveFilters -} from './visible-worktrees' +import { computeClearFilterActions, sidebarHasActiveFilters } from './sidebar-filter-actions' +import { isSleepingSweepExemptionNarrowingList } from './visible-worktree-kinds' import { isDefaultBranchWorkspace } from '../../../../shared/worktree/workspace-kinds' import type { Worktree } from '../../../../shared/worktree/types' diff --git a/src/renderer/src/components/sidebar/visible-worktree-indexes.test.ts b/src/renderer/src/components/sidebar/visible-worktree-indexes.test.ts index bdfa65863a2..56c84e6eda0 100644 --- a/src/renderer/src/components/sidebar/visible-worktree-indexes.test.ts +++ b/src/renderer/src/components/sidebar/visible-worktree-indexes.test.ts @@ -21,8 +21,8 @@ vi.mock('../../../../shared/resolved-worktree-lineage', async (importOriginal) = } }) -import { computeVisibleWorktreeIds } from './visible-worktrees' -import type { computeVisibleWorktrees } from './visible-worktrees' +import { computeVisibleWorktreeIds } from './compute-visible-worktrees' +import type { computeVisibleWorktrees } from './compute-visible-worktrees' import { getCyclicProjectedWorktreeLineageIds } from './worktree-lineage-projection' import { getLineageAncestorIndex, getSortedWorktreeRankIndex } from './visible-worktree-indexes' diff --git a/src/renderer/src/components/sidebar/visible-worktrees-manual-lineage-order.test.ts b/src/renderer/src/components/sidebar/visible-worktrees-manual-lineage-order.test.ts index 743f4acc7be..d0cc5ad49b2 100644 --- a/src/renderer/src/components/sidebar/visible-worktrees-manual-lineage-order.test.ts +++ b/src/renderer/src/components/sidebar/visible-worktrees-manual-lineage-order.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import type { ExecutionHostId } from '../../../../shared/execution-host' import type { WorktreeLineage } from '../../../../shared/worktree/lineage-types' import { worktree, repoMap } from './worktree-list-groups-test-fixtures' -import { computeVisibleWorktrees, type VisibleWorktreeOptions } from './visible-worktrees' +import { computeVisibleWorktrees, type VisibleWorktreeOptions } from './compute-visible-worktrees' import { buildRows } from './worktree-list/grouping/build-rows' function scenario(hostId: ExecutionHostId) { diff --git a/src/renderer/src/components/sidebar/visible-worktrees.test.ts b/src/renderer/src/components/sidebar/visible-worktrees.test.ts index 7f1a723db74..5fd10c21251 100644 --- a/src/renderer/src/components/sidebar/visible-worktrees.test.ts +++ b/src/renderer/src/components/sidebar/visible-worktrees.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { computeVisibleWorktreeIds } from './visible-worktrees' +import { computeVisibleWorktreeIds } from './compute-visible-worktrees' import { getPairedDeviceIdsByEnvironment } from '../../../../shared/workspace-creator-visibility' import type { Repo } from '../../../../shared/repo-types' import type { TerminalTab } from '../../../../shared/terminal-tab-types' diff --git a/src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx b/src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx index 17f1d4d0756..3aa06572f81 100644 --- a/src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx +++ b/src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx @@ -8,6 +8,12 @@ import { getWorktreeHostIdentity } from '../../../../../../shared/worktree/host- import { makeRepo, makeWorktree } from '../../../worktree-jump-palette-test-fixtures' import { useVisibleSidebarWorktrees } from './use-visible-worktrees' import type * as visibleWorktreesModule from '../../visible-worktrees' +import { computeVisibleWorktreeIds, computeVisibleWorktrees } from '../../compute-visible-worktrees' +import { computeClearFilterActions, sidebarHasActiveFilters } from '../../sidebar-filter-actions' +import { + isSleepingSweepExemptWorkspace, + isSleepingSweepExemptionNarrowingList +} from '../../visible-worktree-kinds' const computeVisibleWorktreesCalls = { count: 0 } vi.mock('../../visible-worktrees', async (importOriginal) => { @@ -35,6 +41,16 @@ describe('useVisibleSidebarWorktrees', () => { useAppStore.setState(initialState, true) }) + it('keeps the pure filtering functions available through the sidebar module', async () => { + const facade = await vi.importActual('../../visible-worktrees') + expect(facade.computeVisibleWorktreeIds).toBe(computeVisibleWorktreeIds) + expect(facade.computeVisibleWorktrees).toBe(computeVisibleWorktrees) + expect(facade.computeClearFilterActions).toBe(computeClearFilterActions) + expect(facade.sidebarHasActiveFilters).toBe(sidebarHasActiveFilters) + expect(facade.isSleepingSweepExemptWorkspace).toBe(isSleepingSweepExemptWorkspace) + expect(facade.isSleepingSweepExemptionNarrowingList).toBe(isSleepingSweepExemptionNarrowingList) + }) + it('projects both host rows through the primary sidebar pipeline', () => { const local = makeWorktree('shared', 'Local workspace', { hostId: 'local' }) const ssh = makeWorktree('shared', 'SSH workspace', { hostId: 'ssh:box' }) diff --git a/src/renderer/src/components/tab-bar/tab-create-entry-action.test.ts b/src/renderer/src/components/tab-bar/tab-create-entry-action.test.ts index 221208bc655..8c3df5adaac 100644 --- a/src/renderer/src/components/tab-bar/tab-create-entry-action.test.ts +++ b/src/renderer/src/components/tab-bar/tab-create-entry-action.test.ts @@ -1,12 +1,27 @@ import { describe, expect, it, vi } from 'vitest' import { + classifyTabEntryQuery, + getTabEntryOptions, openTabEntryWithOperations, TAB_ENTRY_ABSOLUTE_PATH_REMOTE_BLOCKED_MESSAGE, + validateNewTabEntryAbsolutePath, + validateNewTabEntryRelativePath, type TabEntryOperations } from './tab-create-entry-action' +import * as classifier from './tab-create-entry-classifier' const readyFiles = (files: string[]) => ({ files, loading: false, loadError: null }) +it('keeps the pure classifier available through the tab action module', () => { + expect(classifyTabEntryQuery).toBe(classifier.classifyTabEntryQuery) + expect(getTabEntryOptions).toBe(classifier.getTabEntryOptions) + expect(TAB_ENTRY_ABSOLUTE_PATH_REMOTE_BLOCKED_MESSAGE).toBe( + classifier.TAB_ENTRY_ABSOLUTE_PATH_REMOTE_BLOCKED_MESSAGE + ) + expect(validateNewTabEntryAbsolutePath).toBe(classifier.validateNewTabEntryAbsolutePath) + expect(validateNewTabEntryRelativePath).toBe(classifier.validateNewTabEntryRelativePath) +}) + describe('openTabEntryWithOperations', () => { function makeOperations(overrides: Partial = {}): TabEntryOperations { return { diff --git a/src/renderer/src/components/tab-bar/tab-create-entry-classifier.test.ts b/src/renderer/src/components/tab-bar/tab-create-entry-classifier.test.ts index da89d310e77..9fb842747a8 100644 --- a/src/renderer/src/components/tab-bar/tab-create-entry-classifier.test.ts +++ b/src/renderer/src/components/tab-bar/tab-create-entry-classifier.test.ts @@ -6,7 +6,7 @@ import { TAB_ENTRY_ABSOLUTE_PATH_REMOTE_BLOCKED_MESSAGE, validateNewTabEntryAbsolutePath, validateNewTabEntryRelativePath -} from './tab-create-entry-action' +} from './tab-create-entry-classifier' const readyFiles = (files: string[]) => ({ files, loading: false, loadError: null }) diff --git a/src/renderer/src/components/terminal-pane/terminal-parked-pane-candidates.test.ts b/src/renderer/src/components/terminal-pane/terminal-parked-pane-candidates.test.ts index 7263caf780a..b061ab1ba34 100644 --- a/src/renderer/src/components/terminal-pane/terminal-parked-pane-candidates.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-parked-pane-candidates.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { fallbackParkedPaneCandidates } from './terminal-parked-tab-watchers' +import { fallbackParkedPaneCandidates } from './terminal-parked-watcher-reconciliation' const TAB_ID = 'tab-1' const PTY_ID = 'repo::/worktree@@session-1' diff --git a/src/renderer/src/components/terminal-pane/terminal-parked-watcher-partial-reconciliation.test.ts b/src/renderer/src/components/terminal-pane/terminal-parked-watcher-partial-reconciliation.test.ts index d5fd24ecae3..0d7710e7576 100644 --- a/src/renderer/src/components/terminal-pane/terminal-parked-watcher-partial-reconciliation.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-parked-watcher-partial-reconciliation.test.ts @@ -53,9 +53,11 @@ vi.mock('@/store', () => ({ import { captureParkedTerminalPaneCandidates, + fallbackParkedPaneCandidates, pruneParkedTerminalWatchers, syncParkedTerminalTabWatchers } from './terminal-parked-tab-watchers' +import { fallbackParkedPaneCandidates as directFallbackParkedPaneCandidates } from './terminal-parked-watcher-reconciliation' function sync(): void { syncParkedTerminalTabWatchers({ @@ -76,6 +78,10 @@ afterEach(() => { pruneParkedTerminalWatchers(new Set()) }) +it('keeps pane fallback available through the parked watcher module', () => { + expect(fallbackParkedPaneCandidates).toBe(directFallbackParkedPaneCandidates) +}) + it('retains a continuing watcher and title while reconciling a reminted split leaf', () => { captureParkedTerminalPaneCandidates(TAB_ID, WORKTREE_ID, [ { ptyId: FIRST_PTY_ID, paneId: 1, leafId: FIRST_LEAF_ID, drivesTabTitle: true }, diff --git a/src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts b/src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts index c654363d4c8..c1c7658691f 100644 --- a/src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-url-link-click.test.ts @@ -2,7 +2,11 @@ import type { IBufferLine, Terminal } from '@xterm/xterm' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { registerHttpLinkStoreAccessor } from '@/lib/http-link-routing' import { handleTerminalWebLinkClick } from './terminal-web-link-click' -import { installHttpLinkClickFallback } from './terminal-url-link-hit-testing' +import { + installHttpLinkClickFallback, + TERMINAL_HTTP_URL_MAX_LENGTH +} from './terminal-url-link-hit-testing' +import { TERMINAL_HTTP_URL_MAX_LENGTH as maximumHttpUrlLength } from './terminal-http-link-limits' const COLS = 157 const ROWS = 59 @@ -157,6 +161,10 @@ function mouseEventForRow( } describe('hard-wrapped terminal HTTP clicks', () => { + it('exports the URL length limit exercised by the extraction tests', () => { + expect(TERMINAL_HTTP_URL_MAX_LENGTH).toBe(maximumHttpUrlLength) + }) + beforeEach(() => { vi.stubGlobal('navigator', { userAgent: 'Macintosh' }) vi.stubGlobal('window', { api: { shell: { openUrl: openUrlMock } } }) diff --git a/src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts b/src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts index 87d03c748b7..e770c80a5de 100644 --- a/src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-url-link-hit-testing.test.ts @@ -1,8 +1,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest' -import { - extractTerminalHttpLinks, - TERMINAL_HTTP_URL_MAX_LENGTH -} from './terminal-url-link-hit-testing' +import { extractTerminalHttpLinks } from './terminal-http-url-extraction' +import { TERMINAL_HTTP_URL_MAX_LENGTH } from './terminal-http-link-limits' afterEach(() => { vi.restoreAllMocks() diff --git a/src/renderer/src/components/worktree-jump-palette-sleeping-filter.test.ts b/src/renderer/src/components/worktree-jump-palette-sleeping-filter.test.ts index 56fe90c0eb2..278bc6bbf23 100644 --- a/src/renderer/src/components/worktree-jump-palette-sleeping-filter.test.ts +++ b/src/renderer/src/components/worktree-jump-palette-sleeping-filter.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { isSleepingSweepExemptWorkspace } from './sidebar/visible-worktrees' +import { isSleepingSweepExemptWorkspace } from './sidebar/visible-worktree-kinds' import type { Worktree } from '../../../shared/worktree/types' function makeWorktree(overrides: Partial = {}): Worktree { diff --git a/src/renderer/src/lib/linked-work-item-provider.test.ts b/src/renderer/src/lib/linked-work-item-provider.test.ts index 83bced1a861..5fb6822dd94 100644 --- a/src/renderer/src/lib/linked-work-item-provider.test.ts +++ b/src/renderer/src/lib/linked-work-item-provider.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { getLinkedWorkItemProvider } from './new-workspace' +import { getLinkedWorkItemProvider } from './linked-work-item-provider' describe('getLinkedWorkItemProvider', () => { it.each([ diff --git a/src/renderer/src/lib/new-workspace.test.ts b/src/renderer/src/lib/new-workspace.test.ts index 4baee9bf9d4..0fe6b867a9c 100644 --- a/src/renderer/src/lib/new-workspace.test.ts +++ b/src/renderer/src/lib/new-workspace.test.ts @@ -96,11 +96,17 @@ vi.mock('@/lib/agent-background-session-timeout-toast', () => ({ import { canUseIssueCommandForLinkedItemProvider, ensureAgentStartupInTerminal, + getLinkedWorkItemProvider, getSetupConfig, getWorkspaceSeedName, isGitLabIssueUrl } from './new-workspace' import { resetAgentStartupDelayedDeliveryForTests } from './agent-startup-delayed-delivery' +import { getLinkedWorkItemProvider as directGetLinkedWorkItemProvider } from './linked-work-item-provider' + +it('keeps linked item provider selection available through the workspace module', () => { + expect(getLinkedWorkItemProvider).toBe(directGetLinkedWorkItemProvider) +}) describe('linked-item issue commands', () => { it('keeps Jira and Linear sentinel numbers out of repository issue templates', () => {