Skip to content

Commit ada72ce

Browse files
fix: reconcile main updates with orchestration v2
Adapt question attachments and Android push verification to V2 requests and shell events. Preserve composer transitions and compact worklogs while integrating upstream loading, navigation, and mobile changes. Release consumed application replay pages without retaining earlier batches.
1 parent 071af8f commit ada72ce

55 files changed

Lines changed: 2538 additions & 1146 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/mobile/app.config.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const config: ExpoConfig = {
175175
slug: "t3-code",
176176
platforms: ["ios", "android"],
177177
scheme: variant.scheme,
178-
version: "1.1.0",
178+
version: "1.1.1",
179179
runtimeVersion: {
180180
// Development manifests resolve on every launch, so avoid fingerprint's
181181
// expensive native-project calculation there. Preview and production stay
@@ -186,7 +186,7 @@ const config: ExpoConfig = {
186186
icon: variant.assets.appIcon,
187187
userInterfaceStyle: "automatic",
188188
updates: {
189-
enabled: true,
189+
enabled: repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0",
190190
url: "https://u.expo.dev/d763fcb8-d37c-41ea-a773-b54a0ab4a454",
191191
checkAutomatically: "ON_LOAD",
192192
fallbackToCacheTimeout: 0,
@@ -237,6 +237,9 @@ const config: ExpoConfig = {
237237
android: {
238238
icon: variant.assets.appIcon,
239239
package: variant.androidPackage,
240+
...(repoEnv.T3CODE_ANDROID_GOOGLE_SERVICES_FILE
241+
? { googleServicesFile: repoEnv.T3CODE_ANDROID_GOOGLE_SERVICES_FILE }
242+
: {}),
240243
adaptiveIcon: {
241244
backgroundColor: variant.assets.androidAdaptiveBackgroundColor,
242245
...(variant.assets.androidAdaptiveBackgroundImage
@@ -356,6 +359,10 @@ const config: ExpoConfig = {
356359
[
357360
"expo-build-properties",
358361
{
362+
android: {
363+
// Keep the supported floor explicit and covered by native notification tests.
364+
minSdkVersion: 24,
365+
},
359366
ios: {
360367
deploymentTarget: "18.0",
361368
// AppCheckCore 11.3+ includes Swift and needs module maps for these Objective-C dependencies.

‎apps/mobile/src/features/home/HomeScreen.tsx‎

Lines changed: 126 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ThreadMoveDestination } from "../threads/threadOrder";
12
import { createThreadMovePlanner } from "../threads/threadOrder";
23
import {
34
LegendList,
@@ -26,6 +27,7 @@ import { ActivityIndicator, FlatList, Platform, Pressable, View } from "react-na
2627
import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
2728
import { useSafeAreaInsets } from "react-native-safe-area-context";
2829

30+
import { cn } from "../../lib/cn";
2931
import { AppText as Text } from "../../components/AppText";
3032
import { EmptyState } from "../../components/EmptyState";
3133
import type { WorkspaceEnvironment, WorkspaceState } from "../../state/workspaceModel";
@@ -34,6 +36,7 @@ import { scopedProjectKey } from "../../lib/scopedEntities";
3436
import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../native/native-glass";
3537
import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences";
3638
import { useThreadSearch } from "../../state/queries";
39+
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
3740
import { useThreadListV2Enabled } from "../threads/use-thread-list-v2-enabled";
3841
import { usePendingThreadOrder } from "../../state/thread-order";
3942
import { environmentServerConfigsAtom } from "../../state/server";
@@ -121,7 +124,7 @@ interface HomeScreenProps {
121124
readonly onUnpinThread: (thread: EnvironmentThreadShell) => Promise<boolean>;
122125
readonly onMoveThread: (
123126
thread: EnvironmentThreadShell,
124-
direction: "up" | "down",
127+
direction: ThreadMoveDestination,
125128
) => Promise<boolean>;
126129
readonly onRegenerateThreadTitle: (thread: EnvironmentThreadShell) => Promise<boolean>;
127130
readonly onSelectPendingTask: (pendingTask: PendingNewTask) => void;
@@ -211,6 +214,7 @@ function HomeTopContentSpacer() {
211214
/* ─── Main screen ────────────────────────────────────────────────────── */
212215

213216
export function HomeScreen(props: HomeScreenProps) {
217+
const { materialYouStyleLayoutActive } = useAppearancePreferences();
214218
const [groupDisplayStates, setGroupDisplayStates] = useState<
215219
ReadonlyMap<string, HomeGroupDisplayState>
216220
>(() => new Map());
@@ -517,7 +521,7 @@ export function HomeScreen(props: HomeScreenProps) {
517521
[props.onPinThread],
518522
);
519523
const handleMoveThread = useCallback(
520-
(thread: EnvironmentThreadShell, direction: "up" | "down") => {
524+
(thread: EnvironmentThreadShell, direction: ThreadMoveDestination) => {
521525
void props.onMoveThread(thread, direction);
522526
},
523527
[props.onMoveThread],
@@ -1086,26 +1090,31 @@ export function HomeScreen(props: HomeScreenProps) {
10861090

10871091
if (!hasAnyThreads) {
10881092
return (
1089-
<View
1090-
className="flex-1 items-center justify-center bg-screen px-8"
1091-
style={{
1092-
paddingBottom: Math.max(insets.bottom, 24) + iosBottomToolbarClearance,
1093-
paddingTop: NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + 72 : 0,
1094-
}}
1095-
>
1096-
<View className="w-full max-w-[430px]">
1097-
<EmptyState
1098-
title={emptyState.title}
1099-
detail={emptyState.detail}
1100-
actionLabel={!props.catalogState.hasReadyEnvironment ? "Add environment" : undefined}
1101-
onAction={!props.catalogState.hasReadyEnvironment ? props.onAddConnection : undefined}
1102-
variant="plain"
1103-
/>
1104-
{emptyState.loading ? (
1105-
<View className="mt-4 items-center">
1106-
<ActivityIndicator colorClassName={"accent-icon-muted"} />
1107-
</View>
1108-
) : null}
1093+
<View className={materialYouStyleLayoutActive ? "flex-1 bg-header" : "flex-1 bg-screen"}>
1094+
<View
1095+
className={cn(
1096+
"flex-1 items-center justify-center bg-screen px-8",
1097+
materialYouStyleLayoutActive && "overflow-hidden rounded-t-[28px]",
1098+
)}
1099+
style={{
1100+
paddingBottom: Math.max(insets.bottom, 24) + iosBottomToolbarClearance,
1101+
paddingTop: NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + 72 : 0,
1102+
}}
1103+
>
1104+
<View className="w-full max-w-[430px]">
1105+
<EmptyState
1106+
title={emptyState.title}
1107+
detail={emptyState.detail}
1108+
actionLabel={!props.catalogState.hasReadyEnvironment ? "Add environment" : undefined}
1109+
onAction={!props.catalogState.hasReadyEnvironment ? props.onAddConnection : undefined}
1110+
variant="plain"
1111+
/>
1112+
{emptyState.loading ? (
1113+
<View className="mt-4 items-center">
1114+
<ActivityIndicator colorClassName={"accent-icon-muted"} />
1115+
</View>
1116+
) : null}
1117+
</View>
11091118
</View>
11101119
</View>
11111120
);
@@ -1150,100 +1159,116 @@ export function HomeScreen(props: HomeScreenProps) {
11501159

11511160
if (threadListV2Enabled) {
11521161
return (
1153-
<View className="flex-1 bg-screen">
1162+
<View className={materialYouStyleLayoutActive ? "flex-1 bg-header" : "flex-1 bg-screen"}>
1163+
<View
1164+
className={
1165+
materialYouStyleLayoutActive
1166+
? "flex-1 overflow-hidden rounded-t-[28px] bg-screen"
1167+
: "flex-1 bg-screen"
1168+
}
1169+
>
1170+
<SwipeableScrollGateProvider enabled={swipeEnabled}>
1171+
<FlatList
1172+
data={threadListV2Items}
1173+
renderItem={renderV2Item}
1174+
keyExtractor={v2KeyExtractor}
1175+
extraData={v2ExtraData}
1176+
ListHeaderComponent={v2ListHeader}
1177+
ListFooterComponent={
1178+
settledShelfExpanded && threadListV2Layout.hiddenSettledCount > 0 ? (
1179+
<Pressable
1180+
accessibilityRole="button"
1181+
accessibilityLabel={`Show ${Math.min(threadListV2Layout.hiddenSettledCount, THREAD_LIST_V2_SETTLED_PAGE_COUNT)} more settled threads`}
1182+
onPress={showMoreSettled}
1183+
className="mx-4 mt-2 items-center rounded-lg border border-dashed border-border py-2.5"
1184+
style={({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })}
1185+
>
1186+
<Text className="text-xs font-t3-medium text-foreground-muted">
1187+
Show more ({threadListV2Layout.hiddenSettledCount} settled hidden)
1188+
</Text>
1189+
</Pressable>
1190+
) : null
1191+
}
1192+
ListEmptyComponent={v2ListEmpty}
1193+
style={{ flex: 1 }}
1194+
automaticallyAdjustsScrollIndicatorInsets={Platform.OS === "ios"}
1195+
contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
1196+
showsVerticalScrollIndicator={false}
1197+
keyboardDismissMode="on-drag"
1198+
keyboardShouldPersistTaps="handled"
1199+
{...scrollGateHandlers}
1200+
scrollEventThrottle={16}
1201+
contentContainerStyle={{
1202+
paddingBottom:
1203+
Platform.OS === "ios"
1204+
? Math.max(insets.bottom, 24) + 96 + iosBottomToolbarClearance
1205+
: Math.max(insets.bottom, 16) + 88,
1206+
}}
1207+
/>
1208+
</SwipeableScrollGateProvider>
1209+
</View>
1210+
</View>
1211+
);
1212+
}
1213+
1214+
return (
1215+
<View className={materialYouStyleLayoutActive ? "flex-1 bg-header" : "flex-1 bg-screen"}>
1216+
<View
1217+
className={
1218+
materialYouStyleLayoutActive
1219+
? "flex-1 overflow-hidden rounded-t-[28px] bg-screen"
1220+
: "flex-1 bg-screen"
1221+
}
1222+
>
1223+
{/* Sticky headers are deliberately not wired up: LegendList's JS sticky
1224+
implementation mispositions pinned headers at mount under iOS
1225+
automatic content insets (headers render one nav-inset too low until
1226+
the first scroll event) and blanks non-pinned headers after
1227+
collapse/expand data changes. The flattened layout still exposes
1228+
`stickyHeaderIndices` if this gets revisited. */}
11541229
<SwipeableScrollGateProvider enabled={swipeEnabled}>
1155-
<FlatList
1156-
data={threadListV2Items}
1157-
renderItem={renderV2Item}
1158-
keyExtractor={v2KeyExtractor}
1159-
extraData={v2ExtraData}
1160-
ListHeaderComponent={v2ListHeader}
1161-
ListFooterComponent={
1162-
settledShelfExpanded && threadListV2Layout.hiddenSettledCount > 0 ? (
1163-
<Pressable
1164-
accessibilityRole="button"
1165-
accessibilityLabel={`Show ${Math.min(threadListV2Layout.hiddenSettledCount, THREAD_LIST_V2_SETTLED_PAGE_COUNT)} more settled threads`}
1166-
onPress={showMoreSettled}
1167-
className="mx-4 mt-2 items-center rounded-lg border border-dashed border-border py-2.5"
1168-
style={({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })}
1169-
>
1170-
<Text className="text-xs font-t3-medium text-foreground-muted">
1171-
Show more ({threadListV2Layout.hiddenSettledCount} settled hidden)
1172-
</Text>
1173-
</Pressable>
1174-
) : null
1175-
}
1176-
ListEmptyComponent={v2ListEmpty}
1230+
<LegendList
1231+
ref={listRef}
1232+
data={listLayout.items}
1233+
renderItem={renderItem}
1234+
keyExtractor={keyExtractor}
1235+
itemsAreEqual={homeListItemsAreEqual}
1236+
drawDistance={500}
1237+
estimatedItemSize={ESTIMATED_THREAD_ROW_HEIGHT}
1238+
extraData={extraData}
1239+
ListHeaderComponent={listHeader}
1240+
ListEmptyComponent={listEmpty}
11771241
style={{ flex: 1 }}
1178-
automaticallyAdjustsScrollIndicatorInsets={Platform.OS === "ios"}
1179-
contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
1242+
automaticallyAdjustsScrollIndicatorInsets={NATIVE_LIQUID_GLASS_SUPPORTED}
1243+
contentInsetAdjustmentBehavior={NATIVE_LIQUID_GLASS_SUPPORTED ? "automatic" : "never"}
11801244
showsVerticalScrollIndicator={false}
11811245
keyboardDismissMode="on-drag"
11821246
keyboardShouldPersistTaps="handled"
11831247
{...scrollGateHandlers}
1248+
recycleItems
11841249
scrollEventThrottle={16}
11851250
contentContainerStyle={{
1251+
// Android reserves room for the floating new-task FAB
1252+
// (56 button + 16 gap + bottom inset). Pre-glass iOS shows a
1253+
// standard 44pt bottom toolbar that overlays the list and is not
1254+
// reflected in insets while contentInsetAdjustmentBehavior is
1255+
// "never".
11861256
paddingBottom:
11871257
Platform.OS === "ios"
1188-
? Math.max(insets.bottom, 24) + 96 + iosBottomToolbarClearance
1258+
? Math.max(insets.bottom, 24) + 24 + iosBottomToolbarClearance
11891259
: Math.max(insets.bottom, 16) + 88,
11901260
}}
1261+
scrollIndicatorInsets={
1262+
Platform.OS === "ios"
1263+
? {
1264+
bottom: Math.max(insets.bottom, 16) + 24 + iosBottomToolbarClearance,
1265+
top: 0,
1266+
}
1267+
: undefined
1268+
}
11911269
/>
11921270
</SwipeableScrollGateProvider>
11931271
</View>
1194-
);
1195-
}
1196-
1197-
return (
1198-
<View className="flex-1 bg-screen">
1199-
{/* Sticky headers are deliberately not wired up: LegendList's JS sticky
1200-
implementation mispositions pinned headers at mount under iOS
1201-
automatic content insets (headers render one nav-inset too low until
1202-
the first scroll event) and blanks non-pinned headers after
1203-
collapse/expand data changes. The flattened layout still exposes
1204-
`stickyHeaderIndices` if this gets revisited. */}
1205-
<SwipeableScrollGateProvider enabled={swipeEnabled}>
1206-
<LegendList
1207-
ref={listRef}
1208-
data={listLayout.items}
1209-
renderItem={renderItem}
1210-
keyExtractor={keyExtractor}
1211-
itemsAreEqual={homeListItemsAreEqual}
1212-
drawDistance={500}
1213-
estimatedItemSize={ESTIMATED_THREAD_ROW_HEIGHT}
1214-
extraData={extraData}
1215-
ListHeaderComponent={listHeader}
1216-
ListEmptyComponent={listEmpty}
1217-
style={{ flex: 1 }}
1218-
automaticallyAdjustsScrollIndicatorInsets={NATIVE_LIQUID_GLASS_SUPPORTED}
1219-
contentInsetAdjustmentBehavior={NATIVE_LIQUID_GLASS_SUPPORTED ? "automatic" : "never"}
1220-
showsVerticalScrollIndicator={false}
1221-
keyboardDismissMode="on-drag"
1222-
keyboardShouldPersistTaps="handled"
1223-
{...scrollGateHandlers}
1224-
recycleItems
1225-
scrollEventThrottle={16}
1226-
contentContainerStyle={{
1227-
// Android reserves room for the floating new-task FAB
1228-
// (56 button + 16 gap + bottom inset). Pre-glass iOS shows a
1229-
// standard 44pt bottom toolbar that overlays the list and is not
1230-
// reflected in insets while contentInsetAdjustmentBehavior is
1231-
// "never".
1232-
paddingBottom:
1233-
Platform.OS === "ios"
1234-
? Math.max(insets.bottom, 24) + 24 + iosBottomToolbarClearance
1235-
: Math.max(insets.bottom, 16) + 88,
1236-
}}
1237-
scrollIndicatorInsets={
1238-
Platform.OS === "ios"
1239-
? {
1240-
bottom: Math.max(insets.bottom, 16) + 24 + iosBottomToolbarClearance,
1241-
top: 0,
1242-
}
1243-
: undefined
1244-
}
1245-
/>
1246-
</SwipeableScrollGateProvider>
12471272
</View>
12481273
);
12491274
}

0 commit comments

Comments
 (0)