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) {
924924 : "flex-1 bg-screen"
925925 }
926926 >
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. */}
930930 <SwipeableScrollGateProvider enabled={swipeEnabled}>
931931 <LegendList
932932 data={threadListV2Items}
apps/mobile/src/features/home/home-list-options.ts+2-15
......@@ -1,12 +1,5 @@
1import type {
2 EnvironmentId,
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";
1import type { EnvironmentId, SidebarProjectGroupingMode } from "@t3tools/contracts";
2import { DEFAULT_SIDEBAR_PROJECT_SORT_ORDER } from "@t3tools/contracts";
103import {
114 createContext,
125 createElement,
......@@ -24,7 +17,6 @@ import type { HomeProjectSortOrder } from "./homeThreadList";
2417export interface HomeListOptions {
2518 readonly selectedEnvironmentId: EnvironmentId | null;
2619 readonly projectSortOrder: HomeProjectSortOrder;
27 readonly threadSortOrder: SidebarThreadSortOrder;
2820}
2921
3022export interface ResolvedHomeListOptions extends HomeListOptions {
......@@ -38,7 +30,6 @@ function defaultHomeListOptions(): HomeListOptions {
3830 DEFAULT_SIDEBAR_PROJECT_SORT_ORDER === "manual"
3931 ? "updated_at"
4032 : DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
41 threadSortOrder: DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
4233 };
4334}
4435
......@@ -90,13 +81,9 @@ export function useHomeListOptions(availableEnvironmentIds: ReadonlySet<Environm
9081 const setProjectSortOrder = useCallback((value: HomeProjectSortOrder) => {
9182 setOptions((current) => ({ ...current, projectSortOrder: value }));
9283 }, []);
93 const setThreadSortOrder = useCallback((value: SidebarThreadSortOrder) => {
94 setOptions((current) => ({ ...current, threadSortOrder: value }));
95 }, []);
9684 return {
9785 options: resolvedOptions,
9886 setSelectedEnvironmentId,
9987 setProjectSortOrder,
100 setThreadSortOrder,
10188 } as const;
10289}
apps/mobile/src/features/home/homeThreadList.test.ts-3
......@@ -2,7 +2,6 @@ import type {
22 EnvironmentProject,
33 EnvironmentThreadShell,
44} from "@t3tools/client-runtime/state/shell";
5import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
65import { EnvironmentId, ProjectId, ProviderInstanceId, ThreadId } from "@t3tools/contracts";
76import { describe, expect, it } from "vite-plus/test";
87
......@@ -48,8 +47,6 @@ function makeThread(
4847 };
4948}
5049
51const NOW = Date.parse("2026-06-29T00:00:00.000Z");
52
5350describe("home project scopes", () => {
5451 it("builds one v2 scope for the same repository across environments", () => {
5552 const localEnvironmentId = EnvironmentId.make("environment-local");
apps/mobile/src/features/home/homeThreadList.ts+2-19
......@@ -1,31 +1,22 @@
1import { threadPullRequestSearchTerms } from "@t3tools/shared/threadPullRequests";
2import {
3 buildProjectGroups,
4 derivePhysicalProjectKey,
5 deriveProjectGroupLabel,
6} from "@t3tools/client-runtime/state/project-grouping";
1import { buildProjectGroups } from "@t3tools/client-runtime/state/project-grouping";
72import type {
83 EnvironmentProject,
94 EnvironmentThreadShell,
105} from "@t3tools/client-runtime/state/shell";
116import {
127 getThreadSortTimestamp,
13 sortThreads,
148 toSortableTimestamp,
159} from "@t3tools/client-runtime/state/thread-sort";
16import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
1710import type {
1811 EnvironmentId,
1912 ScopedProjectRef,
2013 SidebarProjectGroupingMode,
2114 SidebarProjectSortOrder,
22 SidebarThreadSortOrder,
2315} from "@t3tools/contracts";
2416import * as Arr from "effect/Array";
25import * as Option from "effect/Option";
2617import * as Order from "effect/Order";
2718
28import { scopedProjectKey, scopedThreadKey } from "../../lib/scopedEntities";
19import { scopedProjectKey } from "../../lib/scopedEntities";
2920import type { PendingNewTask } from "../../state/use-pending-new-tasks";
3021
3122export type HomeProjectSortOrder = Exclude<SidebarProjectSortOrder, "manual">;
......@@ -133,11 +124,3 @@ export function sortHomeProjectScopes(input: {
133124 ),
134125 );
135126}
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 {
55 threadOrderAfterMove,
66 threadDropLifecycle,
77 reconcilePendingThreadOrder,
8 computeThreadMoveAvailability,
98 type PendingThreadOrder,
109 type ThreadMoveAvailability,
1110} from "./threadOrder";
packages/contracts/src/settings.ts+3-1
......@@ -58,7 +58,9 @@ export const DEFAULT_SIDEBAR_PROJECT_SORT_ORDER: SidebarProjectSortOrder = "upda
5858
5959export const SidebarThreadSortOrder = Schema.Literals(["updated_at", "created_at"]);
6060export 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
6365export const SidebarProjectGroupingMode = Schema.Literals([
6466 "repository",