Skip to content

Commit 1ee560b

Browse files
Merge branch 'main' into fix/pr-guide-failure-retry
2 parents 7cc3f3d + 740de0e commit 1ee560b

71 files changed

Lines changed: 3417 additions & 2070 deletions

File tree

Some content is hidden

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

‎.github/workflows/deploy-relay.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ on:
55
branches:
66
- main
77
# Redeploys main after a variable or secret change. Alchemy redeploys the
8-
# Worker when a value it reads changes, so force is rarely needed, and it
9-
# replaces the Postgres runtime role (alchemy-run/alchemy#1832).
8+
# Worker when a value it reads changes, so force is rarely needed.
109
workflow_dispatch:
1110
inputs:
1211
force:
13-
description: Redeploy every resource, including ones with no detected changes. Replaces the Postgres runtime role.
12+
description: Redeploy every resource, including ones with no detected changes.
1413
type: boolean
1514
default: false
1615

-771 KB
Binary file not shown.
774 KB
Binary file not shown.

‎apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ class T3WorkspaceNavigationView(
284284
},
285285
) {
286286
val fraction = progress.coerceIn(0f, 1f)
287+
val railShape = RoundedCornerShape(topEnd = 16.dp * fraction, bottomEnd = 16.dp * fraction)
287288
if (fraction > 0f) {
288289
Scrim(
289290
contentDescription = "Close navigation rail",
@@ -295,8 +296,8 @@ class T3WorkspaceNavigationView(
295296
Modifier
296297
.fillMaxHeight()
297298
.width(lerp(RAIL_WIDTH, EXPANDED_RAIL_WIDTH, progress.coerceAtLeast(0f)))
298-
.shadow(RAIL_SHADOW * fraction, RAIL_EXPANDED_SHAPE, clip = false)
299-
.background(Color(containerColor), RAIL_EXPANDED_SHAPE)
299+
.shadow(RAIL_SHADOW * fraction, railShape, clip = false)
300+
.background(Color(containerColor), railShape)
300301
.padding(top = safeAreaTop.dp, bottom = safeAreaBottom.dp + 12.dp)
301302
.selectableGroup(),
302303
) {
@@ -437,7 +438,6 @@ class T3WorkspaceNavigationView(
437438
val FAB_SIZE = 48.dp
438439
val ICON_SIZE = 24.dp
439440
val RAIL_SHADOW = 6.dp
440-
val RAIL_EXPANDED_SHAPE = RoundedCornerShape(topEnd = 16.dp, bottomEnd = 16.dp)
441441
const val DISABLED_ALPHA = 0.4f
442442

443443
// Labels fade in over the second half of the widening, once there is room for them, and

‎apps/mobile/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"react-native-pdf-jsi": "5.0.0",
128128
"react-native-reanimated": "4.7.1",
129129
"react-native-safe-area-context": "~5.10.1",
130-
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.45.tgz",
130+
"react-native-screens": "file:deps/react-native-screens-5.0.0-t3.48.tgz",
131131
"react-native-svg": "15.16.0",
132132
"react-native-webview": "14.0.1",
133133
"react-native-worklets": "0.13.0",

‎apps/mobile/src/App.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { OverlayPortalHost } from "./components/ui/OverlayPortal";
5252
import { shouldHandleAppLink, restoreDraftLinkState } from "./lib/appLinking";
5353
import { hasCloudPublicConfig } from "./features/cloud/publicConfig";
5454
import { takeScheduledTaskNewLink } from "./features/settings/scheduled-task-editor-state";
55-
import { startDevAutoConnect } from "./features/connection/devAutoConnect";
55+
import { pairingFormLinkAction, startDevAutoConnect } from "./features/connection/devAutoConnect";
5656
import {
5757
resolvePendingNewTaskPromptLink,
5858
takeNewTaskPromptLink,
@@ -129,6 +129,10 @@ const appLinking = {
129129
): ReturnType<typeof getActionFromState> =>
130130
// Our router handles the selection; React Navigation's type only lists its own actions.
131131
(workspaceDetailLinkAction(state) as ReturnType<typeof getActionFromState>) ??
132+
pairingFormLinkAction(
133+
state,
134+
rootNavigationRef.isReady() ? rootNavigationRef.getRootState() : undefined,
135+
) ??
132136
getActionFromState(state, options),
133137
getStateFromPath: getAppStateFromPath,
134138
};
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import type { ReactNode } from "react";
2+
import { act, Profiler } from "react";
3+
import { createRoot } from "react-dom/client";
4+
import { expect, it, vi } from "vite-plus/test";
5+
6+
const harness = vi.hoisted(() => ({
7+
Passthrough: ({ children }: { children?: unknown }) => children,
8+
}));
9+
10+
vi.mock("react-native", () => ({ View: harness.Passthrough }));
11+
vi.mock("expo-image", () => ({ Image: () => <img alt="" /> }));
12+
vi.mock("./ui/AppSymbol", () => ({ SymbolView: () => null }));
13+
vi.mock("./ui/AppText", () => ({
14+
AppText: ({ children }: { children?: ReactNode }) => <span>{children}</span>,
15+
}));
16+
vi.mock("../state/assets", async () => {
17+
const { Atom } = await import("effect/reactivity");
18+
const url = Atom.make<string | null>("https://example.test/favicon.png");
19+
return { projectFaviconUrlAtom: () => url };
20+
});
21+
22+
import { EnvironmentId } from "@t3tools/contracts";
23+
24+
import { ProjectFavicon } from "./ProjectFavicon";
25+
26+
it("mounts the favicon image in the first commit", async () => {
27+
(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
28+
const container = document.createElement("div");
29+
const root = createRoot(container);
30+
const commits: string[] = [];
31+
try {
32+
await act(async () =>
33+
root.render(
34+
<Profiler id="favicon" onRender={(_id, phase) => commits.push(phase)}>
35+
<ProjectFavicon
36+
environmentId={EnvironmentId.make("env-1")}
37+
projectTitle="Project"
38+
workspaceRoot="/repo"
39+
/>
40+
</Profiler>,
41+
),
42+
);
43+
expect(container.querySelector("img")).not.toBeNull();
44+
expect(commits).toEqual(["mount"]);
45+
} finally {
46+
await act(async () => root.unmount());
47+
}
48+
});

‎apps/mobile/src/components/ProjectFavicon.tsx‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,11 @@ function ProjectFaviconImage(props: {
163163
() => createProjectFaviconRequest(props.cacheKey, props.faviconUrl),
164164
[props.cacheKey, props.faviconUrl],
165165
);
166-
const [activeFaviconRequest, setActiveFaviconRequest] = useState<typeof faviconRequest>(null);
166+
// Registers with the module-level loader before the Image's native onLoad/onError can fire,
167+
// so stale loads for a superseded URL under the same cacheKey are ignored.
167168
useLayoutEffect(() => {
168169
if (faviconRequest === null) return;
169-
170-
const endRequest = beginProjectFaviconRequest(faviconRequest);
171-
// oxlint-disable-next-line react/set-state-in-effect -- Publishes the favicon request registered with the external loader until its cleanup runs.
172-
setActiveFaviconRequest(faviconRequest);
173-
return endRequest;
170+
return beginProjectFaviconRequest(faviconRequest);
174171
}, [faviconRequest]);
175172

176173
const [status, setStatus] = useState<"loading" | "loaded" | "error">(() =>
@@ -179,8 +176,7 @@ function ProjectFaviconImage(props: {
179176
: "loading",
180177
);
181178

182-
const requestIsActive = faviconRequest !== null && activeFaviconRequest === faviconRequest;
183-
const showImage = requestIsActive && status === "loaded";
179+
const showImage = faviconRequest !== null && status === "loaded";
184180
const fallbackGlyph = showImage ? null : projectAutoMonogram(props.projectTitle);
185181

186182
return (
@@ -203,7 +199,7 @@ function ProjectFaviconImage(props: {
203199
/>
204200
)}
205201

206-
{requestIsActive ? (
202+
{faviconRequest !== null ? (
207203
<Image
208204
key={faviconRequest.faviconUrl}
209205
source={

‎apps/mobile/src/components/ui/AndroidScreenHeader.tsx‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AppActivityIndicator } from "./AppActivityIndicator";
22
import { Column, Row, Text as NativeText, RNHostView } from "@expo/ui/jetpack-compose";
33
import { weight } from "@expo/ui/jetpack-compose/modifiers";
4-
import { useState, type ReactNode } from "react";
4+
import { use, useState, type ReactNode } from "react";
55
import { View } from "react-native";
66

77
import type { AppSymbolName } from "./AppSymbol";
@@ -12,6 +12,7 @@ import { splitAndroidHeaderActions } from "./headerMenu.android";
1212
import { useScaledTextRole } from "../../features/settings/appearance/useScaledTextRole";
1313
import { useToolbarLayout } from "./useToolbarLayout";
1414
import { useControlTheme } from "./useControlTheme";
15+
import { RoutedFormSheetContext } from "./RoutedFormSheetContext";
1516

1617
export interface AndroidHeaderAction {
1718
readonly accessibilityLabel: string;
@@ -50,7 +51,8 @@ export function AndroidScreenHeader(props: {
5051
const { colors } = useControlTheme();
5152
const titleTypography = useScaledTextRole("title");
5253
const subtitleTypography = useScaledTextRole("label");
53-
const { paddingTop, paddingBottom } = useToolbarLayout(props.embedded);
54+
const inFormSheet = use(RoutedFormSheetContext);
55+
const { paddingTop, paddingBottom } = useToolbarLayout(props.embedded || inFormSheet);
5456
const [headerWidth, setHeaderWidth] = useState(0);
5557
const { visibleActions, overflowActions } = splitAndroidHeaderActions(
5658
props.actions ?? [],
@@ -67,6 +69,12 @@ export function AndroidScreenHeader(props: {
6769
borderBottomWidth: props.hideBottomBorder ? 0 : undefined,
6870
}}
6971
>
72+
{inFormSheet ? (
73+
<View
74+
pointerEvents="none"
75+
className="absolute top-1 h-1 w-8 self-center rounded-full bg-header-foreground/40"
76+
/>
77+
) : null}
7078
<NativeAppBar
7179
singleLine={props.compact}
7280
navigationIcon={
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createContext } from "react";
2+
3+
export const RoutedFormSheetContext = createContext(false);

0 commit comments

Comments
 (0)