From ccac2d82281f14640eae5bf60dc78855ba1ac846 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 17 Apr 2026 00:26:49 -0700 Subject: [PATCH] Fix post-rebase mobile typecheck issues Co-authored-by: codex --- .../mobile/src/features/threads/NewTaskDraftScreen.tsx | 4 ++-- apps/mobile/src/features/threads/ThreadComposer.tsx | 4 ++-- .../mobile/src/features/threads/claudeEffortOptions.ts | 10 ++++++++++ .../src/features/threads/new-task-flow-provider.tsx | 8 ++++---- apps/mobile/tsconfig.json | 1 + packages/client-runtime/src/environmentConnection.ts | 4 ++-- .../client-runtime/src/environmentRuntimeState.test.ts | 2 +- packages/client-runtime/src/gitActionState.test.ts | 2 +- packages/client-runtime/src/gitActionState.ts | 4 ++-- packages/client-runtime/src/gitBranchState.test.ts | 2 +- packages/client-runtime/src/gitBranchState.ts | 2 +- packages/client-runtime/src/gitStatusState.test.ts | 2 +- packages/client-runtime/src/gitStatusState.ts | 2 +- packages/client-runtime/src/reconnectBackoff.test.ts | 2 +- .../client-runtime/src/shellSnapshotReducer.test.ts | 2 +- packages/client-runtime/src/shellSnapshotState.test.ts | 2 +- packages/client-runtime/src/shellSnapshotState.ts | 2 +- .../client-runtime/src/terminalSessionState.test.ts | 2 +- .../client-runtime/src/threadDetailReducer.test.ts | 2 +- packages/client-runtime/src/threadDetailState.test.ts | 2 +- packages/client-runtime/src/threadDetailState.ts | 4 ++-- packages/client-runtime/src/transportError.test.ts | 2 +- packages/client-runtime/src/wsRpcClient.ts | 4 ++-- packages/client-runtime/src/wsRpcProtocol.ts | 2 +- packages/client-runtime/src/wsTransport.ts | 4 ++-- packages/shared/src/remote.test.ts | 2 +- 26 files changed, 45 insertions(+), 34 deletions(-) create mode 100644 apps/mobile/src/features/threads/claudeEffortOptions.ts diff --git a/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx b/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx index 21f9daa4d1..0595d015cf 100644 --- a/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx +++ b/apps/mobile/src/features/threads/NewTaskDraftScreen.tsx @@ -9,7 +9,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context"; import { useThemeColor } from "../../lib/useThemeColor"; import { EnvironmentId, type ModelSelection } from "@t3tools/contracts"; -import { CLAUDE_CODE_EFFORT_OPTIONS } from "@t3tools/contracts"; import { AppText as Text, AppTextInput as TextInput } from "../../components/AppText"; import { ComposerAttachmentStrip } from "../../components/ComposerAttachmentStrip"; @@ -20,6 +19,7 @@ import { convertPastedImagesToAttachments, pickComposerImages } from "../../lib/ import { buildThreadRoutePath } from "../../lib/routes"; import { useRemoteCatalog } from "../../state/use-remote-catalog"; import { useNativePaste } from "../../hooks/useNativePaste"; +import { CLAUDE_AGENT_EFFORT_OPTIONS } from "./claudeEffortOptions"; import { branchBadgeLabel, useNewTaskFlow } from "./new-task-flow-provider"; import { useProjectActions } from "./use-project-actions"; @@ -131,7 +131,7 @@ export function NewTaskDraftScreen(props: { id: "options-effort", title: "Effort", subtitle: `${flow.effort.charAt(0).toUpperCase()}${flow.effort.slice(1)}`, - subactions: CLAUDE_CODE_EFFORT_OPTIONS.map((level) => ({ + subactions: CLAUDE_AGENT_EFFORT_OPTIONS.map((level) => ({ id: `options:effort:${level}`, title: `${level}${level === "high" ? " (default)" : ""}`, state: flow.effort === level ? ("on" as const) : undefined, diff --git a/apps/mobile/src/features/threads/ThreadComposer.tsx b/apps/mobile/src/features/threads/ThreadComposer.tsx index 32c10bcfd7..487093505c 100644 --- a/apps/mobile/src/features/threads/ThreadComposer.tsx +++ b/apps/mobile/src/features/threads/ThreadComposer.tsx @@ -7,7 +7,6 @@ import type { RuntimeMode, ServerConfig as T3ServerConfig, } from "@t3tools/contracts"; -import { CLAUDE_CODE_EFFORT_OPTIONS } from "@t3tools/contracts"; import { detectComposerTrigger, replaceTextRange, @@ -43,6 +42,7 @@ import { scoreQueryMatch, } from "@t3tools/shared/searchRanking"; import { getEnvironmentClient } from "../../state/use-remote-environment-registry"; +import { CLAUDE_AGENT_EFFORT_OPTIONS } from "./claudeEffortOptions"; import { ComposerCommandPopover, type ComposerCommandItem } from "./ComposerCommandPopover"; /** @@ -494,7 +494,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer id: "options-effort", title: "Effort", subtitle: `${currentEffort.charAt(0).toUpperCase()}${currentEffort.slice(1)}`, - subactions: CLAUDE_CODE_EFFORT_OPTIONS.map((level) => ({ + subactions: CLAUDE_AGENT_EFFORT_OPTIONS.map((level) => ({ id: `options:effort:${level}`, title: `${level}${level === "high" ? " (default)" : ""}`, state: currentEffort === level ? ("on" as const) : undefined, diff --git a/apps/mobile/src/features/threads/claudeEffortOptions.ts b/apps/mobile/src/features/threads/claudeEffortOptions.ts new file mode 100644 index 0000000000..62f2e13efa --- /dev/null +++ b/apps/mobile/src/features/threads/claudeEffortOptions.ts @@ -0,0 +1,10 @@ +import type { ClaudeAgentEffort } from "@t3tools/contracts"; + +export const CLAUDE_AGENT_EFFORT_OPTIONS = [ + "low", + "medium", + "high", + "xhigh", + "max", + "ultrathink", +] as const satisfies readonly ClaudeAgentEffort[]; diff --git a/apps/mobile/src/features/threads/new-task-flow-provider.tsx b/apps/mobile/src/features/threads/new-task-flow-provider.tsx index 0ddc8a6ef3..6b0c26e510 100644 --- a/apps/mobile/src/features/threads/new-task-flow-provider.tsx +++ b/apps/mobile/src/features/threads/new-task-flow-provider.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react"; import type { - ClaudeCodeEffort, + ClaudeAgentEffort, EnvironmentId, GitBranch, ModelSelection, @@ -76,7 +76,7 @@ type NewTaskFlowContextValue = { readonly availableBranches: ReadonlyArray; readonly runtimeMode: RuntimeMode; readonly interactionMode: ProviderInteractionMode; - readonly effort: ClaudeCodeEffort; + readonly effort: ClaudeAgentEffort; readonly fastMode: boolean; readonly contextWindow: string; readonly expandedProvider: string | null; @@ -106,7 +106,7 @@ type NewTaskFlowContextValue = { readonly loadBranches: () => Promise; readonly setRuntimeMode: (value: RuntimeMode) => void; readonly setInteractionMode: (value: ProviderInteractionMode) => void; - readonly setEffort: (value: ClaudeCodeEffort) => void; + readonly setEffort: (value: ClaudeAgentEffort) => void; readonly setFastMode: (value: boolean) => void; readonly setContextWindow: (value: string) => void; readonly setExpandedProvider: (value: string | null) => void; @@ -161,7 +161,7 @@ export function NewTaskFlowProvider(props: React.PropsWithChildren) { const [interactionMode, setInteractionMode] = useState( DEFAULT_PROVIDER_INTERACTION_MODE, ); - const [effort, setEffort] = useState("high"); + const [effort, setEffort] = useState("high"); const [fastMode, setFastMode] = useState(false); const [contextWindow, setContextWindow] = useState("1M"); const [expandedProvider, setExpandedProvider] = useState(null); diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.json index b9567f6052..f3763c5654 100644 --- a/apps/mobile/tsconfig.json +++ b/apps/mobile/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "expo/tsconfig.base", "compilerOptions": { + "allowImportingTsExtensions": true, "strict": true } } diff --git a/packages/client-runtime/src/environmentConnection.ts b/packages/client-runtime/src/environmentConnection.ts index 4e962576b6..8af12aa60e 100644 --- a/packages/client-runtime/src/environmentConnection.ts +++ b/packages/client-runtime/src/environmentConnection.ts @@ -7,8 +7,8 @@ import type { TerminalEvent, } from "@t3tools/contracts"; -import type { KnownEnvironment } from "./knownEnvironment"; -import type { WsRpcClient } from "./wsRpcClient"; +import type { KnownEnvironment } from "./knownEnvironment.ts"; +import type { WsRpcClient } from "./wsRpcClient.ts"; export interface EnvironmentConnection { readonly kind: "primary" | "saved"; diff --git a/packages/client-runtime/src/environmentRuntimeState.test.ts b/packages/client-runtime/src/environmentRuntimeState.test.ts index dc44e256d8..efd1d298d1 100644 --- a/packages/client-runtime/src/environmentRuntimeState.test.ts +++ b/packages/client-runtime/src/environmentRuntimeState.test.ts @@ -1,7 +1,7 @@ import { AtomRegistry } from "effect/unstable/reactivity"; import { afterEach, describe, expect, it } from "vitest"; -import { createEnvironmentRuntimeManager } from "./environmentRuntimeState"; +import { createEnvironmentRuntimeManager } from "./environmentRuntimeState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/gitActionState.test.ts b/packages/client-runtime/src/gitActionState.test.ts index 3b82a98ded..e7207c7eb9 100644 --- a/packages/client-runtime/src/gitActionState.test.ts +++ b/packages/client-runtime/src/gitActionState.test.ts @@ -14,7 +14,7 @@ import { type GitActionClient, createGitActionManager, EMPTY_GIT_ACTION_STATE, -} from "./gitActionState"; +} from "./gitActionState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/gitActionState.ts b/packages/client-runtime/src/gitActionState.ts index 26209e7cba..8537c75b16 100644 --- a/packages/client-runtime/src/gitActionState.ts +++ b/packages/client-runtime/src/gitActionState.ts @@ -15,8 +15,8 @@ import type { } from "@t3tools/contracts"; import { Atom, type AtomRegistry } from "effect/unstable/reactivity"; -import { buildGitActionProgressStages } from "./gitActions"; -import type { WsRpcClient } from "./wsRpcClient"; +import { buildGitActionProgressStages } from "./gitActions.ts"; +import type { WsRpcClient } from "./wsRpcClient.ts"; export type GitActionOperation = | "refresh_status" diff --git a/packages/client-runtime/src/gitBranchState.test.ts b/packages/client-runtime/src/gitBranchState.test.ts index be8ccb21a6..1d24a4e5c2 100644 --- a/packages/client-runtime/src/gitBranchState.test.ts +++ b/packages/client-runtime/src/gitBranchState.test.ts @@ -7,7 +7,7 @@ import { EMPTY_GIT_BRANCH_STATE, gitBranchStateAtom, type GitBranchClient, -} from "./gitBranchState"; +} from "./gitBranchState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/gitBranchState.ts b/packages/client-runtime/src/gitBranchState.ts index 0487ff42e0..abdc94cf9e 100644 --- a/packages/client-runtime/src/gitBranchState.ts +++ b/packages/client-runtime/src/gitBranchState.ts @@ -1,7 +1,7 @@ import type { GitBranch, GitListBranchesInput, GitListBranchesResult } from "@t3tools/contracts"; import { Atom, type AtomRegistry } from "effect/unstable/reactivity"; -import type { WsRpcClient } from "./wsRpcClient"; +import type { WsRpcClient } from "./wsRpcClient.ts"; export interface GitBranchTarget { readonly environmentId: string | null; diff --git a/packages/client-runtime/src/gitStatusState.test.ts b/packages/client-runtime/src/gitStatusState.test.ts index 90560085ee..a31d409e5c 100644 --- a/packages/client-runtime/src/gitStatusState.test.ts +++ b/packages/client-runtime/src/gitStatusState.test.ts @@ -2,7 +2,7 @@ import type { GitStatusResult } from "@t3tools/contracts"; import { AtomRegistry } from "effect/unstable/reactivity"; import { afterEach, describe, expect, it, vi } from "vitest"; -import { type GitStatusClient, createGitStatusManager } from "./gitStatusState"; +import { type GitStatusClient, createGitStatusManager } from "./gitStatusState.ts"; /* ─── Test helpers ──────────────────────────────────────────────────── */ diff --git a/packages/client-runtime/src/gitStatusState.ts b/packages/client-runtime/src/gitStatusState.ts index 6fb4faff7c..774801cab8 100644 --- a/packages/client-runtime/src/gitStatusState.ts +++ b/packages/client-runtime/src/gitStatusState.ts @@ -1,7 +1,7 @@ import type { GitManagerServiceError, GitStatusResult } from "@t3tools/contracts"; import type { Cause } from "effect"; import { Atom, type AtomRegistry } from "effect/unstable/reactivity"; -import type { WsRpcClient } from "./wsRpcClient"; +import type { WsRpcClient } from "./wsRpcClient.ts"; /* ─── Types ─────────────────────────────────────────────────────────── */ diff --git a/packages/client-runtime/src/reconnectBackoff.test.ts b/packages/client-runtime/src/reconnectBackoff.test.ts index 66047c16ae..b0a31d116f 100644 --- a/packages/client-runtime/src/reconnectBackoff.test.ts +++ b/packages/client-runtime/src/reconnectBackoff.test.ts @@ -4,7 +4,7 @@ import { DEFAULT_RECONNECT_BACKOFF, getReconnectDelayMs, type ReconnectBackoffConfig, -} from "./reconnectBackoff"; +} from "./reconnectBackoff.ts"; describe("getReconnectDelayMs", () => { it("returns exponential delays with default config", () => { diff --git a/packages/client-runtime/src/shellSnapshotReducer.test.ts b/packages/client-runtime/src/shellSnapshotReducer.test.ts index c1da3851e4..c3b2188b15 100644 --- a/packages/client-runtime/src/shellSnapshotReducer.test.ts +++ b/packages/client-runtime/src/shellSnapshotReducer.test.ts @@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest"; import { ProjectId, ThreadId } from "@t3tools/contracts"; import type { OrchestrationShellSnapshot, OrchestrationShellStreamEvent } from "@t3tools/contracts"; -import { applyShellStreamEvent } from "./shellSnapshotReducer"; +import { applyShellStreamEvent } from "./shellSnapshotReducer.ts"; const baseSnapshot: OrchestrationShellSnapshot = { snapshotSequence: 0, diff --git a/packages/client-runtime/src/shellSnapshotState.test.ts b/packages/client-runtime/src/shellSnapshotState.test.ts index 63137c74bd..c99ee17ebd 100644 --- a/packages/client-runtime/src/shellSnapshotState.test.ts +++ b/packages/client-runtime/src/shellSnapshotState.test.ts @@ -3,7 +3,7 @@ import { afterEach, describe, expect, it } from "vitest"; import { ProjectId, ThreadId, type OrchestrationShellSnapshot } from "@t3tools/contracts"; -import { createShellSnapshotManager } from "./shellSnapshotState"; +import { createShellSnapshotManager } from "./shellSnapshotState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/shellSnapshotState.ts b/packages/client-runtime/src/shellSnapshotState.ts index 166e838ab7..23aa984990 100644 --- a/packages/client-runtime/src/shellSnapshotState.ts +++ b/packages/client-runtime/src/shellSnapshotState.ts @@ -1,7 +1,7 @@ import type { OrchestrationShellSnapshot, OrchestrationShellStreamEvent } from "@t3tools/contracts"; import { Atom, type AtomRegistry } from "effect/unstable/reactivity"; -import { applyShellStreamEvent } from "./shellSnapshotReducer"; +import { applyShellStreamEvent } from "./shellSnapshotReducer.ts"; export interface ShellSnapshotState { readonly data: OrchestrationShellSnapshot | null; diff --git a/packages/client-runtime/src/terminalSessionState.test.ts b/packages/client-runtime/src/terminalSessionState.test.ts index 79d7c3157a..0a0f4c01fb 100644 --- a/packages/client-runtime/src/terminalSessionState.test.ts +++ b/packages/client-runtime/src/terminalSessionState.test.ts @@ -3,7 +3,7 @@ import { afterEach, describe, expect, it } from "vitest"; import type { TerminalSessionSnapshot } from "@t3tools/contracts"; -import { createTerminalSessionManager } from "./terminalSessionState"; +import { createTerminalSessionManager } from "./terminalSessionState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/threadDetailReducer.test.ts b/packages/client-runtime/src/threadDetailReducer.test.ts index 287177e22e..6770b697c6 100644 --- a/packages/client-runtime/src/threadDetailReducer.test.ts +++ b/packages/client-runtime/src/threadDetailReducer.test.ts @@ -11,7 +11,7 @@ import { } from "@t3tools/contracts"; import type { OrchestrationEvent, OrchestrationThread } from "@t3tools/contracts"; -import { applyThreadDetailEvent } from "./threadDetailReducer"; +import { applyThreadDetailEvent } from "./threadDetailReducer.ts"; const baseEventFields = { eventId: EventId.make("event-1"), diff --git a/packages/client-runtime/src/threadDetailState.test.ts b/packages/client-runtime/src/threadDetailState.test.ts index a4f393b5f3..c6b73b24fe 100644 --- a/packages/client-runtime/src/threadDetailState.test.ts +++ b/packages/client-runtime/src/threadDetailState.test.ts @@ -11,7 +11,7 @@ import { type OrchestrationThreadStreamItem, } from "@t3tools/contracts"; -import { createThreadDetailManager, type ThreadDetailClient } from "./threadDetailState"; +import { createThreadDetailManager, type ThreadDetailClient } from "./threadDetailState.ts"; let atomRegistry = AtomRegistry.make(); diff --git a/packages/client-runtime/src/threadDetailState.ts b/packages/client-runtime/src/threadDetailState.ts index 606e72cf43..1e9b6317be 100644 --- a/packages/client-runtime/src/threadDetailState.ts +++ b/packages/client-runtime/src/threadDetailState.ts @@ -13,8 +13,8 @@ import { DEFAULT_THREAD_DETAIL_LIMITS, applyThreadDetailEvent, type ThreadDetailRetentionLimits, -} from "./threadDetailReducer"; -import type { WsRpcClient } from "./wsRpcClient"; +} from "./threadDetailReducer.ts"; +import type { WsRpcClient } from "./wsRpcClient.ts"; export interface ThreadDetailState { readonly data: OrchestrationThread | null; diff --git a/packages/client-runtime/src/transportError.test.ts b/packages/client-runtime/src/transportError.test.ts index 0e9e59b517..fee40a773a 100644 --- a/packages/client-runtime/src/transportError.test.ts +++ b/packages/client-runtime/src/transportError.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { isTransportConnectionErrorMessage, sanitizeThreadErrorMessage } from "./transportError"; +import { isTransportConnectionErrorMessage, sanitizeThreadErrorMessage } from "./transportError.ts"; describe("isTransportConnectionErrorMessage", () => { it("returns true for SocketCloseError", () => { diff --git a/packages/client-runtime/src/wsRpcClient.ts b/packages/client-runtime/src/wsRpcClient.ts index 6fc682f3bb..1fc705dc8e 100644 --- a/packages/client-runtime/src/wsRpcClient.ts +++ b/packages/client-runtime/src/wsRpcClient.ts @@ -12,8 +12,8 @@ import { import { applyGitStatusStreamEvent } from "@t3tools/shared/git"; import { Effect, Stream } from "effect"; -import { type WsRpcProtocolClient } from "./wsRpcProtocol"; -import { WsTransport } from "./wsTransport"; +import { type WsRpcProtocolClient } from "./wsRpcProtocol.ts"; +import { WsTransport } from "./wsTransport.ts"; type RpcTag = keyof WsRpcProtocolClient & string; type RpcMethod = WsRpcProtocolClient[TTag]; diff --git a/packages/client-runtime/src/wsRpcProtocol.ts b/packages/client-runtime/src/wsRpcProtocol.ts index 6293dc30f1..3f62f037dd 100644 --- a/packages/client-runtime/src/wsRpcProtocol.ts +++ b/packages/client-runtime/src/wsRpcProtocol.ts @@ -7,7 +7,7 @@ import { DEFAULT_RECONNECT_BACKOFF, getReconnectDelayMs, type ReconnectBackoffConfig, -} from "./reconnectBackoff"; +} from "./reconnectBackoff.ts"; export interface WsProtocolLifecycleHandlers { readonly onAttempt?: (socketUrl: string) => void; diff --git a/packages/client-runtime/src/wsTransport.ts b/packages/client-runtime/src/wsTransport.ts index 78fbe9094f..d83d51d12e 100644 --- a/packages/client-runtime/src/wsTransport.ts +++ b/packages/client-runtime/src/wsTransport.ts @@ -1,14 +1,14 @@ import { Cause, Duration, Effect, Exit, ManagedRuntime, Scope, Stream } from "effect"; import { RpcClient } from "effect/unstable/rpc"; -import { isTransportConnectionErrorMessage } from "./transportError"; +import { isTransportConnectionErrorMessage } from "./transportError.ts"; import { createWsRpcProtocolLayer, makeWsRpcProtocolClient, type WsProtocolLifecycleHandlers, type WsRpcProtocolClient, type WsRpcProtocolSocketUrlProvider, -} from "./wsRpcProtocol"; +} from "./wsRpcProtocol.ts"; interface SubscribeOptions { readonly retryDelay?: Duration.Input; diff --git a/packages/shared/src/remote.test.ts b/packages/shared/src/remote.test.ts index 916e6d77c0..0a94c709ca 100644 --- a/packages/shared/src/remote.test.ts +++ b/packages/shared/src/remote.test.ts @@ -7,7 +7,7 @@ import { issueRemoteWebSocketToken, resolveRemotePairingTarget, resolveRemoteWebSocketConnectionUrl, -} from "./remote"; +} from "./remote.ts"; const originalFetch = globalThis.fetch;