authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-22 20:54:08-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-23 03:54:08+00:00
logaca3c87cdbfb59ea5ed52fe2df82df508d57eb31
tree0036342451623717e188d8bab838bbc26aa9e531
parenteafb4a9340bd2c2271b7c8fac7eddd55beea3972
signature Signed by PGP key B5690EEEBB952194

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


6 files changed, 10 insertions(+), 42 deletions(-)

apps/mobile/src/features/home/HomeScreen.tsx+3-3
...@@ -924,9 +924,9 @@ export function HomeScreen(props: HomeScreenProps) {...@@ -924,9 +924,9 @@ export function HomeScreen(props: HomeScreenProps) {
924 : "flex-1 bg-screen"924 : "flex-1 bg-screen"
925 }925 }
926 >926 >
927 {/* Same recycler the iPad sidebar and the legacy list use: cells are927 {/* Shared with the iPad sidebar: cells are reused across data
928 reused across data rebuilds and `itemsAreEqual` keeps a minute tick928 rebuilds and `itemsAreEqual` keeps a minute tick (or an unrelated
929 (or an unrelated shell update) from re-rendering untouched rows. */}929 shell update) from re-rendering untouched rows. */}
930 <SwipeableScrollGateProvider enabled={swipeEnabled}>930 <SwipeableScrollGateProvider enabled={swipeEnabled}>
931 <LegendList931 <LegendList
932 data={threadListV2Items}932 data={threadListV2Items}
apps/mobile/src/features/home/home-list-options.ts+2-15
...@@ -1,12 +1,5 @@...@@ -1,12 +1,5 @@
1import type {1import type { EnvironmentId, SidebarProjectGroupingMode } from "@t3tools/contracts";
2 EnvironmentId,2import { DEFAULT_SIDEBAR_PROJECT_SORT_ORDER } from "@t3tools/contracts";
3 SidebarProjectGroupingMode,
4 SidebarThreadSortOrder,
5} from "@t3tools/contracts";
6import {
7 DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
8 DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
9} from "@t3tools/contracts";
10import {3import {
11 createContext,4 createContext,
12 createElement,5 createElement,
...@@ -24,7 +17,6 @@ import type { HomeProjectSortOrder } from "./homeThreadList";...@@ -24,7 +17,6 @@ import type { HomeProjectSortOrder } from "./homeThreadList";
24export interface HomeListOptions {17export interface HomeListOptions {
25 readonly selectedEnvironmentId: EnvironmentId | null;18 readonly selectedEnvironmentId: EnvironmentId | null;
26 readonly projectSortOrder: HomeProjectSortOrder;19 readonly projectSortOrder: HomeProjectSortOrder;
27 readonly threadSortOrder: SidebarThreadSortOrder;
28}20}
2921
30export interface ResolvedHomeListOptions extends HomeListOptions {22export interface ResolvedHomeListOptions extends HomeListOptions {
...@@ -38,7 +30,6 @@ function defaultHomeListOptions(): HomeListOptions {...@@ -38,7 +30,6 @@ function defaultHomeListOptions(): HomeListOptions {
38 DEFAULT_SIDEBAR_PROJECT_SORT_ORDER === "manual"30 DEFAULT_SIDEBAR_PROJECT_SORT_ORDER === "manual"
39 ? "updated_at"31 ? "updated_at"
40 : DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,32 : DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
41 threadSortOrder: DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
42 };33 };
43}34}
4435
...@@ -90,13 +81,9 @@ export function useHomeListOptions(availableEnvironmentIds: ReadonlySet<Environm...@@ -90,13 +81,9 @@ export function useHomeListOptions(availableEnvironmentIds: ReadonlySet<Environm
90 const setProjectSortOrder = useCallback((value: HomeProjectSortOrder) => {81 const setProjectSortOrder = useCallback((value: HomeProjectSortOrder) => {
91 setOptions((current) => ({ ...current, projectSortOrder: value }));82 setOptions((current) => ({ ...current, projectSortOrder: value }));
92 }, []);83 }, []);
93 const setThreadSortOrder = useCallback((value: SidebarThreadSortOrder) => {
94 setOptions((current) => ({ ...current, threadSortOrder: value }));
95 }, []);
96 return {84 return {
97 options: resolvedOptions,85 options: resolvedOptions,
98 setSelectedEnvironmentId,86 setSelectedEnvironmentId,
99 setProjectSortOrder,87 setProjectSortOrder,
100 setThreadSortOrder,
101 } as const;88 } as const;
102}89}
apps/mobile/src/features/home/homeThreadList.test.ts-3
...@@ -2,7 +2,6 @@ import type {...@@ -2,7 +2,6 @@ import type {
2 EnvironmentProject,2 EnvironmentProject,
3 EnvironmentThreadShell,3 EnvironmentThreadShell,
4} from "@t3tools/client-runtime/state/shell";4} from "@t3tools/client-runtime/state/shell";
5import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
6import { EnvironmentId, ProjectId, ProviderInstanceId, ThreadId } from "@t3tools/contracts";5import { EnvironmentId, ProjectId, ProviderInstanceId, ThreadId } from "@t3tools/contracts";
7import { describe, expect, it } from "vite-plus/test";6import { describe, expect, it } from "vite-plus/test";
87
...@@ -48,8 +47,6 @@ function makeThread(...@@ -48,8 +47,6 @@ function makeThread(
48 };47 };
49}48}
5049
51const NOW = Date.parse("2026-06-29T00:00:00.000Z");
52
53describe("home project scopes", () => {50describe("home project scopes", () => {
54 it("builds one v2 scope for the same repository across environments", () => {51 it("builds one v2 scope for the same repository across environments", () => {
55 const localEnvironmentId = EnvironmentId.make("environment-local");52 const localEnvironmentId = EnvironmentId.make("environment-local");
apps/mobile/src/features/home/homeThreadList.ts+2-19
...@@ -1,31 +1,22 @@...@@ -1,31 +1,22 @@
1import { threadPullRequestSearchTerms } from "@t3tools/shared/threadPullRequests";1import { buildProjectGroups } from "@t3tools/client-runtime/state/project-grouping";
2import {
3 buildProjectGroups,
4 derivePhysicalProjectKey,
5 deriveProjectGroupLabel,
6} from "@t3tools/client-runtime/state/project-grouping";
7import type {2import type {
8 EnvironmentProject,3 EnvironmentProject,
9 EnvironmentThreadShell,4 EnvironmentThreadShell,
10} from "@t3tools/client-runtime/state/shell";5} from "@t3tools/client-runtime/state/shell";
11import {6import {
12 getThreadSortTimestamp,7 getThreadSortTimestamp,
13 sortThreads,
14 toSortableTimestamp,8 toSortableTimestamp,
15} from "@t3tools/client-runtime/state/thread-sort";9} from "@t3tools/client-runtime/state/thread-sort";
16import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
17import type {10import type {
18 EnvironmentId,11 EnvironmentId,
19 ScopedProjectRef,12 ScopedProjectRef,
20 SidebarProjectGroupingMode,13 SidebarProjectGroupingMode,
21 SidebarProjectSortOrder,14 SidebarProjectSortOrder,
22 SidebarThreadSortOrder,
23} from "@t3tools/contracts";15} from "@t3tools/contracts";
24import * as Arr from "effect/Array";16import * as Arr from "effect/Array";
25import * as Option from "effect/Option";
26import * as Order from "effect/Order";17import * as Order from "effect/Order";
2718
28import { scopedProjectKey, scopedThreadKey } from "../../lib/scopedEntities";19import { scopedProjectKey } from "../../lib/scopedEntities";
29import type { PendingNewTask } from "../../state/use-pending-new-tasks";20import type { PendingNewTask } from "../../state/use-pending-new-tasks";
3021
31export type HomeProjectSortOrder = Exclude<SidebarProjectSortOrder, "manual">;22export type HomeProjectSortOrder = Exclude<SidebarProjectSortOrder, "manual">;
...@@ -133,11 +124,3 @@ export function sortHomeProjectScopes(input: {...@@ -133,11 +124,3 @@ export function sortHomeProjectScopes(input: {
133 ),124 ),
134 );125 );
135}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 */
141const RECENT_THREAD_WINDOW_MS = 5 * 24 * 60 * 60 * 1000;
142/** Fallback when a project has no threads inside the recency window. */
143const RECENT_THREAD_FALLBACK_COUNT = 3;
apps/mobile/src/features/threads/threadListV2.test.ts-1
...@@ -5,7 +5,6 @@ import {...@@ -5,7 +5,6 @@ import {
5 threadOrderAfterMove,5 threadOrderAfterMove,
6 threadDropLifecycle,6 threadDropLifecycle,
7 reconcilePendingThreadOrder,7 reconcilePendingThreadOrder,
8 computeThreadMoveAvailability,
9 type PendingThreadOrder,8 type PendingThreadOrder,
10 type ThreadMoveAvailability,9 type ThreadMoveAvailability,
11} from "./threadOrder";10} from "./threadOrder";
packages/contracts/src/settings.ts+3-1
...@@ -58,7 +58,9 @@ export const DEFAULT_SIDEBAR_PROJECT_SORT_ORDER: SidebarProjectSortOrder = "upda...@@ -58,7 +58,9 @@ export const DEFAULT_SIDEBAR_PROJECT_SORT_ORDER: SidebarProjectSortOrder = "upda
5858
59export const SidebarThreadSortOrder = Schema.Literals(["updated_at", "created_at"]);59export const SidebarThreadSortOrder = Schema.Literals(["updated_at", "created_at"]);
60export type SidebarThreadSortOrder = typeof SidebarThreadSortOrder.Type;60export type SidebarThreadSortOrder = typeof SidebarThreadSortOrder.Type;
61export 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.
63const DEFAULT_SIDEBAR_THREAD_SORT_ORDER: SidebarThreadSortOrder = "updated_at";
6264
63export const SidebarProjectGroupingMode = Schema.Literals([65export const SidebarProjectGroupingMode = Schema.Literals([
64 "repository",66 "repository",