TypeScript
refactor(mobile): keep project selection helper private (#9999)
Julius Marminge1e24b43d3f6e
diff --git a/apps/mobile/src/features/threads/new-task-project-selection.test.ts b/apps/mobile/src/features/threads/new-task-project-selection.test.tsindex 7068a95d558..2d52ed716d5 100644--- a/apps/mobile/src/features/threads/new-task-project-selection.test.ts+++ b/apps/mobile/src/features/threads/new-task-project-selection.test.ts@@ -4,7 +4,6 @@ import { describe, expect, it } from "vite-plus/test";import type { EnvironmentProject } from "@t3tools/client-runtime/state/shell";import type { HomeProjectScope } from "../home/homeThreadList";import {- getOnlySelectableProject,getProjectScopeSelectionTarget,resolveDraftProjectSelection,} from "./new-task-project-selection";@@ -36,18 +35,6 @@ function makeScope(projects: ReadonlyArray<EnvironmentProject>): HomeProjectScop};}-describe("getOnlySelectableProject", () => {- it("auto-selects when there is exactly one physical project", () => {- const project = makeProject("t3code");- expect(getOnlySelectableProject([makeScope([project])])).toBe(project);- });-- it("selects the representative when one logical project has multiple workspaces", () => {- const projects = [makeProject("t3code"), makeProject("t3code-2"), makeProject("t3code-3")];- expect(getOnlySelectableProject([makeScope(projects)])).toBe(projects[0]);- });-});-describe("getProjectScopeSelectionTarget", () => {it("keeps the current environment when it hosts the selected logical project", () => {const projects = [makeProject("t3code-mac", "mac"), makeProject("t3code-server", "server")];diff --git a/apps/mobile/src/features/threads/new-task-project-selection.ts b/apps/mobile/src/features/threads/new-task-project-selection.tsindex 7be899d62a1..0528dc66687 100644--- a/apps/mobile/src/features/threads/new-task-project-selection.ts+++ b/apps/mobile/src/features/threads/new-task-project-selection.ts@@ -19,7 +19,7 @@ export function getProjectScopeSelectionTarget();}-export function getOnlySelectableProject(+function getOnlySelectableProject(projectScopes: ReadonlyArray<HomeProjectScope>,): EnvironmentProject | null {const onlyScope = projectScopes.length === 1 ? projectScopes[0] : null;