Compare commits

..
Author SHA1 Message Date
Ben DavisandClaude Fable 5 67aedfcc2b style(mobile): fix formatting in new/_layout.tsx
Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-02 04:11:16 -07:00
Ben DavisandClaude Fable 5 d327c77e10 refactor(mobile): share push animation, cover missed transparent headers
Review follow-ups:
- Extract the iOS push-animation choice into lib/pushScreenAnimation and
  use it in every stack that pushed with slide_from_right (root, thread,
  git, settings, connections, new) so the black-void workaround cannot
  drift between files.
- Apply useHeaderBlurEffect to the two transparent headers the first
  pass missed: the review sheet and the files tree screen.
- Drop String() around ColorValue contentStyle backgrounds; an
  unresolved CSS variable would otherwise stringify to the invalid
  color "undefined" instead of a harmless no-op.
- Document why the terminal screen intentionally omits
  fullScreenGestureEnabled.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-02 04:04:58 -07:00
Ben DavisandClaude Fable 5 e03abb3a61 fix(mobile): dark header blur and remove black void on swipe-back
The trait-adaptive systemChromeMaterial blur resolves to its light
variant on the new iOS beta even while the app renders dark, washing
the header out white. Pick systemChromeMaterialLight/Dark explicitly
from the app color scheme via a shared useHeaderBlurEffect hook.

The black void revealed behind the outgoing screen during swipe-back
came from the custom slide_from_right animator combined with
transparent screen content. Keep the native default push animation on
iOS (identical look, proper parallax with the previous screen visible
underneath) and give stack screens an opaque themed background.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-02 03:51:20 -07:00
Ben DavisandClaude Fable 5 bfbc14ce3c fix(mobile): restore header blur and reliable swipe-back on iOS beta
Recent iOS betas stopped drawing the implicit blur behind transparent
navigation bars, leaving white header text over raw scrolling content.
Set headerBlurEffect: systemChromeMaterial explicitly on the three
transparent headers (home, thread detail, thread index layout).

Swipe-back was also unreliable on thread detail: the drawer-open pan
gesture's hit slop covered the entire left edge, stealing touches from
the native interactive-pop gesture below the header. Confine that pan
to the top strip where it can actually complete, and enable
fullScreenGestureEnabled on the thread, review, and files screens so
back-swipe works from anywhere on the screen.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-02 03:50:19 -07:00
26 changed files with 566 additions and 1142 deletions

No files matched your search

-24
View File
@@ -34,30 +34,6 @@ Build and run the local iOS dev client:
vp run ios:dev
```
If your Xcode account only has a Personal Team, use a bundle identifier you control and opt into the
reduced-capability local build. Personal Team builds omit the widget extension, push entitlement, and
native Sign in with Apple entitlement; builds without this opt-in are unchanged.
```bash
T3CODE_IOS_PERSONAL_TEAM=1 \
T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code.dev \
vp run ios:dev
```
Build and install a self-contained Release app that does not need Metro:
```bash
vp run ios:release
```
The Personal Team equivalent also needs a unique bundle identifier:
```bash
T3CODE_IOS_PERSONAL_TEAM=1 \
T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code \
vp run ios:release
```
Build and run the local iOS preview app:
```bash
+18 -41
View File
@@ -8,20 +8,6 @@ const repoEnv = loadRepoEnv();
Object.assign(process.env, repoEnv);
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 ||
!IOS_BUNDLE_IDENTIFIER_PATTERN.test(personalTeamBundleIdentifier))
) {
throw new Error(
"T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID must be a reverse-DNS identifier such as com.example.t3code when T3CODE_IOS_PERSONAL_TEAM=1.",
);
}
const VARIANT_CONFIG: Record<
AppVariant,
@@ -68,27 +54,6 @@ function resolveAppVariant(value: string | undefined): AppVariant {
}
const variant = VARIANT_CONFIG[APP_VARIANT];
const iosBundleIdentifier =
isIosPersonalTeamBuild && personalTeamBundleIdentifier
? personalTeamBundleIdentifier
: variant.iosBundleIdentifier;
const widgetsPlugin = [
"expo-widgets",
{
bundleIdentifier: `${iosBundleIdentifier}.widgets`,
groupIdentifier: `group.${iosBundleIdentifier}`,
enablePushNotifications: true,
widgets: [
{
name: "AgentActivity",
displayName: "Agent Activity",
description: "Shows the current state of active T3 Code agents.",
supportedFamilies: ["systemSmall", "systemMedium", "accessoryRectangular"],
},
],
},
] satisfies NonNullable<ExpoConfig["plugins"]>[number];
const config: ExpoConfig = {
name: variant.appName,
@@ -111,7 +76,7 @@ const config: ExpoConfig = {
ios: {
icon: variant.iosIcon,
supportsTablet: true,
bundleIdentifier: iosBundleIdentifier,
bundleIdentifier: variant.iosBundleIdentifier,
infoPlist: {
NSAppTransportSecurity: {
NSAllowsArbitraryLoads: true,
@@ -137,10 +102,9 @@ const config: ExpoConfig = {
},
plugins: [
"expo-router",
"expo-asset",
"expo-font",
"expo-secure-store",
["@clerk/expo", { theme: "./clerk-theme.json", appleSignIn: !isIosPersonalTeamBuild }],
["@clerk/expo", { theme: "./clerk-theme.json" }],
"expo-web-browser",
[
"expo-camera",
@@ -175,13 +139,26 @@ const config: ExpoConfig = {
},
},
],
...(!isIosPersonalTeamBuild ? [widgetsPlugin] : []),
[
"expo-widgets",
{
bundleIdentifier: `${variant.iosBundleIdentifier}.widgets`,
groupIdentifier: `group.${variant.iosBundleIdentifier}`,
enablePushNotifications: true,
widgets: [
{
name: "AgentActivity",
displayName: "Agent Activity",
description: "Shows the current state of active T3 Code agents.",
supportedFamilies: ["systemSmall", "systemMedium", "accessoryRectangular"],
},
],
},
],
"./plugins/withAndroidCleartextTraffic.cjs",
...(isIosPersonalTeamBuild ? ["./plugins/withoutIosPersonalTeamCapabilities.cjs"] : []),
],
extra: {
appVariant: APP_VARIANT,
iosPersonalTeamBuild: isIosPersonalTeamBuild,
relay: {
url: repoEnv.T3CODE_RELAY_URL ?? null,
},
+18 -20
View File
@@ -22,7 +22,6 @@
"ios:dev": "APP_VARIANT=development EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:preview": "APP_VARIANT=preview EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:prod": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:release": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios --configuration Release --no-bundler",
"eas:ios:dev": "eas build --profile development -p ios",
"eas:ios:preview": "eas build --profile preview -p ios",
"eas:ios:preview:dev": "eas build --profile preview:dev -p ios",
@@ -44,7 +43,7 @@
"@clerk/expo": "catalog:",
"@effect/atom-react": "catalog:",
"@expo-google-fonts/dm-sans": "^0.4.2",
"@expo/ui": "~56.0.18",
"@expo/ui": "~56.0.8",
"@legendapp/list": "3.2.0",
"@noble/curves": "catalog:",
"@noble/hashes": "catalog:",
@@ -60,35 +59,34 @@
"@t3tools/mobile-review-diff-native": "file:./modules/t3-review-diff",
"@t3tools/mobile-terminal-native": "file:./modules/t3-terminal",
"@t3tools/shared": "workspace:*",
"@tabler/icons-react-native": "^3.44.0",
"clsx": "^2.1.1",
"diff": "8.0.3",
"effect": "catalog:",
"expo": "^56.0.12",
"expo-asset": "~56.0.17",
"expo-auth-session": "~56.0.14",
"expo-build-properties": "~56.0.19",
"expo-camera": "~56.0.8",
"expo-clipboard": "~56.0.4",
"expo-constants": "~56.0.18",
"expo": "^56.0.0",
"expo-asset": "~56.0.15",
"expo-auth-session": "~56.0.12",
"expo-build-properties": "~56.0.15",
"expo-camera": "~56.0.7",
"expo-clipboard": "~56.0.3",
"expo-constants": "~56.0.16",
"expo-crypto": "~56.0.4",
"expo-dev-client": "~56.0.20",
"expo-file-system": "~56.0.8",
"expo-font": "~56.0.7",
"expo-dev-client": "~56.0.16",
"expo-file-system": "~56.0.7",
"expo-font": "~56.0.5",
"expo-glass-effect": "~56.0.4",
"expo-haptics": "~56.0.3",
"expo-image-picker": "~56.0.18",
"expo-linking": "~56.0.14",
"expo-image-picker": "~56.0.14",
"expo-linking": "~56.0.12",
"expo-network": "~56.0.5",
"expo-notifications": "~56.0.18",
"expo-notifications": "~56.0.14",
"expo-paste-input": "^0.1.15",
"expo-router": "~56.2.11",
"expo-router": "~56.2.7",
"expo-secure-store": "~56.0.4",
"expo-splash-screen": "~56.0.10",
"expo-symbols": "~56.0.6",
"expo-updates": "~56.0.19",
"expo-symbols": "~56.0.5",
"expo-updates": "~56.0.17",
"expo-web-browser": "~56.0.5",
"expo-widgets": "~56.0.19",
"expo-widgets": "~56.0.15",
"punycode": "^2.3.1",
"react": "19.2.3",
"react-dom": "19.2.3",
@@ -1,10 +0,0 @@
const { withEntitlementsPlist } = require("expo/config-plugins");
module.exports = function withoutIosPersonalTeamCapabilities(config) {
return withEntitlementsPlist(config, (modConfig) => {
delete modConfig.modResults["aps-environment"];
delete modConfig.modResults["com.apple.developer.applesignin"];
delete modConfig.modResults["com.apple.security.application-groups"];
return modConfig;
});
};
+10 -4
View File
@@ -5,7 +5,6 @@ import {
DMSans_700Bold,
useFonts,
} from "@expo-google-fonts/dm-sans";
import { RegistryContext } from "@effect/atom-react";
import { usePathname } from "expo-router";
import Stack from "expo-router/stack";
import { useCallback } from "react";
@@ -19,6 +18,7 @@ import { LoadingScreen } from "../components/LoadingScreen";
import { useWorkspaceState } from "../state/workspace";
import { useThreadOutboxDrain } from "../state/use-thread-outbox-drain";
import { RegistryContext } from "@effect/atom-react";
import { appAtomRegistry } from "../state/atom-registry";
import { CloudAuthProvider } from "../features/cloud/CloudAuthProvider";
import {
@@ -26,6 +26,8 @@ import {
useClerkSettingsSheetDetent,
} from "../features/cloud/ClerkSettingsSheetDetent";
import { useAgentNotificationNavigation } from "../features/agent-awareness/notificationNavigation";
import { pushScreenAnimation } from "../lib/pushScreenAnimation";
import { useHeaderBlurEffect } from "../lib/useHeaderBlurEffect";
import { useThemeColor } from "../lib/useThemeColor";
function AppNavigator() {
@@ -45,7 +47,9 @@ function AppNavigatorContent() {
const { collapse, isExpanded } = useClerkSettingsSheetDetent();
const colorScheme = useColorScheme();
const statusBarBg = useThemeColor("--color-status-bar");
const screenColor = useThemeColor("--color-screen");
const sheetStyle = useResolveClassNames("bg-sheet");
const headerBlurEffect = useHeaderBlurEffect();
useAgentNotificationNavigation();
useThreadOutboxDrain();
@@ -96,9 +100,10 @@ function AppNavigatorContent() {
<Stack.Screen
name="index"
options={{
contentStyle: { backgroundColor: "transparent" },
contentStyle: { backgroundColor: screenColor },
headerShown: true,
headerTransparent: true,
headerBlurEffect,
headerShadowVisible: false,
}}
/>
@@ -112,9 +117,10 @@ function AppNavigatorContent() {
<Stack.Screen
name="threads/[environmentId]/[threadId]"
options={{
animation: "slide_from_right",
contentStyle: { backgroundColor: "transparent" },
animation: pushScreenAnimation,
contentStyle: { backgroundColor: screenColor },
gestureEnabled: true,
fullScreenGestureEnabled: true,
headerShown: false,
}}
/>
+2 -1
View File
@@ -1,5 +1,6 @@
import Stack from "expo-router/stack";
import { useResolveClassNames } from "uniwind";
import { pushScreenAnimation } from "../../lib/pushScreenAnimation";
import { useThemeColor } from "../../lib/useThemeColor";
export const unstable_settings = {
@@ -23,7 +24,7 @@ export default function ConnectionsLayout() {
}}
>
<Stack.Screen name="index" options={{ animation: "none" }} />
<Stack.Screen name="new" options={{ animation: "slide_from_right" }} />
<Stack.Screen name="new" options={{ animation: pushScreenAnimation }} />
</Stack>
);
}
-1
View File
@@ -84,7 +84,6 @@ export default function HomeRouteScreen() {
<>
<HomeHeader
environments={environments}
searchQuery={searchQuery}
selectedEnvironmentId={selectedEnvironmentId}
projectSortOrder={listOptions.projectSortOrder}
threadSortOrder={listOptions.threadSortOrder}
+9 -5
View File
@@ -2,6 +2,7 @@ import Stack from "expo-router/stack";
import { useResolveClassNames } from "uniwind";
import { NewTaskFlowProvider } from "../../features/threads/new-task-flow-provider";
import { pushScreenAnimation } from "../../lib/pushScreenAnimation";
import { useThemeColor } from "../../lib/useThemeColor";
export const unstable_settings = {
@@ -29,21 +30,24 @@ export default function NewTaskLayout() {
<Stack.Screen name="index" options={{ animation: "none", title: "Choose project" }} />
<Stack.Screen
name="add-project/index"
options={{ animation: "slide_from_right", title: "New project" }}
options={{ animation: pushScreenAnimation, title: "New project" }}
/>
<Stack.Screen
name="add-project/repository"
options={{ animation: "slide_from_right", title: "Repository" }}
options={{ animation: pushScreenAnimation, title: "Repository" }}
/>
<Stack.Screen
name="add-project/destination"
options={{ animation: "slide_from_right", title: "Clone destination" }}
options={{ animation: pushScreenAnimation, title: "Clone destination" }}
/>
<Stack.Screen
name="add-project/local"
options={{ animation: "slide_from_right", title: "Local folder" }}
options={{ animation: pushScreenAnimation, title: "Local folder" }}
/>
<Stack.Screen
name="draft"
options={{ animation: pushScreenAnimation, title: "New task" }}
/>
<Stack.Screen name="draft" options={{ animation: "slide_from_right", title: "New task" }} />
</Stack>
</NewTaskFlowProvider>
);
+6 -5
View File
@@ -3,6 +3,7 @@ import { useCallback } from "react";
import { useResolveClassNames } from "uniwind";
import { useClerkSettingsSheetDetent } from "../../features/cloud/ClerkSettingsSheetDetent";
import { pushScreenAnimation } from "../../lib/pushScreenAnimation";
import { useThemeColor } from "../../lib/useThemeColor";
export const unstable_settings = {
@@ -37,25 +38,25 @@ export default function SettingsLayout() {
<Stack.Screen name="index" options={{ animation: "none", title: "Settings" }} />
<Stack.Screen
name="environments"
options={{ animation: "slide_from_right", title: "Environments" }}
options={{ animation: pushScreenAnimation, title: "Environments" }}
/>
<Stack.Screen
name="environment-new"
options={{ animation: "slide_from_right", title: "Add Environment" }}
options={{ animation: pushScreenAnimation, title: "Add Environment" }}
/>
<Stack.Screen
name="waitlist"
options={{ animation: "slide_from_right", title: "Join the waitlist" }}
options={{ animation: pushScreenAnimation, title: "Join the waitlist" }}
/>
<Stack.Screen
name="archive"
listeners={{ transitionEnd: handleExpandedRouteTransitionEnd }}
options={{ animation: "slide_from_right", title: "Archived Threads" }}
options={{ animation: pushScreenAnimation, title: "Archived Threads" }}
/>
<Stack.Screen
name="auth"
listeners={{ transitionEnd: handleExpandedRouteTransitionEnd }}
options={{ animation: "slide_from_right", title: "Sign in" }}
options={{ animation: pushScreenAnimation, title: "Sign in" }}
/>
</Stack>
);
+4 -16
View File
@@ -16,7 +16,6 @@ import {
squashAtomCommandFailure,
} from "@t3tools/client-runtime/state/runtime";
import { AppText as Text } from "../../components/AppText";
import { supportsAgentAwarenessPush } from "../../features/agent-awareness/capabilities";
import { setLiveActivityUpdatesEnabled } from "../../features/agent-awareness/liveActivityPreferences";
import { requestAgentNotificationPermission } from "../../features/agent-awareness/notificationPermissions";
import { refreshAgentAwarenessRegistration } from "../../features/agent-awareness/remoteRegistration";
@@ -75,7 +74,6 @@ function LocalSettingsRouteScreen() {
}
function ConfiguredSettingsRouteScreen() {
const agentAwarenessPushAvailable = supportsAgentAwarenessPush();
const insets = useSafeAreaInsets();
const { push } = useRouter();
const { expand: expandClerkSheet } = useClerkSettingsSheetDetent();
@@ -363,27 +361,17 @@ function ConfiguredSettingsRouteScreen() {
<SettingsSwitchRow
icon="bell.badge"
label="Device Notifications"
disabled={
!agentAwarenessPushAvailable ||
notificationStatus === "checking" ||
notificationStatus === "unsupported"
}
value={agentAwarenessPushAvailable && notificationStatus === "enabled"}
disabled={notificationStatus === "checking" || notificationStatus === "unsupported"}
value={notificationStatus === "enabled"}
onValueChange={handleDeviceNotificationsChange}
/>
<SettingsSwitchRow
disabled={
!agentAwarenessPushAvailable ||
!isLoaded ||
liveActivityStatus === "checking" ||
liveActivityStatus === "linking"
!isLoaded || liveActivityStatus === "checking" || liveActivityStatus === "linking"
}
icon="bolt.circle"
label="Live Activity Updates"
value={
agentAwarenessPushAvailable &&
(liveActivityStatus === "enabled" || liveActivityStatus === "linking")
}
value={liveActivityStatus === "enabled" || liveActivityStatus === "linking"}
onValueChange={handleLiveActivitiesChange}
/>
</SettingsSection>
@@ -2,7 +2,11 @@ import Stack from "expo-router/stack";
import { StyleSheet } from "react-native";
import { useResolveClassNames } from "uniwind";
import { pushScreenAnimation } from "../../../../lib/pushScreenAnimation";
import { useHeaderBlurEffect } from "../../../../lib/useHeaderBlurEffect";
export default function ThreadLayout() {
const headerBlurEffect = useHeaderBlurEffect();
const sheetStyle = StyleSheet.flatten(useResolveClassNames("bg-sheet"));
const headerBg = {
backgroundColor: (sheetStyle as { backgroundColor?: string })?.backgroundColor,
@@ -16,6 +20,7 @@ export default function ThreadLayout() {
contentStyle: { backgroundColor: "transparent" },
headerShown: true,
headerTransparent: true,
headerBlurEffect,
headerShadowVisible: false,
headerTitle: "",
}}
@@ -45,8 +50,9 @@ export default function ThreadLayout() {
<Stack.Screen
name="review"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
contentStyle: sheetStyle,
fullScreenGestureEnabled: true,
headerBackButtonDisplayMode: "minimal",
headerShown: true,
headerTitle: "Files changed",
@@ -58,8 +64,9 @@ export default function ThreadLayout() {
<Stack.Screen
name="files/index"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
contentStyle: sheetStyle,
fullScreenGestureEnabled: true,
headerBackButtonDisplayMode: "minimal",
headerShown: true,
headerTitle: "Files",
@@ -71,8 +78,9 @@ export default function ThreadLayout() {
<Stack.Screen
name="files/[...path]"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
contentStyle: sheetStyle,
fullScreenGestureEnabled: true,
headerBackButtonDisplayMode: "minimal",
headerShown: true,
headerTitle: "File",
@@ -95,8 +103,11 @@ export default function ThreadLayout() {
<Stack.Screen
name="terminal"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
contentStyle: { backgroundColor: "#050505" },
// No fullScreenGestureEnabled here: the terminal consumes
// horizontal pans (readline editing, mouse reporting), so
// back-swipe stays confined to the screen edge.
headerBackButtonDisplayMode: "minimal",
headerShown: true,
headerShadowVisible: false,
@@ -2,6 +2,8 @@ import Stack from "expo-router/stack";
import { StyleSheet } from "react-native";
import { useResolveClassNames } from "uniwind";
import { pushScreenAnimation } from "../../../../../lib/pushScreenAnimation";
export const unstable_settings = {
anchor: "index",
};
@@ -23,7 +25,7 @@ export default function GitSheetLayout() {
<Stack.Screen
name="commit"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
headerShown: true,
headerTitle: "Commit changes",
headerBackTitle: "",
@@ -34,7 +36,7 @@ export default function GitSheetLayout() {
<Stack.Screen
name="branches"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
headerShown: true,
headerTitle: "Branches & worktrees",
headerBackTitle: "",
@@ -45,7 +47,7 @@ export default function GitSheetLayout() {
<Stack.Screen
name="review"
options={{
animation: "slide_from_right",
animation: pushScreenAnimation,
headerShown: true,
headerTitle: "Review changes",
headerBackTitle: "",
-140
View File
@@ -1,140 +0,0 @@
import {
IconAdjustmentsHorizontal,
IconAlertTriangle,
IconArchive,
IconArrowBackUp,
IconArrowDownCircle,
IconArrowRightCircle,
IconArrowUp,
IconArrowUpRight,
IconBellRinging,
IconBolt,
IconCamera,
IconCheck,
IconChevronDown,
IconChevronRight,
IconChevronUp,
IconCircleCheck,
IconCircleXFilled,
IconCopy,
IconDeviceDesktop,
IconDots,
IconDotsCircleHorizontal,
IconEdit,
IconExternalLink,
IconEye,
IconFileText,
IconFilter,
IconFolder,
IconFolderPlus,
IconGitBranch,
IconGitMerge,
IconInfoCircle,
IconLayoutColumns,
IconLink,
IconMessage,
IconNetwork,
IconPlayerPlay,
IconPlayerStopFilled,
IconPlus,
IconRefresh,
IconSearch,
IconServer,
IconSettings,
IconTerminal2,
IconTrash,
IconTypography,
IconUserCircle,
IconWifiOff,
IconX,
type Icon,
} from "@tabler/icons-react-native";
import { Platform } from "react-native";
import { SymbolView as ExpoSymbolView, type SFSymbol, type SymbolViewProps } from "expo-symbols";
const ANDROID_ICON_BY_SF_SYMBOL: Partial<Record<SFSymbol, Icon>> = {
"arrow.branch": IconGitBranch,
"arrow.clockwise": IconRefresh,
"arrow.down.circle": IconArrowDownCircle,
"arrow.right.circle": IconArrowRightCircle,
"arrow.triangle.branch": IconGitBranch,
"arrow.turn.left.up": IconArrowBackUp,
"arrow.up": IconArrowUp,
"arrow.up.right": IconArrowUpRight,
archivebox: IconArchive,
"archivebox.fill": IconArchive,
"bell.badge": IconBellRinging,
"bolt.circle": IconBolt,
"bolt.horizontal.circle": IconBolt,
camera: IconCamera,
checkmark: IconCheck,
"checkmark.circle": IconCircleCheck,
"chevron.down": IconChevronDown,
"chevron.right": IconChevronRight,
"chevron.up": IconChevronUp,
desktopcomputer: IconDeviceDesktop,
"doc.on.doc": IconCopy,
"doc.text": IconFileText,
ellipsis: IconDots,
"ellipsis.circle": IconDotsCircleHorizontal,
"exclamationmark.triangle": IconAlertTriangle,
eye: IconEye,
folder: IconFolder,
"folder.badge.plus": IconFolderPlus,
"folder.fill": IconFolder,
gearshape: IconSettings,
"info.circle": IconInfoCircle,
link: IconLink,
"line.3.horizontal.decrease.circle": IconFilter,
"line.3.horizontal.decrease.circle.fill": IconFilter,
magnifyingglass: IconSearch,
"person.crop.circle": IconUserCircle,
play: IconPlayerPlay,
plus: IconPlus,
"point.3.connected.trianglepath.dotted": IconNetwork,
"point.topleft.down.curvedto.point.bottomright.up": IconGitMerge,
safari: IconExternalLink,
"server.rack": IconServer,
"slider.horizontal.3": IconAdjustmentsHorizontal,
"square.and.pencil": IconEdit,
"square.split.2x1": IconLayoutColumns,
"stop.fill": IconPlayerStopFilled,
terminal: IconTerminal2,
"text.bubble": IconMessage,
"textformat.size": IconTypography,
trash: IconTrash,
"wifi.slash": IconWifiOff,
xmark: IconX,
"xmark.circle.fill": IconCircleXFilled,
};
export type { SFSymbol } from "expo-symbols";
export type AppSymbolName = SymbolViewProps["name"];
export function SymbolView(props: SymbolViewProps) {
if (Platform.OS !== "android") {
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;
if (!AndroidIcon) {
return props.fallback ?? null;
}
return (
<AndroidIcon
accessibilityLabel={props.accessibilityLabel}
color={props.tintColor}
size={props.size}
strokeWidth={2}
style={props.style}
testID={props.testID}
/>
);
}
+1 -1
View File
@@ -1,10 +1,10 @@
import { MenuView } from "@react-native-menu/menu";
import type { ComponentProps, ReactNode } from "react";
import { Pressable, useColorScheme, View } from "react-native";
import { SymbolView } from "expo-symbols";
import { useThemeColor } from "../lib/useThemeColor";
import { cn } from "../lib/cn";
import { SymbolView } from "./AppSymbol";
import { AppText as Text } from "./AppText";
export function ControlPill(props: {
@@ -1,5 +0,0 @@
import Constants from "expo-constants";
export function supportsAgentAwarenessPush() {
return Constants.expoConfig?.extra?.iosPersonalTeamBuild !== true;
}
@@ -1,7 +1,6 @@
import type { RelayDeviceRegistrationRequest } from "@t3tools/contracts/relay";
import type { Preferences } from "../../lib/storage";
import { supportsAgentAwarenessPush } from "./capabilities";
export function makeRelayDeviceRegistrationRequest(input: {
readonly deviceId: string;
@@ -13,8 +12,7 @@ export function makeRelayDeviceRegistrationRequest(input: {
readonly notificationsEnabled: boolean;
readonly preferences: Preferences;
}): RelayDeviceRegistrationRequest {
const pushAvailable = supportsAgentAwarenessPush();
const liveActivitiesEnabled = pushAvailable && input.preferences.liveActivitiesEnabled !== false;
const liveActivitiesEnabled = input.preferences.liveActivitiesEnabled !== false;
return {
deviceId: input.deviceId,
label: input.label,
@@ -25,7 +23,7 @@ export function makeRelayDeviceRegistrationRequest(input: {
...(input.pushToStartToken ? { pushToStartToken: input.pushToStartToken } : {}),
preferences: {
liveActivitiesEnabled,
notificationsEnabled: pushAvailable && input.notificationsEnabled,
notificationsEnabled: input.notificationsEnabled,
notifyOnApproval: true,
notifyOnInput: true,
notifyOnCompletion: true,
@@ -213,26 +213,6 @@ describe("makeRelayDeviceRegistrationRequest", () => {
});
});
it("disables push features in Personal Team relay registrations", () => {
Constants.expoConfig!.extra = { iosPersonalTeamBuild: true };
expect(
makeRelayDeviceRegistrationRequest({
deviceId: "device-1",
label: "Julius's iPhone",
iosMajorVersion: 18,
appVersion: "1.0.0",
pushToken: "apns-token",
pushToStartToken: "push-to-start-token",
notificationsEnabled: true,
preferences: {},
}).preferences,
).toMatchObject({
liveActivitiesEnabled: false,
notificationsEnabled: false,
});
});
it("marks notification delivery disabled when APNs permission is unavailable", () => {
expect(
makeRelayDeviceRegistrationRequest({
@@ -19,6 +19,7 @@ import { cn } from "../../lib/cn";
import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
import { buildThreadFilesNavigation } from "../../lib/routes";
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
import { useHeaderBlurEffect } from "../../lib/useHeaderBlurEffect";
import { useThemeColor } from "../../lib/useThemeColor";
import { useThreadSelection } from "../../state/use-thread-selection";
import { useSelectedThreadWorktree } from "../../state/use-selected-thread-worktree";
@@ -444,6 +445,7 @@ function FilesToolbarBottomFade() {
export function ThreadFilesTreeScreen() {
const router = useRouter();
const headerBlurEffect = useHeaderBlurEffect();
const [searchQuery, setSearchQuery] = useState("");
const { cwd, environmentId, projectName, selectedThread, threadId } = useThreadFilesWorkspace();
const entriesQuery = useEnvironmentQuery(
@@ -481,6 +483,7 @@ export function ThreadFilesTreeScreen() {
title: "Files",
headerShown: true,
headerTransparent: true,
headerBlurEffect,
headerStyle: { backgroundColor: "transparent" },
headerShadowVisible: false,
headerTitle: () => <FilesHeaderTitle projectName={projectName} />,
+4 -278
View File
@@ -8,15 +8,10 @@ import {
DEFAULT_SIDEBAR_PROJECT_SORT_ORDER,
DEFAULT_SIDEBAR_THREAD_SORT_ORDER,
} from "@t3tools/contracts";
import type { MenuAction } from "@react-native-menu/menu";
import { Stack } from "expo-router";
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 { Text as RNText, View } from "react-native";
import { ControlPill, ControlPillMenu } from "../../components/ControlPill";
import { SymbolView } from "../../components/AppSymbol";
import { useHeaderBlurEffect } from "../../lib/useHeaderBlurEffect";
import { useThemeColor } from "../../lib/useThemeColor";
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
import type { HomeProjectSortOrder } from "./homeThreadList";
@@ -66,7 +61,6 @@ const PROJECT_GROUPING_OPTIONS: ReadonlyArray<{
export function HomeHeader(props: {
readonly environments: ReadonlyArray<HomeHeaderEnvironment>;
readonly searchQuery: string;
readonly selectedEnvironmentId: EnvironmentId | null;
readonly projectSortOrder: HomeProjectSortOrder;
readonly threadSortOrder: SidebarThreadSortOrder;
@@ -79,271 +73,7 @@ export function HomeHeader(props: {
readonly onOpenSettings: () => void;
readonly onStartNewTask: () => void;
}) {
if (Platform.OS === "android") {
return <AndroidHomeHeader {...props} />;
}
return <IosHomeHeader {...props} />;
}
type HomeHeaderProps = Parameters<typeof HomeHeader>[0];
function checkedMenuTitle(checked: boolean, title: string) {
return checked ? `✓ ${title}` : title;
}
function AndroidHomeHeader(props: HomeHeaderProps) {
const insets = useSafeAreaInsets();
const iconColor = useThemeColor("--color-icon");
const mutedColor = useThemeColor("--color-foreground-muted");
const subtleColor = useThemeColor("--color-subtle");
const headerColor = useThemeColor("--color-header");
const headerBorderColor = useThemeColor("--color-header-border");
const inputColor = useThemeColor("--color-input");
const inputBorderColor = useThemeColor("--color-input-border");
const placeholderColor = useThemeColor("--color-placeholder");
const hasCustomListOptions =
props.selectedEnvironmentId !== null ||
props.projectSortOrder !== DEFAULT_SIDEBAR_PROJECT_SORT_ORDER ||
props.threadSortOrder !== DEFAULT_SIDEBAR_THREAD_SORT_ORDER ||
props.projectGroupingMode !== DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE;
const menuActions = useMemo<MenuAction[]>(
() => [
{
id: "environment",
title: "Environment",
subactions: [
{
id: "environment:all",
title: checkedMenuTitle(props.selectedEnvironmentId === null, "All environments"),
},
...props.environments.map((environment) => ({
id: `environment:${environment.environmentId}`,
title: checkedMenuTitle(
props.selectedEnvironmentId === environment.environmentId,
environment.label,
),
})),
],
},
{
id: "project-sort",
title: "Sort projects",
subactions: PROJECT_SORT_OPTIONS.map((option) => ({
id: `project-sort:${option.value}`,
title: checkedMenuTitle(props.projectSortOrder === option.value, option.label),
})),
},
{
id: "thread-sort",
title: "Sort threads",
subactions: THREAD_SORT_OPTIONS.map((option) => ({
id: `thread-sort:${option.value}`,
title: checkedMenuTitle(props.threadSortOrder === option.value, option.label),
})),
},
{
id: "project-grouping",
title: "Group projects",
subactions: PROJECT_GROUPING_OPTIONS.map((option) => ({
id: `project-grouping:${option.value}`,
title: checkedMenuTitle(props.projectGroupingMode === option.value, option.label),
})),
},
],
[
props.environments,
props.projectGroupingMode,
props.projectSortOrder,
props.selectedEnvironmentId,
props.threadSortOrder,
],
);
const handleMenuAction = useCallback(
(event: { nativeEvent: { event: string } }) => {
const id = event.nativeEvent.event;
if (id === "environment:all") {
props.onEnvironmentChange(null);
return;
}
if (id.startsWith("environment:")) {
const environmentId = id.slice("environment:".length);
const environment = props.environments.find(
(candidate) => candidate.environmentId === environmentId,
);
if (environment) {
props.onEnvironmentChange(environment.environmentId);
}
return;
}
const projectSort = PROJECT_SORT_OPTIONS.find(
(option) => id === `project-sort:${option.value}`,
);
if (projectSort) {
props.onProjectSortOrderChange(projectSort.value);
return;
}
const threadSort = THREAD_SORT_OPTIONS.find((option) => id === `thread-sort:${option.value}`);
if (threadSort) {
props.onThreadSortOrderChange(threadSort.value);
return;
}
const grouping = PROJECT_GROUPING_OPTIONS.find(
(option) => id === `project-grouping:${option.value}`,
);
if (grouping) {
props.onProjectGroupingModeChange(grouping.value);
}
},
[props],
);
return (
<>
<Stack.Screen options={{ headerShown: false }} />
<View
style={{
backgroundColor: headerColor,
borderBottomColor: headerBorderColor,
borderBottomWidth: 1,
paddingTop: Math.max(insets.top, 12),
paddingBottom: 12,
paddingHorizontal: 16,
}}
>
<View style={{ alignSelf: "center", gap: 12, maxWidth: 720, width: "100%" }}>
<View style={{ alignItems: "center", flexDirection: "row", gap: 10 }}>
<View style={{ alignItems: "center", flexDirection: "row", flex: 1, gap: 8 }}>
<RNText
style={{
color: iconColor,
fontFamily: "DMSans_700Bold",
fontSize: MOBILE_TYPOGRAPHY.title.fontSize,
letterSpacing: -0.5,
}}
>
T3 Code
</RNText>
<View
style={{
backgroundColor: subtleColor,
borderRadius: 99,
paddingHorizontal: 8,
paddingVertical: 3,
}}
>
<RNText
style={{
color: mutedColor,
fontFamily: "DMSans_700Bold",
fontSize: MOBILE_TYPOGRAPHY.micro.fontSize,
letterSpacing: 1.1,
textTransform: "uppercase",
}}
>
Alpha
</RNText>
</View>
</View>
<ControlPillMenu
actions={menuActions}
isAnchoredToRight
onPressAction={handleMenuAction}
>
<Pressable
accessibilityLabel="Filter and sort threads"
accessibilityRole="button"
style={{
alignItems: "center",
backgroundColor: subtleColor,
borderRadius: 99,
height: 44,
justifyContent: "center",
width: 44,
}}
>
<SymbolView
name={
hasCustomListOptions
? "line.3.horizontal.decrease.circle.fill"
: "line.3.horizontal.decrease.circle"
}
size={18}
tintColor={iconColor}
type="monochrome"
/>
</Pressable>
</ControlPillMenu>
<ControlPill
accessibilityLabel="Open settings"
icon="gearshape"
onPress={props.onOpenSettings}
/>
<ControlPill
accessibilityLabel="New task"
icon="square.and.pencil"
onPress={props.onStartNewTask}
variant="primary"
/>
</View>
<View
style={{
alignItems: "center",
backgroundColor: inputColor,
borderColor: inputBorderColor,
borderRadius: 16,
borderWidth: 1,
flexDirection: "row",
gap: 10,
minHeight: 48,
paddingHorizontal: 14,
}}
>
<SymbolView name="magnifyingglass" size={17} tintColor={mutedColor} type="monochrome" />
<TextInput
accessibilityLabel="Search threads"
autoCapitalize="none"
onChangeText={props.onSearchQueryChange}
placeholder="Search threads"
placeholderTextColor={placeholderColor}
style={{
color: iconColor,
flex: 1,
fontFamily: "DMSans_400Regular",
fontSize: MOBILE_TYPOGRAPHY.body.fontSize,
paddingVertical: 10,
}}
value={props.searchQuery}
/>
{props.searchQuery.length > 0 ? (
<Pressable
accessibilityLabel="Clear search"
hitSlop={10}
onPress={() => props.onSearchQueryChange("")}
>
<SymbolView
name="xmark.circle.fill"
size={17}
tintColor={mutedColor}
type="monochrome"
/>
</Pressable>
) : null}
</View>
</View>
</View>
</>
);
}
function IosHomeHeader(props: HomeHeaderProps) {
const searchBarRef = useRef<SearchBarCommands>(null);
const headerBlurEffect = useHeaderBlurEffect();
const iconColor = useThemeColor("--color-icon");
const mutedColor = useThemeColor("--color-foreground-muted");
const subtleColor = useThemeColor("--color-subtle");
@@ -353,10 +83,6 @@ 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
@@ -364,11 +90,11 @@ function IosHomeHeader(props: HomeHeaderProps) {
headerShown: true,
headerTransparent: true,
headerStyle: { backgroundColor: "transparent" },
headerBlurEffect,
headerShadowVisible: false,
headerTintColor: iconColor,
headerTitle: "",
headerSearchBarOptions: {
ref: searchBarRef,
placeholder: "Search threads",
hideNavigationBar: false,
onChangeText: (event) => {
+5 -15
View File
@@ -8,15 +8,9 @@ import type {
SidebarThreadSortOrder,
} from "@t3tools/contracts";
import * as Haptics from "expo-haptics";
import { SymbolView } from "expo-symbols";
import { useCallback, useMemo, useRef, useState } from "react";
import {
ActivityIndicator,
Platform,
Pressable,
ScrollView,
useWindowDimensions,
View,
} from "react-native";
import { ActivityIndicator, Pressable, ScrollView, useWindowDimensions, View } from "react-native";
import ReanimatedSwipeable, {
type SwipeableMethods,
} from "react-native-gesture-handler/ReanimatedSwipeable";
@@ -31,7 +25,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useThemeColor } from "../../lib/useThemeColor";
import { AppText as Text } from "../../components/AppText";
import { SymbolView } from "../../components/AppSymbol";
import { EmptyState } from "../../components/EmptyState";
import { ProjectFavicon } from "../../components/ProjectFavicon";
import type { WorkspaceState } from "../../state/workspaceModel";
@@ -514,19 +507,16 @@ export function HomeScreen(props: HomeScreenProps) {
return (
<View className="flex-1 bg-screen">
<ScrollView
contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
contentInsetAdjustmentBehavior="automatic"
showsVerticalScrollIndicator={false}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
onScrollBeginDrag={() => openSwipeableRef.current?.close()}
className="flex-1"
contentContainerStyle={{
alignSelf: "center",
width: "100%",
maxWidth: 720,
paddingHorizontal: 16,
paddingTop: Platform.OS === "android" ? 16 : 8,
paddingBottom: Math.max(insets.bottom, 24),
paddingTop: 8,
paddingBottom: 24,
gap: 20,
}}
>
@@ -19,6 +19,7 @@ import { AppText as Text } from "../../components/AppText";
import { environmentCatalog } from "../../connection/catalog";
import { useEnvironmentPresentation } from "../../state/presentation";
import { useAtomCommand } from "../../state/use-atom-command";
import { useHeaderBlurEffect } from "../../lib/useHeaderBlurEffect";
import { useThemeColor } from "../../lib/useThemeColor";
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
import { useThreadDraftForThread } from "../../state/use-thread-composer-state";
@@ -113,6 +114,7 @@ function ReviewSelectionActionBar(props: {
export function ReviewSheet() {
const insets = useSafeAreaInsets();
const colorScheme = useColorScheme();
const headerBlurEffect = useHeaderBlurEffect();
const headerForeground = String(useThemeColor("--color-foreground"));
const headerMuted = String(useThemeColor("--color-foreground-muted"));
const headerIcon = String(useThemeColor("--color-icon"));
@@ -241,6 +243,7 @@ export function ReviewSheet() {
<Stack.Screen
options={{
headerTransparent: true,
headerBlurEffect,
headerShadowVisible: false,
headerTintColor: headerIcon,
headerStyle: {
@@ -253,7 +253,11 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
() =>
Gesture.Pan()
.enabled(!isSplitLayout)
.hitSlop({ left: 0, width: 40 })
// Confine the drawer pan to the top-left corner where it completes
// (see the `event.y` check below). Covering the full left edge stole
// the touch from the native swipe-back gesture, leaving back
// navigation dead below the header.
.hitSlop({ left: 0, width: 40, top: 0, height: drawerGestureThreshold })
.activeOffsetX([10, 999])
.failOffsetY([-24, 24])
.onEnd((event) => {
@@ -5,6 +5,7 @@ import { EnvironmentId, type ProjectScript } from "@t3tools/contracts";
import { projectScriptCwd, projectScriptRuntimeEnv } from "@t3tools/shared/projectScripts";
import { Pressable, ScrollView, Text as RNText, View } from "react-native";
import { useWorkspaceState } from "../../state/workspace";
import { useHeaderBlurEffect } from "../../lib/useHeaderBlurEffect";
import { useThemeColor } from "../../lib/useThemeColor";
import { useEnvironmentQuery } from "../../state/query";
import { dismissGitActionResult, useGitActionProgress } from "../../state/use-vcs-action-state";
@@ -104,6 +105,7 @@ export function ThreadRouteScreen() {
const iconColor = String(useThemeColor("--color-icon"));
const foregroundColor = String(useThemeColor("--color-foreground"));
const secondaryFg = String(useThemeColor("--color-foreground-secondary"));
const headerBlurEffect = useHeaderBlurEffect();
/* ─── Git status for native header trigger ───────────────────────── */
const gitStatus = useEnvironmentQuery(
@@ -326,6 +328,7 @@ export function ThreadRouteScreen() {
headerShown: true,
headerTransparent: true,
headerStyle: { backgroundColor: "transparent" },
headerBlurEffect,
headerShadowVisible: false,
headerTintColor: iconColor,
headerBackTitle: "",
@@ -0,0 +1,12 @@
import { Platform } from "react-native";
/**
* Stack animation for pushed (non-sheet) screens.
*
* iOS keeps the default push animation: forcing `slide_from_right` switches
* react-native-screens to its custom swipe animator, which paints a black
* void behind the outgoing screen during interactive swipe-back. The native
* default is visually the same slide with proper parallax over the previous
* screen. Android has no interactive pop, so it keeps `slide_from_right`.
*/
export const pushScreenAnimation = Platform.OS === "ios" ? "default" : "slide_from_right";
@@ -0,0 +1,15 @@
import { useColorScheme } from "react-native";
/**
* Blur effect for transparent navigation headers.
*
* Recent iOS betas stopped drawing the implicit material behind transparent
* navigation bars, and the trait-adaptive `systemChromeMaterial` resolves to
* its light variant there even while the app renders in dark mode — so pick
* the light/dark variant explicitly from the app color scheme.
*/
export function useHeaderBlurEffect() {
return useColorScheme() === "dark"
? ("systemChromeMaterialDark" as const)
: ("systemChromeMaterialLight" as const);
}
+426 -544
View File
File diff suppressed because it is too large. Load diff