Skip to content
TypeScript

chore(mobile): clear the legacy-list deletion fallout (#13203)

Julius Marmingeaca3c87cdbfb
diff --git a/apps/mobile/src/features/home/HomeScreen.tsx b/apps/mobile/src/features/home/HomeScreen.tsx
index ed1eb2afdbe..4fb442b9427 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. */}
<SwipeableScrollGateProvider enabled={swipeEnabled}>
<LegendList
data={threadListV2Items}
diff --git a/apps/mobile/src/features/home/home-list-options.ts b/apps/mobile/src/features/home/home-list-options.ts
index 849fbda369f..d280c05ee0b 100644
--- a/apps/mobile/src/features/home/home-list-options.ts
+++ b/apps/mobile/src/features/home/home-list-options.ts
@@ -1,12 +1,5 @@
-import type {
- EnvironmentId,
- SidebarProjectGroupingMode,
- SidebarThreadSortOrder,
-} from "@t3tools/contracts";
-import {
- DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
- DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
-} from "@t3tools/contracts";
+import type { EnvironmentId, SidebarProjectGroupingMode } from "@t3tools/contracts";
+import { DEFAULT_SIDEBAR_PROJECT_SORT_ORDER } from "@t3tools/contracts";
import {
createContext,
createElement,
@@ -24,7 +17,6 @@ import type { HomeProjectSortOrder } from "./homeThreadList";
export interface HomeListOptions {
readonly selectedEnvironmentId: EnvironmentId | null;
readonly projectSortOrder: HomeProjectSortOrder;
- readonly threadSortOrder: SidebarThreadSortOrder;
}
export interface ResolvedHomeListOptions extends HomeListOptions {
@@ -38,7 +30,6 @@ function defaultHomeListOptions(): HomeListOptions {
DEFAULT_SIDEBAR_PROJECT_SORT_ORDER === "manual"
? "updated_at"
: DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
- threadSortOrder: DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
};
}
@@ -90,13 +81,9 @@ export function useHomeListOptions(availableEnvironmentIds: ReadonlySet<Environm
const setProjectSortOrder = useCallback((value: HomeProjectSortOrder) => {
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 32a17312479..98b32edfd74 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 e50a1494498..0c85972e43e 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<SidebarProjectSortOrder, "manual">;
@@ -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 3c010315515..4bbcf2233a4 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 504a9423f2a..3e301201910 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",