mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 16:03:47 +00:00
refactor(shared): drop the shared/types barrel and import from the real modules
#14397 split `shared/types.ts` into 46 per-domain modules but kept the path as a re-export barrel so the import sites did not have to change. This removes the barrel: every consumer now imports from the module that actually declares the type, and `src/shared/types.ts` is deleted. Barrels hide where a type lives, make every consumer look like it depends on the whole domain, and let an unrelated edit invalidate a module that ~2,000 files transitively import. 2,323 import declarations across 2,321 files. Rewritten mechanically: each specifier was resolved to an absolute path via the TypeScript AST and recomputed, rather than string-substituted, so alias forms (`@/../../shared/ types`) and per-specifier `type` modifiers survive. Four cases the mechanical pass had to handle, each found by a gate rather than by reading the diff: - Modules inside `src/shared` import the barrel as `./types`, not `shared/types`. A pre-filter on the latter string skipped 176 of them and left imports dangling at a deleted file, which surfaced as confusing `Property 'x' is optional in type 'Repo' but required in Pick<Repo, ...>` errors rather than "module not found". - The barrel RENAMED one type on the way through (`WorkspaceSource as WorkspaceCreateTelemetrySource`), so the original name in the owning module has to be re-aliased at each consumer. - Three test files put `;(globalThis as ...)` on the line after the import. TypeScript parses that `;` as the import statement's terminator, so replacing through `statement.getEnd()` deletes it and breaks ASI. The rewrite now stops at the module specifier. - A file that already imported directly from a module got a SECOND import from it, because the barrel re-exported those same names — which trips `import/no-duplicates` under `--deny-warnings`. A post-pass merges declarations sharing a specifier and type-only-ness; the `import type` plus `import` pair from one module is left alone, since that form is allowed. Splitting one barrel import into several genuinely adds lines, which pushed `terminal-layout-pty-ownership.ts` to 301 counted lines: its 107-character import must wrap, and neither local type collapses onto one line (101 and 116 characters). Rather than contort a type declaration to fit a line budget, `collectLeafIds` and `pruneLeaves` move to `terminal-pane-layout-tree.ts` — they are pure structural operations on the layout tree and independent of PTY ownership. `visible-worktrees.ts` similarly loses its own mini-barrel re-export of `isDefaultBranchWorkspace`, with the four real consumers repointed at the declaring module. No `max-lines` bypass added. Verified: cold `tsc --noEmit` green on node, cli, and web (buildinfo deleted first — these projects are `composite: true` and reuse stale caches); the full `pnpm lint` green, not just bare oxlint — the narrower local check is what let the duplicate imports reach CI; max-lines ratchet OK at 344.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
resolveEnvironment,
|
||||
resolveEnvironmentPairingOffer
|
||||
} from '../../src/shared/runtime-environment-store'
|
||||
import type { MemorySnapshot } from '../../src/shared/types'
|
||||
import type { MemorySnapshot } from '../../src/shared/process-stats-types'
|
||||
import type { RuntimeStatus } from '../../src/shared/runtime-types'
|
||||
|
||||
async function main(): Promise<void> {
|
||||
|
||||
@@ -96,7 +96,7 @@ import {
|
||||
WORKSPACE_SORT_OPTIONS as SORT_OPTIONS
|
||||
} from '../../../src/worktree/workspace-list-picker-options'
|
||||
import type { RepoSummary } from '../../../src/worktree/host-worktree-rpc-types'
|
||||
import type { WorkspaceStatusDefinition } from '../../../../src/shared/types'
|
||||
import type { WorkspaceStatusDefinition } from '../../../../src/shared/worktree/types'
|
||||
import { DEFAULT_MOBILE_WORKSPACE_STATUSES } from '../../../src/worktree/mobile-workspace-statuses'
|
||||
|
||||
function isErrorVerdict(v: ConnectionVerdict): boolean {
|
||||
|
||||
@@ -277,7 +277,8 @@ import {
|
||||
import { colors } from '../../../../src/theme/mobile-theme'
|
||||
import { QuickCommandsTabButton } from '../../../../src/session/QuickCommandsTabButton'
|
||||
import { styles } from '../../../../src/session/mobile-session-styles'
|
||||
import type { DiffComment, TerminalQuickCommand } from '../../../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../../../src/shared/diff-comment-types'
|
||||
import type { TerminalQuickCommand } from '../../../../../src/shared/terminal-quick-command-types'
|
||||
import type {
|
||||
DiffCommentActions,
|
||||
DiffNotesDelivery,
|
||||
|
||||
@@ -149,13 +149,13 @@ import {
|
||||
scheduleMobileTaskCopyFeedbackReset
|
||||
} from '../../../src/tasks/mobile-task-copy-feedback-timer'
|
||||
import type {
|
||||
BaseRefSearchResult,
|
||||
GitHubOwnerRepo,
|
||||
ProviderCheckSummary,
|
||||
PersistedTrustedOrcaHooks,
|
||||
SparsePreset,
|
||||
TuiAgent
|
||||
} from '../../../../src/shared/types'
|
||||
ProviderCheckSummary
|
||||
} from '../../../../src/shared/github/pull-request-types'
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types'
|
||||
import type { BaseRefSearchResult } from '../../../../src/shared/repo-types'
|
||||
import type { TuiAgent } from '../../../../src/shared/tui-agent'
|
||||
import type { SparsePreset } from '../../../../src/shared/worktree/create-types'
|
||||
import type { SshConnectionState } from '../../../../src/shared/ssh-types'
|
||||
import type { HostedReviewDecision } from '../../../../src/shared/hosted-review'
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
applyTerminalQuickCommandMutation,
|
||||
type TerminalQuickCommandMutation
|
||||
} from '../../src/shared/terminal-quick-commands'
|
||||
import type { TerminalQuickCommand } from '../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../src/shared/terminal-quick-command-types'
|
||||
import { handleMockFilePreviewRequest } from './mock-server-file-preview-data'
|
||||
import { handleMockGitRequest } from './mock-server-git-state'
|
||||
import { handleMockAccountRequest } from './mock-server-account-rpc'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Image, StyleSheet, Text, View } from 'react-native'
|
||||
import type { ImageSourcePropType } from 'react-native'
|
||||
import { Terminal } from 'lucide-react-native'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import Svg, { Defs, G, LinearGradient, Path, Stop } from 'react-native-svg'
|
||||
import { colors } from '../theme/mobile-theme'
|
||||
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActivityIndicator, FlatList, Pressable, Text, View } from 'react-native'
|
||||
import { RefreshCw } from 'lucide-react-native'
|
||||
import type { RefObject } from 'react'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import { colors } from '../theme/mobile-theme'
|
||||
import { MobileDiffReviewLine } from './MobileDiffReviewLine'
|
||||
import type {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMemo } from 'react'
|
||||
import { KeyboardAvoidingView, Platform, Pressable, Text, TextInput, View } from 'react-native'
|
||||
import { Check, Copy, FileText, Plus, Send, Trash2, X } from 'lucide-react-native'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import { colors } from '../theme/mobile-theme'
|
||||
import type { ActionSheetAction } from './ActionSheetModal'
|
||||
import { ActionSheetModal } from './ActionSheetModal'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Pressable, Text, View } from 'react-native'
|
||||
import { ArrowDown, ArrowUp } from 'lucide-react-native'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import { colors } from '../theme/mobile-theme'
|
||||
import type { MobileDiffReviewQueueItem } from '../session/mobile-diff-review-queue'
|
||||
import { MOBILE_GIT_STATUS_LABELS } from '../source-control/mobile-git-status'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Pressable, StyleSheet, Text, View } from 'react-native'
|
||||
import { MessageSquare } from 'lucide-react-native'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import type { MobileDiffLine } from '../session/mobile-diff-lines'
|
||||
import type { MobileHighlightedDiffLine } from '../session/mobile-file-syntax'
|
||||
import { mobileDiffLineNumber, mobileDiffLinePrefix } from '../source-control/mobile-diff-format'
|
||||
|
||||
@@ -29,7 +29,8 @@ import {
|
||||
type SetupHookTrust
|
||||
} from '../tasks/setup-hook-trust'
|
||||
import { isMobileTuiAgentEnabled } from '../tasks/mobile-tui-agents'
|
||||
import type { PersistedTrustedOrcaHooks, TuiAgent } from '../../../src/shared/types'
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import type { SshConnectionState } from '../../../src/shared/ssh-types'
|
||||
import {
|
||||
NEW_WORKTREE_AGENT_OPTIONS as AGENT_OPTIONS,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { existsSync, readFileSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import { MOBILE_TUI_AGENT_FAVICON_DOMAINS } from '../tasks/mobile-tui-agents'
|
||||
|
||||
// Agents that render a hand-authored glyph in MobileAgentIcon and therefore
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ImageSourcePropType } from 'react-native'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
|
||||
// Why: mobile previously rendered these agent icons from Google's favicon
|
||||
// service, which is unreachable in some regions (e.g. mainland China) and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
|
||||
import { isMobileTuiAgentEnabled } from '../tasks/mobile-tui-agents'
|
||||
import { pickWorkspaceAgent } from '../tasks/workspace-agent-selection'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react'
|
||||
import { ActivityIndicator, Pressable, Text, View } from 'react-native'
|
||||
import { GitMerge, Link2Off } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { GitHubPRMergeMethod, PRInfo } from '../../../../src/shared/types'
|
||||
import type { GitHubPRMergeMethod, PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
import type { RpcClient } from '../../transport/rpc-client'
|
||||
import type { MobilePrActions } from '../../session/use-mobile-pr-actions'
|
||||
import { unlinkMobilePr } from '../../source-control/mobile-pr-link'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActivityIndicator, ScrollView, Text, View } from 'react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { PRCheckRunDetails } from '../../../../src/shared/types'
|
||||
import type { PRCheckRunDetails } from '../../../../src/shared/github/check-types'
|
||||
import { presentCheckDetail, type CheckDetailJob } from './pr-check-detail-content'
|
||||
import { mobilePrSidebarStyles as styles } from './mobile-pr-sidebar-styles'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { ActivityIndicator, Linking, Pressable, Text, View } from 'react-native'
|
||||
import { ChevronDown, ChevronRight, ExternalLink, RotateCw, Sparkles } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { PRCheckDetail } from '../../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../../src/shared/github/check-types'
|
||||
import type { RpcClient } from '../../transport/rpc-client'
|
||||
import { fetchPRCheckDetails, type GitHubPrRepoSlug } from '../../session/github-pr-rpc'
|
||||
import type { MobilePrActions } from '../../session/use-mobile-pr-actions'
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import { memo, useState } from 'react'
|
||||
import { Image, Linking, Pressable, Text, View } from 'react-native'
|
||||
import { Check, CornerDownRight, ExternalLink, Pencil, Trash2, Undo2 } from 'lucide-react-native'
|
||||
import type { GitHubReaction, GitHubReactionContent, PRComment } from '../../../../src/shared/types'
|
||||
import type {
|
||||
GitHubReaction,
|
||||
GitHubReactionContent,
|
||||
PRComment
|
||||
} from '../../../../src/shared/github/comment-types'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import { canEditComment, isResolvableComment } from '../../session/pr-comment-actions'
|
||||
import { ConfirmModal } from '../ConfirmModal'
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { GitHubWorkItemDetails, PRComment } from '../../../../src/shared/types'
|
||||
import type { PRComment } from '../../../../src/shared/github/comment-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-item-types'
|
||||
import { PRCommentsSection } from './PRCommentsSection'
|
||||
|
||||
vi.mock('react-native', () => ({
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { useMemo, useState } from 'react'
|
||||
import { ActivityIndicator, Pressable, Text, View } from 'react-native'
|
||||
import { ChevronDown, ChevronRight } from 'lucide-react-native'
|
||||
import type { GitHubWorkItemDetails, PRState } from '../../../../src/shared/types'
|
||||
import type { PRState } from '../../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-item-types'
|
||||
import type { GitHubPrRepoSlug } from '../../session/github-pr-rpc'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import { canAddRootComment } from '../../session/pr-comment-actions'
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ActivityIndicator, Pressable, ScrollView, Text, View } from 'react-nati
|
||||
import * as Clipboard from 'expo-clipboard'
|
||||
import { Check, Copy, FileWarning, Sparkles } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { PRInfo } from '../../../../src/shared/types'
|
||||
import type { PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
import { PRSection } from './PRSection'
|
||||
import { resolveConflictDisplay } from './pr-conflict-presentation'
|
||||
import { prConflictStyles as styles } from './pr-conflict-styles'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useMemo, useState } from 'react'
|
||||
import { ActivityIndicator, Pressable, Text, View } from 'react-native'
|
||||
import { UserPlus, X } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { GitHubWorkItemDetails } from '../../../../src/shared/types'
|
||||
import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-item-types'
|
||||
import type { RpcClient } from '../../transport/rpc-client'
|
||||
import type { MobilePrActions } from '../../session/use-mobile-pr-actions'
|
||||
import { isPrSidebarDetailsPlaceholder } from '../../session/mobile-pr-sidebar-state'
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useState } from 'react'
|
||||
import { ActivityIndicator, Pressable, Text, TextInput, View } from 'react-native'
|
||||
import { ArrowRight, ExternalLink, Pencil } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { GitHubWorkItemDetails, PRInfo } from '../../../../src/shared/types'
|
||||
import type { PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-item-types'
|
||||
import type { MobilePrTitleAction } from '../../session/use-mobile-pr-title-action'
|
||||
import { prStateBadge } from './pr-checks-presentation'
|
||||
import { statusColor } from './pr-sidebar-status-color'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import { ActivityIndicator, Pressable, Text, TextInput, View } from 'react-native'
|
||||
import { Check } from 'lucide-react-native'
|
||||
import { colors } from '../../theme/mobile-theme'
|
||||
import type { GitHubAssignableUser } from '../../../../src/shared/types'
|
||||
import type { GitHubAssignableUser } from '../../../../src/shared/github/pull-request-types'
|
||||
import type { RpcClient } from '../../transport/rpc-client'
|
||||
import { fetchAssignableUsers } from '../../session/github-pr-rpc'
|
||||
import { BottomDrawer } from '../BottomDrawer'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { GitHubPRMergeMethod, PRState } from '../../../../src/shared/types'
|
||||
import type { GitHubPRMergeMethod, PRState } from '../../../../src/shared/github/pull-request-types'
|
||||
|
||||
// Which actions the PR actions section may offer for a given PR state. Merged PRs
|
||||
// expose only unlink (+ open-on-host elsewhere); closed PRs add reopen; open/draft
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PRInfo } from '../../../../src/shared/types'
|
||||
import type { PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
|
||||
type MobilePRAutoMergeAvailabilityInput = Pick<
|
||||
PRInfo,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { PRCheckRunDetails } from '../../../../src/shared/types'
|
||||
import type { PRCheckRunDetails } from '../../../../src/shared/github/check-types'
|
||||
import { presentCheckDetail } from './pr-check-detail-content'
|
||||
|
||||
function details(over: Partial<PRCheckRunDetails>): PRCheckRunDetails {
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
PRCheckJob,
|
||||
PRCheckRunDetails,
|
||||
PRCheckStep
|
||||
} from '../../../../src/shared/types'
|
||||
} from '../../../../src/shared/github/check-types'
|
||||
|
||||
// Pure mapping from the github.prCheckDetails payload to the rows the mobile
|
||||
// expanded check detail renders. No React/native imports so it stays unit-testable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { PRCheckDetail } from '../../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../../src/shared/github/check-types'
|
||||
import {
|
||||
checkOutcome,
|
||||
firstFailingCheckKey,
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { PRCheckDetail, PRState, ProviderCheckSummary } from '../../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../../src/shared/github/check-types'
|
||||
import type {
|
||||
PRState,
|
||||
ProviderCheckSummary
|
||||
} from '../../../../src/shared/github/pull-request-types'
|
||||
import {
|
||||
classifyCheckOutcome,
|
||||
summarizeProviderChecks,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { PRInfo } from '../../../../src/shared/types'
|
||||
import type { PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
import {
|
||||
buildMergeabilityRefreshCommands,
|
||||
hasMergeConflicts,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PRInfo } from '../../../../src/shared/types'
|
||||
import type { PRInfo } from '../../../../src/shared/github/pull-request-types'
|
||||
|
||||
// Pure presentation logic for the PR sidebar's conflicting-files section. No
|
||||
// React/native imports so it is unit-testable under the node Vitest config (KTD5).
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as Clipboard from 'expo-clipboard'
|
||||
import { Check, Copy, Pencil, Play, Trash2 } from 'lucide-react-native'
|
||||
import { colors, spacing, typography } from '../theme/mobile-theme'
|
||||
import { MobileAgentIcon } from '../components/MobileAgentIcon'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import {
|
||||
getQuickCommandDisplayPreview,
|
||||
getTerminalQuickCommandBody,
|
||||
|
||||
@@ -3,7 +3,8 @@ import { Check, Plus, Search } from 'lucide-react-native'
|
||||
import { colors, spacing } from '../theme/mobile-theme'
|
||||
import { MobileAgentIcon } from '../components/MobileAgentIcon'
|
||||
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
|
||||
import type { TerminalQuickCommand, TuiAgent } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import { supportsTerminalAgentQuickCommand } from '../terminal/quick-commands'
|
||||
import { QuickCommandRow } from './QuickCommandRow'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createElement, type ReactNode } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { MAX_QUICK_COMMANDS } from '../terminal/quick-commands'
|
||||
import { QuickCommandsSheet } from './QuickCommandsSheet'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ChevronLeft } from 'lucide-react-native'
|
||||
import { colors, spacing } from '../theme/mobile-theme'
|
||||
import { BottomDrawer } from '../components/BottomDrawer'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import {
|
||||
getQuickCommandPreview,
|
||||
MAX_QUICK_COMMANDS,
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
resolveTuiAgentLaunchEnv
|
||||
} from '../../../src/shared/tui-agent-launch-defaults'
|
||||
import { normalizeAiVaultResumeFilePath } from '../../../src/shared/ai-vault-resume-path'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import { parseWslUncPath } from '../../../src/shared/wsl-paths'
|
||||
import { resolveWindowsShellStartupFamily } from '../../../src/shared/windows-terminal-shell'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { GitHubReaction, GitHubReactionContent, PRComment } from '../../../src/shared/types'
|
||||
import type {
|
||||
GitHubReaction,
|
||||
GitHubReactionContent,
|
||||
PRComment
|
||||
} from '../../../src/shared/github/comment-types'
|
||||
import { isRecord, readBoolean, readNumber, readString } from './github-pr-value-readers'
|
||||
|
||||
// Defensive parsers for the PR conversation comments carried by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { GitHubPRMergeMethod } from '../../../src/shared/types'
|
||||
import type { GitHubPRMergeMethod } from '../../../src/shared/github/pull-request-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { buildGithubPrParams, githubPrRepoSlugParam, type GitHubPrRepoSlug } from './github-pr-rpc'
|
||||
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
import type {
|
||||
GitHubAssignableUser,
|
||||
GitHubPRReviewSummary,
|
||||
GitHubWorkItem,
|
||||
GitHubWorkItemDetails,
|
||||
PRCheckAnnotation,
|
||||
PRCheckDetail,
|
||||
PRCheckJob,
|
||||
PRCheckRunDetails,
|
||||
PRCheckStep,
|
||||
PRCheckStep
|
||||
} from '../../../src/shared/github/check-types'
|
||||
import type {
|
||||
GitHubAssignableUser,
|
||||
GitHubPRReviewSummary,
|
||||
PRInfo
|
||||
} from '../../../src/shared/types'
|
||||
} from '../../../src/shared/github/pull-request-types'
|
||||
import type {
|
||||
GitHubWorkItem,
|
||||
GitHubWorkItemDetails
|
||||
} from '../../../src/shared/github/work-item-types'
|
||||
import { readPRComments } from './github-pr-comment-parsers'
|
||||
import type { HostedReviewInfo } from '../../../src/shared/hosted-review'
|
||||
import {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import type {
|
||||
GitHubAssignableUser,
|
||||
GitHubWorkItemDetails,
|
||||
PRCheckDetail,
|
||||
PRCheckRunDetails,
|
||||
PRInfo
|
||||
} from '../../../src/shared/types'
|
||||
import type { PRCheckDetail, PRCheckRunDetails } from '../../../src/shared/github/check-types'
|
||||
import type { GitHubAssignableUser, PRInfo } from '../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../src/shared/github/work-item-types'
|
||||
import type { HostedReviewInfo } from '../../../src/shared/hosted-review'
|
||||
import {
|
||||
normalizeGitHubPRForBranchOutcome,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
import type {
|
||||
CheckStatus,
|
||||
GitHubAssignableUser,
|
||||
ProviderCheckSummary,
|
||||
GitHubPRMergeMethod,
|
||||
GitHubPRMergeMethodSettings,
|
||||
GitHubPRReviewSummary,
|
||||
GitHubRepositoryIdentity,
|
||||
PRCheckDetail,
|
||||
PRMergeableState,
|
||||
PRReviewDecision,
|
||||
PRState
|
||||
} from '../../../src/shared/types'
|
||||
PRState,
|
||||
ProviderCheckSummary
|
||||
} from '../../../src/shared/github/pull-request-types'
|
||||
import type { HostedReviewProvider } from '../../../src/shared/hosted-review'
|
||||
|
||||
// Primitive + enum value readers shared by the github.* PR parsers. Each narrows
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import {
|
||||
clearSentMobileDiffComments,
|
||||
countUnsentMobileDiffComments,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
|
||||
export type UpdateMobileDiffCommentInput = {
|
||||
id: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import {
|
||||
addMobileDiffComment,
|
||||
formatDiffComments,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DiffComment, DiffReviewScope } from '../../../src/shared/types'
|
||||
import type { DiffComment, DiffReviewScope } from '../../../src/shared/diff-comment-types'
|
||||
import { formatDiffComment, formatDiffComments } from '../../../src/shared/diff-comments-format'
|
||||
|
||||
export { formatDiffComment, formatDiffComments }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DiffReviewScope } from '../../../src/shared/types'
|
||||
import type { DiffReviewScope } from '../../../src/shared/diff-comment-types'
|
||||
import type { MobileGitStagingArea } from '../source-control/mobile-git-status'
|
||||
import {
|
||||
createMobileDiffReviewFileKey,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/types'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/diff-comment-types'
|
||||
import type { MobileGitBranchChangeEntry } from '../source-control/mobile-branch-compare'
|
||||
import type { MobileGitStatusEntry } from '../source-control/mobile-git-status'
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { DiffComment, DiffReviewScope, MobileDiffReviewState } from '../../../src/shared/types'
|
||||
import type {
|
||||
DiffComment,
|
||||
DiffReviewScope,
|
||||
MobileDiffReviewState
|
||||
} from '../../../src/shared/diff-comment-types'
|
||||
import type { MobileGitBranchChangeEntry } from '../source-control/mobile-branch-compare'
|
||||
import {
|
||||
isMobileGitDiscardableEntry,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/types'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/diff-comment-types'
|
||||
import type { MobileGitBranchCompareResult } from '../source-control/mobile-branch-compare'
|
||||
import type { MobileGitStatusResult } from '../source-control/mobile-git-status'
|
||||
import type { MobileDiffLine } from './mobile-diff-lines'
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
DiffReviewScope,
|
||||
MobileDiffReviewFileState,
|
||||
MobileDiffReviewState
|
||||
} from '../../../src/shared/types'
|
||||
} from '../../../src/shared/diff-comment-types'
|
||||
|
||||
export type MobileDiffReviewFileDescriptor = {
|
||||
key: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import {
|
||||
filterEnabledMobileTuiAgents,
|
||||
isMobileTuiAgent,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import type { GitHubWorkItemDetails, PRCheckDetail, PRInfo } from '../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
import type { PRInfo } from '../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitHubPrReadOutcome, GitHubPrRepoSlug } from './github-pr-rpc'
|
||||
import { resolveLinkedPrNumber } from './mobile-pr-sidebar-resolve'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { DiffComment, TuiAgent } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import type { AgentStatusEntry } from '../../../src/shared/agent-status-types'
|
||||
import type { MobileBrowserTab } from '../browser/MobileBrowserPane'
|
||||
import type { MobileTerminalTheme } from '../terminal/terminal-webview-contract'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { AgentStatusEntry } from '../../../src/shared/agent-status-types'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import type { MobileSessionTab } from './mobile-session-route-types'
|
||||
import {
|
||||
getMobileSessionTabTitle,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { stripLeadingAgentTitleDecorationOrEmpty } from '../../../src/shared/agent-title-decoration'
|
||||
import { resolveExplicitTerminalTitleAgentType } from '../../../src/shared/terminal-title-agent-type'
|
||||
import type { AgentStatusEntry } from '../../../src/shared/agent-status-types'
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import { isBlankBrowserUrl } from '../browser/browser-url'
|
||||
import type { MobileSessionTab } from './mobile-session-route-types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { GitHubPRMergeMethod } from '../../../src/shared/types'
|
||||
import type { GitHubPRMergeMethod } from '../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubPrMutationOutcome } from './github-pr-mutations'
|
||||
import type { GitHubPrRepoSlug } from './github-pr-rpc'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { GitHubPRMergeMethod, PRState } from '../../../src/shared/types'
|
||||
import type { GitHubPRMergeMethod, PRState } from '../../../src/shared/github/pull-request-types'
|
||||
import { githubRepoIdentityKey } from '../../../src/shared/github/repository-identity-key'
|
||||
import { classifyPrSidebarFailure } from './mobile-pr-sidebar-state'
|
||||
import { createOptimisticField, type OptimisticField } from './optimistic-write-sequence'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { PRCheckDetail } from '../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
import {
|
||||
buildFixChecksPrompt,
|
||||
buildResolveConflictsPrompt,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getBrokenChecks
|
||||
} from '../../../src/shared/pr-checks-fix-prompt'
|
||||
import { buildResolvePullRequestConflictsPrompt } from '../../../src/shared/source-control-conflict-prompts'
|
||||
import type { PRCheckDetail } from '../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
|
||||
// Pure prompt builders for the mobile PR sidebar's "Fix checks with AI" /
|
||||
// "Resolve conflicts with AI" triage actions. Kept free of React/native imports
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { PRComment } from '../../../src/shared/types'
|
||||
import type { PRComment } from '../../../src/shared/github/comment-types'
|
||||
import {
|
||||
buildAddRootCommentParams,
|
||||
buildDeleteCommentParams,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { GitHubOwnerRepo, PRComment, PRState } from '../../../src/shared/types'
|
||||
import type { PRComment } from '../../../src/shared/github/comment-types'
|
||||
import type { GitHubOwnerRepo, PRState } from '../../../src/shared/github/pull-request-types'
|
||||
|
||||
// Pure helpers for the interactive PR comment timeline (reply / resolve / add
|
||||
// root comment). Kept free of React/native imports so they unit-test under the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PRState } from '../../../src/shared/types'
|
||||
import type { PRState } from '../../../src/shared/github/pull-request-types'
|
||||
|
||||
// Pure helpers for the inline PR-title edit affordance. Kept free of React/native
|
||||
// imports so they unit-test under the node Vitest config, mirroring the other
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type {
|
||||
TerminalQuickCommand,
|
||||
TerminalQuickCommandAction,
|
||||
TerminalQuickCommandScope,
|
||||
TuiAgent
|
||||
} from '../../../src/shared/types'
|
||||
TerminalQuickCommandScope
|
||||
} from '../../../src/shared/terminal-quick-command-types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import {
|
||||
isAgentQuickCommand,
|
||||
MAX_QUICK_COMMAND_AGENT_PROMPT_LENGTH,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, type Dispatch, type SetStateAction } from 'react'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/types'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/diff-comment-types'
|
||||
import { triggerError, triggerSuccess } from '../platform/haptics'
|
||||
import type { ConnectionState } from '../transport/types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import type { FlatList } from 'react-native'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import type { ConnectionState } from '../transport/types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { getWorktreeLabel } from './worktree-label'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { DiffComment } from '../../../src/shared/types'
|
||||
import type { DiffComment } from '../../../src/shared/diff-comment-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { ReviewScreenState } from './mobile-diff-review-screen-model'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, type Dispatch, type SetStateAction } from 'react'
|
||||
import * as Clipboard from 'expo-clipboard'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/types'
|
||||
import type { DiffComment, MobileDiffReviewState } from '../../../src/shared/diff-comment-types'
|
||||
import type { ConnectionState } from '../transport/types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { triggerSuccess } from '../platform/haptics'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useMemo, useRef, useState } from 'react'
|
||||
import type { PRComment } from '../../../src/shared/types'
|
||||
import type { PRComment } from '../../../src/shared/github/comment-types'
|
||||
import type { ConnectionState } from '../transport/types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { GitHubPrRepoSlug } from './github-pr-rpc'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import type { GitHubWorkItemDetails, PRCheckDetail, PRInfo } from '../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
import type { PRInfo } from '../../../src/shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../src/shared/github/work-item-types'
|
||||
import type { HostedReviewInfo } from '../../../src/shared/hosted-review'
|
||||
import type { GitHubPrReadOutcome } from './github-pr-rpc'
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { LogicalClientCutoverError } from '../transport/stable-logical-rpc-client'
|
||||
import type { RpcResponse } from '../transport/types'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { isLogicalClientCutoverError } from '../transport/stable-logical-rpc-client'
|
||||
import type { RpcFailure, RpcResponse, RpcSuccess } from '../transport/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import {
|
||||
applyTerminalQuickCommandMutation,
|
||||
parseNormalizedTerminalQuickCommands,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
type MobileCommitRow
|
||||
} from './mobile-git-history'
|
||||
import { resolveMobileHistoryScreenView } from './mobile-history-screen-state'
|
||||
import type { GitBranchChangeEntry } from '../../../src/shared/types'
|
||||
import type { GitBranchChangeEntry } from '../../../src/shared/git-diff-compare-types'
|
||||
|
||||
type Props = {
|
||||
client: RpcClient | null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, expectTypeOf, it } from 'vitest'
|
||||
import type { GitBranchCompareResult } from '../../../src/shared/types'
|
||||
import type { GitBranchCompareResult } from '../../../src/shared/git-diff-compare-types'
|
||||
import {
|
||||
buildMobileBranchCompareSection,
|
||||
canOpenMobileBranchCompareDiff,
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
GitBranchChangeEntry,
|
||||
GitBranchCompareResult,
|
||||
GitBranchCompareSummary
|
||||
} from '../../../src/shared/types'
|
||||
} from '../../../src/shared/git-diff-compare-types'
|
||||
|
||||
export type MobileGitBranchChangeEntry = GitBranchChangeEntry
|
||||
export type MobileGitBranchCompareSummary = GitBranchCompareSummary
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import type { PRCheckDetail, PRComment, PRInfo } from '../../../src/shared/types'
|
||||
import type { PRCheckDetail } from '../../../src/shared/github/check-types'
|
||||
import type { PRComment } from '../../../src/shared/github/comment-types'
|
||||
import type { PRInfo } from '../../../src/shared/github/pull-request-types'
|
||||
import type { PrSidebarState } from '../session/mobile-pr-sidebar-state'
|
||||
import { buildMobilePrChipSummary, countUnresolvedReviewThreads } from './mobile-pr-chip-summary'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PRComment } from '../../../src/shared/types'
|
||||
import type { PRComment } from '../../../src/shared/github/comment-types'
|
||||
import type { PrSidebarState } from '../session/mobile-pr-sidebar-state'
|
||||
import { summarizeProviderChecks } from '../../../src/shared/provider-check-summary'
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { createWorktreeWithNameRetry, type WorktreeCreateResult } from './worktree-create-retry'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { GitHubWorkItem, GitLabWorkItem, LinearIssue } from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import type { LinearIssue } from '../../../src/shared/linear/issue-types'
|
||||
import {
|
||||
buildGitHubLinkedWorkItem,
|
||||
buildGitLabLinkedWorkItem,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import type { GitHubWorkItem, GitLabWorkItem, LinearIssue } from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import type { LinearIssue } from '../../../src/shared/linear/issue-types'
|
||||
import { getLinearIssueWorkspaceName } from '../../../src/shared/workspace-name'
|
||||
import {
|
||||
buildGitHubWorkspaceSource,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { RpcSuccess } from '../transport/types'
|
||||
import type { GitHubPrStartPoint } from '../../../src/shared/types'
|
||||
import type { GitHubPrStartPoint } from '../../../src/shared/worktree/types'
|
||||
|
||||
// The resolved start point for a linked PR/MR: the base branch to create from
|
||||
// plus the optional review-compare ref, push target, and exact branch name.
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import { buildGitHubCheckSummary, type GitHubCheckLike } from './github-check-summary'
|
||||
import { buildGitLabCheckSummary } from './gitlab-check-summary'
|
||||
import { summarizeProviderChecks } from '../../../src/shared/provider-check-summary'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/types'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/github/pull-request-types'
|
||||
|
||||
describe('buildGitHubCheckSummary', () => {
|
||||
it('returns none for empty check lists', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { summarizeProviderChecks } from '../../../src/shared/provider-check-summary'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/types'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/github/pull-request-types'
|
||||
|
||||
export type GitHubCheckLike = {
|
||||
status: string
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
mapGitLabPipelineJobStatusToConclusion
|
||||
} from '../../../src/shared/gitlab-pipeline-checks'
|
||||
import { summarizeProviderChecks } from '../../../src/shared/provider-check-summary'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/types'
|
||||
import type { ProviderCheckSummary } from '../../../src/shared/github/pull-request-types'
|
||||
|
||||
type GitLabPipelineJobLike = { status: string }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import {
|
||||
MOBILE_TUI_AGENT_AUTO_PICK_ORDER,
|
||||
MOBILE_TUI_AGENT_FAVICON_DOMAINS,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import type { ProviderCheckSummary, PRMergeableState } from '../../../src/shared/types'
|
||||
import type {
|
||||
PRMergeableState,
|
||||
ProviderCheckSummary
|
||||
} from '../../../src/shared/github/pull-request-types'
|
||||
import { getProviderChecksLabel } from '../../../src/shared/provider-check-summary'
|
||||
|
||||
export type MobileHostedReviewStatus = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
|
||||
// Why: mobile tests run from the mobile package only, so runtime imports of
|
||||
// desktop shared modules can break Vitest transforms in CI. Keep this list
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
trustedOrcaHooksWithSetupApproval,
|
||||
wasSetupHookPreviouslyApproved
|
||||
} from './setup-hook-trust'
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/types'
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
|
||||
describe('setup hook trust', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/types'
|
||||
import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
|
||||
export type SetupHookTrust = {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import type {
|
||||
BaseRefSearchResult,
|
||||
GitHubWorkItem,
|
||||
GitLabWorkItem,
|
||||
LinearIssue
|
||||
} from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import type { LinearIssue } from '../../../src/shared/linear/issue-types'
|
||||
import type { BaseRefSearchResult } from '../../../src/shared/repo-types'
|
||||
import {
|
||||
isSmartWorkspaceSourceQueryWithinLimit,
|
||||
type SmartNameMode
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { GitHubWorkItem, GitLabWorkItem } from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import {
|
||||
normalizeGitHubLinkQuery,
|
||||
parseGitHubIssueOrPRLink,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import type {
|
||||
BaseRefSearchResult,
|
||||
GitHubWorkItem,
|
||||
GitLabWorkItem,
|
||||
LinearIssue
|
||||
} from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import type { LinearIssue } from '../../../src/shared/linear/issue-types'
|
||||
import type { BaseRefSearchResult } from '../../../src/shared/repo-types'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { RpcSuccess } from '../transport/types'
|
||||
import { extractLinearIssueReadItems } from './linear-mobile-issue-read'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { useCallback, useMemo, useRef, useState } from 'react'
|
||||
import type { GitHubWorkItem, GitLabWorkItem, LinearIssue } from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import type { LinearIssue } from '../../../src/shared/linear/issue-types'
|
||||
import { resolveComposerManualBranchNameChange } from '../../../src/shared/composer-branch-selection'
|
||||
import { resolveGitHubWorkItemIdentity } from '../../../src/shared/new-workspace/github-work-item-identity'
|
||||
import { getForkPushWarning } from '../../../src/shared/new-workspace/fork-push-warning'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import type { GitHubWorkItem, GitLabWorkItem } from '../../../src/shared/types'
|
||||
import type { GitHubWorkItem } from '../../../src/shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../src/shared/gitlab-types'
|
||||
import {
|
||||
buildSmartWorkspaceSourceRows,
|
||||
getSmartWorkspaceEmptyHint,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from '../../../src/shared/types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import {
|
||||
filterEnabledMobileTuiAgents,
|
||||
isMobileTuiAgent,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import type {
|
||||
CreateSparseCheckoutRequest,
|
||||
GitPushTarget,
|
||||
SetupDecision,
|
||||
TuiAgent
|
||||
} from '../../../src/shared/types'
|
||||
SetupDecision
|
||||
} from '../../../src/shared/worktree/create-types'
|
||||
import type { GitPushTarget } from '../../../src/shared/worktree/types'
|
||||
import { getWorkspaceSourceName } from '../../../src/shared/new-workspace/workspace-source'
|
||||
import { resolveMobileWorkspaceCreateName } from './mobile-workspace-name'
|
||||
import type { WorkspaceAgentChoice } from './workspace-agent-selection'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import {
|
||||
buildMobileQuickCommandLaunch,
|
||||
getQuickCommandDisplayPreview,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { TerminalQuickCommand, TuiAgent } from '../../../src/shared/types'
|
||||
import type { TerminalQuickCommand } from '../../../src/shared/terminal-quick-command-types'
|
||||
import type { TuiAgent } from '../../../src/shared/tui-agent'
|
||||
import {
|
||||
applyTerminalQuickCommandMutation,
|
||||
flattenTerminalQuickCommand,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WorkspaceStatusDefinition } from '../../../src/shared/types'
|
||||
import type { WorkspaceStatusDefinition } from '../../../src/shared/worktree/types'
|
||||
|
||||
export const DEFAULT_MOBILE_WORKSPACE_STATUS_ID = 'in-progress'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react'
|
||||
import type { WorkspaceStatusDefinition } from '../../../src/shared/types'
|
||||
import type { WorkspaceStatusDefinition } from '../../../src/shared/worktree/types'
|
||||
import type { MobileGroupMode, MobileSortMode } from './workspace-view-settings'
|
||||
import {
|
||||
buildSections,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user