fix(mobile): address review feedback

This commit is contained in:
Ben Davis committed 2026-06-26 15:26:57 -07:00
1 parent e61d5909ae
commit 03cebdff1d
4 files changed
+36 -7

No files matched your search

+8 -2
View File
@@ -11,10 +11,15 @@ const APP_VARIANT = resolveAppVariant(repoEnv.APP_VARIANT);
const isIosPersonalTeamBuild = repoEnv.T3CODE_IOS_PERSONAL_TEAM === "1";
const personalTeamBundleIdentifier = repoEnv.T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID?.trim();
const IOS_BUNDLE_IDENTIFIER_PATTERN = /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/;
if (isIosPersonalTeamBuild && !personalTeamBundleIdentifier) {
if (
isIosPersonalTeamBuild &&
(!personalTeamBundleIdentifier ||
!IOS_BUNDLE_IDENTIFIER_PATTERN.test(personalTeamBundleIdentifier))
) {
throw new Error(
"T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID is required when T3CODE_IOS_PERSONAL_TEAM=1.",
"T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID must be a reverse-DNS identifier such as com.example.t3code when T3CODE_IOS_PERSONAL_TEAM=1.",
);
}
@@ -176,6 +181,7 @@ const config: ExpoConfig = {
],
extra: {
appVariant: APP_VARIANT,
iosPersonalTeamBuild: isIosPersonalTeamBuild,
relay: {
url: repoEnv.T3CODE_RELAY_URL ?? null,
},
+16 -4
View File
@@ -1,4 +1,5 @@
import { useAuth, useUser } from "@clerk/expo";
import Constants from "expo-constants";
import * as Notifications from "expo-notifications";
import { Link, Stack, useRouter } from "expo-router";
import { SymbolView } from "expo-symbols";
@@ -74,6 +75,7 @@ function LocalSettingsRouteScreen() {
}
function ConfiguredSettingsRouteScreen() {
const isIosPersonalTeamBuild = Constants.expoConfig?.extra?.iosPersonalTeamBuild === true;
const insets = useSafeAreaInsets();
const { push } = useRouter();
const { expand: expandClerkSheet } = useClerkSettingsSheetDetent();
@@ -361,17 +363,27 @@ function ConfiguredSettingsRouteScreen() {
<SettingsSwitchRow
icon="bell.badge"
label="Device Notifications"
disabled={notificationStatus === "checking" || notificationStatus === "unsupported"}
value={notificationStatus === "enabled"}
disabled={
isIosPersonalTeamBuild ||
notificationStatus === "checking" ||
notificationStatus === "unsupported"
}
value={!isIosPersonalTeamBuild && notificationStatus === "enabled"}
onValueChange={handleDeviceNotificationsChange}
/>
<SettingsSwitchRow
disabled={
!isLoaded || liveActivityStatus === "checking" || liveActivityStatus === "linking"
isIosPersonalTeamBuild ||
!isLoaded ||
liveActivityStatus === "checking" ||
liveActivityStatus === "linking"
}
icon="bolt.circle"
label="Live Activity Updates"
value={liveActivityStatus === "enabled" || liveActivityStatus === "linking"}
value={
!isIosPersonalTeamBuild &&
(liveActivityStatus === "enabled" || liveActivityStatus === "linking")
}
onValueChange={handleLiveActivitiesChange}
/>
</SettingsSection>
+4
View File
@@ -116,6 +116,10 @@ export function SymbolView(props: SymbolViewProps) {
return <ExpoSymbolView {...props} />;
}
if (typeof props.name === "object" && props.name.android) {
return <ExpoSymbolView {...props} />;
}
const sfSymbol = typeof props.name === "string" ? props.name : props.name.ios;
const AndroidIcon = sfSymbol ? ANDROID_ICON_BY_SF_SYMBOL[sfSymbol] : undefined;
+8 -1
View File
@@ -10,9 +10,10 @@ import {
} from "@t3tools/contracts";
import type { MenuAction } from "@react-native-menu/menu";
import { Stack } from "expo-router";
import { useCallback, useMemo } from "react";
import { useCallback, useEffect, useMemo, useRef } from "react";
import { Platform, Pressable, Text as RNText, TextInput, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import type { SearchBarCommands } from "react-native-screens";
import { ControlPill, ControlPillMenu } from "../../components/ControlPill";
import { SymbolView } from "../../components/AppSymbol";
@@ -342,6 +343,7 @@ function AndroidHomeHeader(props: HomeHeaderProps) {
}
function IosHomeHeader(props: HomeHeaderProps) {
const searchBarRef = useRef<SearchBarCommands>(null);
const iconColor = useThemeColor("--color-icon");
const mutedColor = useThemeColor("--color-foreground-muted");
const subtleColor = useThemeColor("--color-subtle");
@@ -351,6 +353,10 @@ function IosHomeHeader(props: HomeHeaderProps) {
props.threadSortOrder !== DEFAULT_SIDEBAR_THREAD_SORT_ORDER ||
props.projectGroupingMode !== DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE;
useEffect(() => {
searchBarRef.current?.setText(props.searchQuery);
}, [props.searchQuery]);
return (
<>
<Stack.Screen
@@ -362,6 +368,7 @@ function IosHomeHeader(props: HomeHeaderProps) {
headerTintColor: iconColor,
headerTitle: "",
headerSearchBarOptions: {
ref: searchBarRef,
placeholder: "Search threads",
hideNavigationBar: false,
onChangeText: (event) => {