Skip to content

Commit 40b5ea0

Browse files
authored
Merge branch 'main' into fix/antigravity-windows-tmpdir
2 parents f3b5fca + 68fb7f4 commit 40b5ea0

13 files changed

Lines changed: 723 additions & 80 deletions

‎.github/workflows/mobile-eas-preview.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,19 @@ jobs:
7878
working-directory: apps/mobile
7979
env:
8080
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
81-
run: eas env:pull preview --non-interactive
81+
run: |
82+
eas env:pull preview --non-interactive
83+
# EAS Update disables dotenv loading. Keep the downloaded native config
84+
# in its process environment so Android build and OTA fingerprints match.
85+
node --input-type=module <<'NODE'
86+
import { appendFileSync, readFileSync } from "node:fs";
87+
import { parseEnv } from "node:util";
88+
const env = parseEnv(readFileSync(".env.local", "utf8"));
89+
const googleServicesFile = env.T3CODE_ANDROID_GOOGLE_SERVICES_FILE;
90+
if (googleServicesFile) {
91+
appendFileSync(process.env.GITHUB_ENV, `T3CODE_ANDROID_GOOGLE_SERVICES_FILE=${googleServicesFile}\n`);
92+
}
93+
NODE
8294
8395
- name: Deploy with fingerprint check
8496
if: steps.expo-token.outputs.present == 'true'

‎apps/mobile/src/Stack.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import { SettingsAppearanceRouteScreen } from "./features/settings/SettingsAppea
7171
import { SettingsClientStorageRouteScreen } from "./features/settings/SettingsClientStorageRouteScreen";
7272
import { SettingsDiagnosticsRouteScreen } from "./features/diagnostics/SettingsDiagnosticsRouteScreen";
7373
import { SettingsAuthRouteScreen } from "./features/settings/SettingsAuthRouteScreen";
74+
import { SettingsEnvironmentDetailRouteScreen } from "./features/settings/SettingsEnvironmentDetailRouteScreen";
7475
import { SettingsEnvironmentsRouteScreen } from "./features/settings/SettingsEnvironmentsRouteScreen";
7576
import {
7677
SettingsEnvironmentAgentBehaviorRouteScreen,
@@ -193,6 +194,11 @@ const SettingsContentStack = createNativeStackNavigator({
193194
title: "Environments",
194195
},
195196
}),
197+
SettingsEnvironmentDetail: createNativeStackScreen({
198+
screen: SettingsEnvironmentDetailRouteScreen,
199+
linking: "environments/:environmentId",
200+
options: { title: "Environment" },
201+
}),
196202
SettingsEnvironmentNewThreads: createNativeStackScreen({
197203
screen: SettingsEnvironmentNewThreadsRouteScreen,
198204
linking: "new-threads",

‎apps/mobile/src/features/connection/CloudEnvironmentRows.tsx‎

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { type RelayEnvironmentView, useConnectionController } from "./useConnect
3535

3636
interface CloudEnvironmentRowsProps {
3737
readonly connectedCloudEnvironments: ReadonlyArray<ConnectedEnvironmentSummary>;
38+
readonly onOpenEnvironment?: (environmentId: EnvironmentId) => void;
3839
readonly onSetEnvironmentEnabled: (environmentId: EnvironmentId, enabled: boolean) => void;
3940
/** Long-press on a saved row. The callback owns the confirm. */
4041
readonly onRemoveEnvironment: (environmentId: EnvironmentId) => void;
@@ -124,41 +125,45 @@ function CloudEnvironmentRowsContent(
124125
) : null}
125126

126127
{hasCloudRows ? (
127-
<View collapsable={false} className="overflow-hidden rounded-[24px] bg-card">
128-
{props.connectedCloudEnvironments.map((environment, index) => (
128+
<View collapsable={false} className="overflow-hidden rounded-[24px] bg-grouped-card">
129+
{props.connectedCloudEnvironments.map((environment) => (
129130
<ConnectedCloudEnvironmentRow
130131
key={environment.environmentId}
131132
environment={environment}
132133
descriptor={discoveredDescriptors.get(environment.environmentId)}
133-
borderTop={index !== 0}
134134
onSetEnabled={(enabled) =>
135135
props.onSetEnvironmentEnabled(environment.environmentId, enabled)
136136
}
137137
onRemove={() => props.onRemoveEnvironment(environment.environmentId)}
138+
onOpen={
139+
props.onOpenEnvironment
140+
? () => props.onOpenEnvironment?.(environment.environmentId)
141+
: undefined
142+
}
138143
errorExpanded={expandedErrorId === environment.environmentId}
139144
onToggleError={() => handleToggleCloudError(environment.environmentId)}
140145
/>
141146
))}
142-
{availableCloudEnvironments.map((environment, index) => (
147+
{availableCloudEnvironments.map((environment) => (
143148
<CloudEnvironmentRow
144149
key={environment.environment.environmentId}
145150
environment={environment}
146-
borderTop={props.connectedCloudEnvironments.length > 0 || index !== 0}
151+
showChevron={props.onOpenEnvironment !== undefined}
147152
onConnect={() => handleConnectCloudEnvironment(environment)}
148153
errorExpanded={expandedErrorId === environment.environment.environmentId}
149154
onToggleError={() => handleToggleCloudError(environment.environment.environmentId)}
150155
/>
151156
))}
152157
</View>
153158
) : controller.relayDiscovery.isRefreshing ? (
154-
<View collapsable={false} className="items-center gap-3 rounded-[24px] bg-card p-6">
159+
<View collapsable={false} className="items-center gap-3 rounded-[24px] bg-grouped-card p-6">
155160
<ActivityIndicator colorClassName={"accent-icon"} />
156161
<Text className="text-center text-sm leading-normal text-foreground-muted">
157162
Loading linked cloud environments.
158163
</Text>
159164
</View>
160165
) : controller.relayDiscovery.error ? null : (
161-
<View collapsable={false} className="rounded-[24px] bg-card p-5">
166+
<View collapsable={false} className="rounded-[24px] bg-grouped-card p-5">
162167
<Text className="text-sm leading-normal text-foreground-muted">
163168
No additional linked cloud environments.
164169
</Text>
@@ -170,7 +175,7 @@ function CloudEnvironmentRowsContent(
170175
{discoveryAvailable &&
171176
controller.relayDiscovery.error &&
172177
!controller.relayDiscovery.isRefreshing ? (
173-
<View collapsable={false} className="gap-3 rounded-[24px] bg-card p-5">
178+
<View collapsable={false} className="gap-3 rounded-[24px] bg-grouped-card p-5">
174179
<Text className="text-base font-t3-bold text-foreground">
175180
Could not load T3 Connect environments
176181
</Text>
@@ -202,10 +207,10 @@ function ConnectedCloudEnvironmentRow(props: {
202207
readonly environment: ConnectedEnvironmentSummary;
203208
/** Discovery's view of the server, for the glyph before the first connection. */
204209
readonly descriptor: ExecutionEnvironmentDescriptor | undefined;
205-
readonly borderTop: boolean;
206210
readonly errorExpanded: boolean;
207211
readonly onSetEnabled: (enabled: boolean) => void;
208212
readonly onRemove: () => void;
213+
readonly onOpen?: (() => void) | undefined;
209214
readonly onToggleError: () => void;
210215
}) {
211216
const serverConfig = useAtomValue(
@@ -222,10 +227,13 @@ function ConnectedCloudEnvironmentRow(props: {
222227
return (
223228
<Pressable
224229
accessibilityHint="Long press to remove from this device"
230+
accessibilityRole={props.onOpen ? "button" : undefined}
231+
accessibilityLabel={props.onOpen ? `Manage ${props.environment.environmentLabel}` : undefined}
232+
onPress={props.onOpen}
225233
onLongPress={props.onRemove}
226234
>
227235
<CloudEnvironmentRowShell
228-
borderTop={props.borderTop}
236+
opensDetails={props.onOpen !== undefined}
229237
connectionError={enabled || unsupported ? props.environment.connectionError : null}
230238
connectionErrorTraceId={enabled ? props.environment.connectionErrorTraceId : null}
231239
connectionState={enabled || unsupported ? props.environment.connectionState : "available"}
@@ -246,7 +254,7 @@ function ConnectedCloudEnvironmentRow(props: {
246254

247255
function CloudEnvironmentRow(props: {
248256
readonly environment: RelayEnvironmentView;
249-
readonly borderTop: boolean;
257+
readonly showChevron: boolean;
250258
readonly errorExpanded: boolean;
251259
readonly onConnect: () => void;
252260
readonly onToggleError: () => void;
@@ -260,7 +268,7 @@ function CloudEnvironmentRow(props: {
260268

261269
return (
262270
<CloudEnvironmentRowShell
263-
borderTop={props.borderTop}
271+
showChevron={props.showChevron}
264272
connectionError={presentation.connectionError}
265273
connectionErrorTraceId={presentation.connectionErrorTraceId}
266274
connectionState={presentation.connectionState}
@@ -285,7 +293,8 @@ function CloudEnvironmentRow(props: {
285293
}
286294

287295
function CloudEnvironmentRowShell(props: {
288-
readonly borderTop: boolean;
296+
readonly showChevron?: boolean;
297+
readonly opensDetails?: boolean;
289298
readonly connectionError: string | null;
290299
readonly connectionErrorTraceId: string | null;
291300
readonly connectionState: EnvironmentConnectionPhase;
@@ -340,13 +349,7 @@ function CloudEnvironmentRowShell(props: {
340349
[measuredErrorText, props.connectionError],
341350
);
342351
return (
343-
<View
344-
collapsable={false}
345-
className={cn(
346-
"flex-row items-center gap-3 bg-card px-4 py-3.5",
347-
props.borderTop && "border-t border-border",
348-
)}
349-
>
352+
<View collapsable={false} className="flex-row items-center gap-3 bg-grouped-card px-4 py-3.5">
350353
<View className="min-w-0 flex-1 gap-0.5">
351354
<View className="min-w-0 flex-row items-center gap-2">
352355
<ConnectionStatusDot state={props.connectionState} pulse={shouldPulse} size={7} />
@@ -409,10 +412,16 @@ function CloudEnvironmentRowShell(props: {
409412
</StatusContainer>
410413
</View>
411414
<ThemedSwitch
415+
style={{ alignSelf: "center" }}
412416
disabled={props.disabled}
413417
onValueChange={props.onValueChange}
414418
value={props.value}
415419
/>
420+
{props.opensDetails || props.showChevron ? (
421+
<View style={{ opacity: props.opensDetails ? 1 : 0.4 }}>
422+
<SymbolView name="chevron.right" size={12} tintColorClassName="accent-icon-subtle" />
423+
</View>
424+
) : null}
416425
</View>
417426
);
418427
}

‎apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx‎

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function connectionStatusLabel(environment: ConnectedEnvironmentSummary): string
3535
export function ConnectionEnvironmentRow(props: {
3636
readonly environment: ConnectedEnvironmentSummary;
3737
readonly expanded: boolean;
38+
readonly opensDetails?: boolean;
3839
readonly onToggle: () => void;
3940
readonly onReconnect: (environmentId: EnvironmentId) => void;
4041
readonly onRemove: (environmentId: EnvironmentId) => void;
@@ -76,19 +77,22 @@ export function ConnectionEnvironmentRow(props: {
7677
}, [label, url, props]);
7778

7879
return (
79-
<Animated.View layout={LinearTransition.duration(250)} className="bg-card">
80+
<Animated.View layout={LinearTransition.duration(250)} className="bg-grouped-card">
8081
<Pressable
8182
className="flex-row items-center gap-3 px-4 py-3.5 active:opacity-70"
83+
accessibilityRole="button"
84+
accessibilityLabel={
85+
props.opensDetails ? `Manage ${props.environment.environmentLabel}` : undefined
86+
}
8287
onPress={props.onToggle}
8388
>
84-
<ConnectionStatusDot
85-
state={enabled || unsupported ? props.environment.connectionState : "available"}
86-
pulse={isRetrying}
87-
size={8}
88-
/>
89-
9089
<View className="flex-1 gap-0.5">
9190
<View className="flex-row items-center gap-1.5">
91+
<ConnectionStatusDot
92+
state={enabled || unsupported ? props.environment.connectionState : "available"}
93+
pulse={isRetrying}
94+
size={8}
95+
/>
9296
<EnvironmentMachineSymbol
9397
kind={resolveEnvironmentMachineKind(serverConfig)}
9498
size={14}
@@ -101,9 +105,11 @@ export function ConnectionEnvironmentRow(props: {
101105
{props.environment.environmentLabel}
102106
</Text>
103107
</View>
104-
<Text className="text-xs text-foreground-muted" numberOfLines={1}>
105-
{props.environment.displayUrl}
106-
</Text>
108+
{!props.environment.isRelayManaged && props.environment.displayUrl.trim() ? (
109+
<Text className="text-xs text-foreground-muted" numberOfLines={1}>
110+
{props.environment.displayUrl}
111+
</Text>
112+
) : null}
107113
{statusLabel ? (
108114
<Text
109115
className={cn(
@@ -126,12 +132,13 @@ export function ConnectionEnvironmentRow(props: {
126132
</View>
127133

128134
<ThemedSwitch
135+
style={{ alignSelf: "center" }}
129136
disabled={unsupported}
130137
onValueChange={(next) => props.onSetEnabled(props.environment.environmentId, next)}
131138
value={enabled}
132139
/>
133140
<SymbolView
134-
name="chevron.down"
141+
name={props.opensDetails ? "chevron.right" : "chevron.down"}
135142
size={12}
136143
tintColorClassName="accent-icon-subtle"
137144
type="monochrome"

‎apps/mobile/src/features/connection/GitHubRoutingSettings.tsx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,12 @@ export function GitHubRoutingSettings() {
4343
return (
4444
<View className="mt-5 gap-3">
4545
<SettingsSection title="GitHub routing">
46-
{[...catalog.entries.values()].map((entry, index) => {
46+
{[...catalog.entries.values()].map((entry) => {
4747
const environmentId = entry.target.environmentId;
4848
const selected = gitHubRoutingPermissionFor(entry, permissions);
4949
const disabled = !catalog.isReady || saving || gitHubRoutingConnectionKey(entry) === null;
5050
return (
51-
<View
52-
key={environmentId}
53-
className={index === 0 ? undefined : "border-t border-border-subtle"}
54-
>
51+
<View key={environmentId}>
5552
<Pressable
5653
accessibilityRole="button"
5754
accessibilityLabel={`${entry.target.label} GitHub routing`}
@@ -83,7 +80,7 @@ export function GitHubRoutingSettings() {
8380
accessibilityRole="radio"
8481
accessibilityState={{ checked: selected === option.value, disabled }}
8582
disabled={disabled}
86-
className="flex-row items-center gap-4 border-t border-border-subtle p-4 disabled:opacity-50"
83+
className="flex-row items-center gap-4 p-4 disabled:opacity-50"
8784
onPress={() => {
8885
setSaving(true);
8986
void update({ environmentId, permission: option.value }).then((result) => {

‎apps/mobile/src/features/connection/LocalEnvironmentList.tsx‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { View } from "react-native";
44

55
import { SymbolView } from "../../components/AppSymbol";
66
import { AppText as Text } from "../../components/AppText";
7-
import { cn } from "../../lib/cn";
87
import { ConnectionEnvironmentRow } from "./ConnectionEnvironmentRow";
98

109
type EnvironmentRowProps = ComponentProps<typeof ConnectionEnvironmentRow>;
@@ -15,14 +14,20 @@ export function LocalEnvironmentList({
1514
expandedId,
1615
onToggle,
1716
...rowActions
18-
}: Pick<EnvironmentRowProps, "onReconnect" | "onRemove" | "onSetEnabled" | "onUpdate"> & {
17+
}: Pick<
18+
EnvironmentRowProps,
19+
"onReconnect" | "onRemove" | "onSetEnabled" | "onUpdate" | "opensDetails"
20+
> & {
1921
readonly environments: ReadonlyArray<EnvironmentRowProps["environment"]>;
2022
readonly expandedId: EnvironmentId | null;
2123
readonly onToggle: (environmentId: EnvironmentId) => void;
2224
}) {
2325
if (environments.length === 0) {
2426
return (
25-
<View collapsable={false} className="items-center gap-3 rounded-[24px] bg-card px-6 py-8">
27+
<View
28+
collapsable={false}
29+
className="items-center gap-3 rounded-[24px] bg-grouped-card px-6 py-8"
30+
>
2631
<View className="h-12 w-12 items-center justify-center rounded-[16px] bg-subtle">
2732
<SymbolView
2833
name="point.3.connected.trianglepath.dotted"
@@ -40,13 +45,9 @@ export function LocalEnvironmentList({
4045
}
4146

4247
return (
43-
<View collapsable={false} className="overflow-hidden rounded-[24px] bg-card">
44-
{environments.map((environment, index) => (
45-
<View
46-
key={environment.environmentId}
47-
collapsable={false}
48-
className={cn(index !== 0 && "border-t border-border")}
49-
>
48+
<View collapsable={false} className="overflow-hidden rounded-[24px] bg-grouped-card">
49+
{environments.map((environment) => (
50+
<View key={environment.environmentId} collapsable={false}>
5051
<ConnectionEnvironmentRow
5152
environment={environment}
5253
expanded={expandedId === environment.environmentId}

0 commit comments

Comments
 (0)