diff --git a/apps/mobile/src/features/home/HomeScreen.tsx b/apps/mobile/src/features/home/HomeScreen.tsx index ed1eb2afdbeb9a963f905ece059b4931f102f7f7..4fb442b942737d86582e4c28f9d90999ecebe473 100644 --- a/apps/mobile/src/features/home/HomeScreen.tsx +++ b/apps/mobile/src/features/home/HomeScreen.tsx @@ -924,9 +924,9 @@ export function HomeScreen(props: HomeScreenProps) { : "flex-1 bg-screen" } > - {/* Same recycler the iPad sidebar and the legacy list use: cells are - reused across data rebuilds and `itemsAreEqual` keeps a minute tick - (or an unrelated shell update) from re-rendering untouched rows. */} + {/* Shared with the iPad sidebar: cells are reused across data + rebuilds and `itemsAreEqual` keeps a minute tick (or an unrelated + shell update) from re-rendering untouched rows. */} { setOptions((current) => ({ ...current, projectSortOrder: value })); }, []); - const setThreadSortOrder = useCallback((value: SidebarThreadSortOrder) => { - setOptions((current) => ({ ...current, threadSortOrder: value })); - }, []); return { options: resolvedOptions, setSelectedEnvironmentId, setProjectSortOrder, - setThreadSortOrder, } as const; } diff --git a/apps/mobile/src/features/home/homeThreadList.test.ts b/apps/mobile/src/features/home/homeThreadList.test.ts index 32a17312479314723b0d94a9272704a3e84f1bef..98b32edfd748bb0f5c7780b567b356b7555d1301 100644 --- a/apps/mobile/src/features/home/homeThreadList.test.ts +++ b/apps/mobile/src/features/home/homeThreadList.test.ts @@ -2,7 +2,6 @@ import type { EnvironmentProject, EnvironmentThreadShell, } from "@t3tools/client-runtime/state/shell"; -import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search"; import { EnvironmentId, ProjectId, ProviderInstanceId, ThreadId } from "@t3tools/contracts"; import { describe, expect, it } from "vite-plus/test"; @@ -48,8 +47,6 @@ function makeThread( }; } -const NOW = Date.parse("2026-06-29T00:00:00.000Z"); - describe("home project scopes", () => { it("builds one v2 scope for the same repository across environments", () => { const localEnvironmentId = EnvironmentId.make("environment-local"); diff --git a/apps/mobile/src/features/home/homeThreadList.ts b/apps/mobile/src/features/home/homeThreadList.ts index e50a14944983ff2e8a92a6280d318822b3634724..0c85972e43e528e688e9899d7fc0eb538c1873b9 100644 --- a/apps/mobile/src/features/home/homeThreadList.ts +++ b/apps/mobile/src/features/home/homeThreadList.ts @@ -1,31 +1,22 @@ -import { threadPullRequestSearchTerms } from "@t3tools/shared/threadPullRequests"; -import { - buildProjectGroups, - derivePhysicalProjectKey, - deriveProjectGroupLabel, -} from "@t3tools/client-runtime/state/project-grouping"; +import { buildProjectGroups } from "@t3tools/client-runtime/state/project-grouping"; import type { EnvironmentProject, EnvironmentThreadShell, } from "@t3tools/client-runtime/state/shell"; import { getThreadSortTimestamp, - sortThreads, toSortableTimestamp, } from "@t3tools/client-runtime/state/thread-sort"; -import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search"; import type { EnvironmentId, ScopedProjectRef, SidebarProjectGroupingMode, SidebarProjectSortOrder, - SidebarThreadSortOrder, } from "@t3tools/contracts"; import * as Arr from "effect/Array"; -import * as Option from "effect/Option"; import * as Order from "effect/Order"; -import { scopedProjectKey, scopedThreadKey } from "../../lib/scopedEntities"; +import { scopedProjectKey } from "../../lib/scopedEntities"; import type { PendingNewTask } from "../../state/use-pending-new-tasks"; export type HomeProjectSortOrder = Exclude; @@ -133,11 +124,3 @@ export function sortHomeProjectScopes(input: { ), ); } - -/** - * Default home view only surfaces threads active within this window, to keep the - * screen compact while keeping recent work visible. - */ -const RECENT_THREAD_WINDOW_MS = 5 * 24 * 60 * 60 * 1000; -/** Fallback when a project has no threads inside the recency window. */ -const RECENT_THREAD_FALLBACK_COUNT = 3; diff --git a/apps/mobile/src/features/threads/threadListV2.test.ts b/apps/mobile/src/features/threads/threadListV2.test.ts index 3c010315515b982f930e2153f913c0a81dce39a4..4bbcf2233a42c0b633c0ca34374234afaa3b5657 100644 --- a/apps/mobile/src/features/threads/threadListV2.test.ts +++ b/apps/mobile/src/features/threads/threadListV2.test.ts @@ -5,7 +5,6 @@ import { threadOrderAfterMove, threadDropLifecycle, reconcilePendingThreadOrder, - computeThreadMoveAvailability, type PendingThreadOrder, type ThreadMoveAvailability, } from "./threadOrder"; diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts index 504a9423f2a37040cd30cd5c26b34c6a19c2427a..3e301201910cb8879d0efca58b340c3c5180a9fb 100644 --- a/packages/contracts/src/settings.ts +++ b/packages/contracts/src/settings.ts @@ -58,7 +58,9 @@ export const DEFAULT_SIDEBAR_PROJECT_SORT_ORDER: SidebarProjectSortOrder = "upda export const SidebarThreadSortOrder = Schema.Literals(["updated_at", "created_at"]); export type SidebarThreadSortOrder = typeof SidebarThreadSortOrder.Type; -export const DEFAULT_SIDEBAR_THREAD_SORT_ORDER: SidebarThreadSortOrder = "updated_at"; +// Not exported: mobile was the last consumer of the value itself; the +// wire field keeps its decoding default below. +const DEFAULT_SIDEBAR_THREAD_SORT_ORDER: SidebarThreadSortOrder = "updated_at"; export const SidebarProjectGroupingMode = Schema.Literals([ "repository",