@devries-cameron20 / t3code Mirror · read-only / commits / aca3c87cdb
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 23:00 UTC

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

Julius Marminge committed Sep 22, 2026 at 20:54 UTC aca3c87cdbfb59ea5ed52fe2df82df508d57eb31
6 files changed +10 -42
apps/mobile/src/features/home/HomeScreen.tsx
+3 -3
@@ -924,9 +924,9 @@ export function HomeScreen(props: HomeScreenProps) {
924 : "flex-1 bg-screen"
925 }
926 >
927 - {/* Same recycler the iPad sidebar and the legacy list use: cells are
928 - reused across data rebuilds and `itemsAreEqual` keeps a minute tick
929 - (or an unrelated shell update) from re-rendering untouched rows. */}
927 + {/* Shared with the iPad sidebar: cells are reused across data
928 + rebuilds and `itemsAreEqual` keeps a minute tick (or an unrelated
929 + shell update) from re-rendering untouched rows. */}
930 <SwipeableScrollGateProvider enabled={swipeEnabled}>
931 <LegendList
932 data={threadListV2Items}
apps/mobile/src/features/home/home-list-options.ts
+2 -15
@@ -1,12 +1,5 @@
1 -import type {
2 - EnvironmentId,
3 - SidebarProjectGroupingMode,
4 - SidebarThreadSortOrder,
5 -} from "@t3tools/contracts";
6 -import {
7 - DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
8 - DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
9 -} from "@t3tools/contracts";
1 +import type { EnvironmentId, SidebarProjectGroupingMode } from "@t3tools/contracts";
2 +import { DEFAULT_SIDEBAR_PROJECT_SORT_ORDER } from "@t3tools/contracts";
3 import {
4 createContext,
5 createElement,
@@ -24,7 +17,6 @@ import type { HomeProjectSortOrder } from "./homeThreadList";
17 export interface HomeListOptions {
18 readonly selectedEnvironmentId: EnvironmentId | null;
19 readonly projectSortOrder: HomeProjectSortOrder;
27 - readonly threadSortOrder: SidebarThreadSortOrder;
20 }
21
22 export interface ResolvedHomeListOptions extends HomeListOptions {
@@ -38,7 +30,6 @@ function defaultHomeListOptions(): HomeListOptions {
30 DEFAULT_SIDEBAR_PROJECT_SORT_ORDER === "manual"
31 ? "updated_at"
32 : DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
41 - threadSortOrder: DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
33 };
34 }
35
@@ -90,13 +81,9 @@ export function useHomeListOptions(availableEnvironmentIds: ReadonlySet<Environm
81 const setProjectSortOrder = useCallback((value: HomeProjectSortOrder) => {
82 setOptions((current) => ({ ...current, projectSortOrder: value }));
83 }, []);
93 - const setThreadSortOrder = useCallback((value: SidebarThreadSortOrder) => {
94 - setOptions((current) => ({ ...current, threadSortOrder: value }));
95 - }, []);
84 return {
85 options: resolvedOptions,
86 setSelectedEnvironmentId,
87 setProjectSortOrder,
100 - setThreadSortOrder,
88 } as const;
89 }
apps/mobile/src/features/home/homeThreadList.test.ts
-3
@@ -2,7 +2,6 @@ import type {
2 EnvironmentProject,
3 EnvironmentThreadShell,
4 } from "@t3tools/client-runtime/state/shell";
5 -import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
5 import { EnvironmentId, ProjectId, ProviderInstanceId, ThreadId } from "@t3tools/contracts";
6 import { describe, expect, it } from "vite-plus/test";
7
@@ -48,8 +47,6 @@ function makeThread(
47 };
48 }
49
51 -const NOW = Date.parse("2026-06-29T00:00:00.000Z");
52 -
50 describe("home project scopes", () => {
51 it("builds one v2 scope for the same repository across environments", () => {
52 const localEnvironmentId = EnvironmentId.make("environment-local");
apps/mobile/src/features/home/homeThreadList.ts
+2 -19
@@ -1,31 +1,22 @@
1 -import { threadPullRequestSearchTerms } from "@t3tools/shared/threadPullRequests";
2 -import {
3 - buildProjectGroups,
4 - derivePhysicalProjectKey,
5 - deriveProjectGroupLabel,
6 -} from "@t3tools/client-runtime/state/project-grouping";
1 +import { buildProjectGroups } from "@t3tools/client-runtime/state/project-grouping";
2 import type {
3 EnvironmentProject,
4 EnvironmentThreadShell,
5 } from "@t3tools/client-runtime/state/shell";
6 import {
7 getThreadSortTimestamp,
13 - sortThreads,
8 toSortableTimestamp,
9 } from "@t3tools/client-runtime/state/thread-sort";
16 -import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
10 import type {
11 EnvironmentId,
12 ScopedProjectRef,
13 SidebarProjectGroupingMode,
14 SidebarProjectSortOrder,
22 - SidebarThreadSortOrder,
15 } from "@t3tools/contracts";
16 import * as Arr from "effect/Array";
25 -import * as Option from "effect/Option";
17 import * as Order from "effect/Order";
18
28 -import { scopedProjectKey, scopedThreadKey } from "../../lib/scopedEntities";
19 +import { scopedProjectKey } from "../../lib/scopedEntities";
20 import type { PendingNewTask } from "../../state/use-pending-new-tasks";
21
22 export type HomeProjectSortOrder = Exclude<SidebarProjectSortOrder, "manual">;
@@ -133,11 +124,3 @@ export function sortHomeProjectScopes(input: {
124 ),
125 );
126 }
136 -
137 -/**
138 - * Default home view only surfaces threads active within this window, to keep the
139 - * screen compact while keeping recent work visible.
140 - */
141 -const RECENT_THREAD_WINDOW_MS = 5 * 24 * 60 * 60 * 1000;
142 -/** Fallback when a project has no threads inside the recency window. */
143 -const RECENT_THREAD_FALLBACK_COUNT = 3;
apps/mobile/src/features/threads/threadListV2.test.ts
-1
@@ -5,7 +5,6 @@ import {
5 threadOrderAfterMove,
6 threadDropLifecycle,
7 reconcilePendingThreadOrder,
8 - computeThreadMoveAvailability,
8 type PendingThreadOrder,
9 type ThreadMoveAvailability,
10 } from "./threadOrder";
packages/contracts/src/settings.ts
+3 -1
@@ -58,7 +58,9 @@ export const DEFAULT_SIDEBAR_PROJECT_SORT_ORDER: SidebarProjectSortOrder = "upda
58
59 export const SidebarThreadSortOrder = Schema.Literals(["updated_at", "created_at"]);
60 export type SidebarThreadSortOrder = typeof SidebarThreadSortOrder.Type;
61 -export const DEFAULT_SIDEBAR_THREAD_SORT_ORDER: SidebarThreadSortOrder = "updated_at";
61 +// Not exported: mobile was the last consumer of the value itself; the
62 +// wire field keeps its decoding default below.
63 +const DEFAULT_SIDEBAR_THREAD_SORT_ORDER: SidebarThreadSortOrder = "updated_at";
64
65 export const SidebarProjectGroupingMode = Schema.Literals([
66 "repository",