Skip to content

Commit aac74ee

Browse files
authored
Merge pull request #40 from pylon-code/upstream/2026-08-15-mobile-signout-crash
fix(mobile): prevent crash on sign out in settings
2 parents 4fdfddf + c6c6f51 commit aac74ee

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

.agents/upstream-review.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,28 @@ PR #26; typechecks clean on `t3`, `@t3tools/web`, `@t3tools/contracts`; `vp lint
11101110
clean on both branches. **Neither got an integration pass** — no live multi-terminal
11111111
session for `T1`, no Chrome/Safari clipboard check for `T2`.
11121112

1113+
## 2026-08-15 (targeted) — `1add47b322ab1dfb5010bb363613650176b88088..ad117235b544e23545fe39143812db2ddd41af1f`
1114+
1115+
**Cursor deliberately not advanced.** This was a targeted review, not a full
1116+
batch. The developer asked whether upstream held a fix or a cause for an iOS
1117+
crash on opening a session, so only mobile-relevant work was assessed. The
1118+
remaining candidates in this 99-commit range are undecided, and
1119+
`reviewed-through` stays at `1add47b32` until they are.
1120+
1121+
Answer to the question that prompted it: **no**. The range holds exactly one
1122+
mobile crash fix, `#4899`, and it guards sign-out in `SettingsAuthRouteScreen`
1123+
— a different code path from opening a session. `git cherry` reports all 99
1124+
commits absent from Pylon, so upstream work in this range cannot have caused
1125+
the regression either; the crash window is Pylon's own
1126+
`4c1830c6..24aac6537`. Every `patches/` entry except `@ff-labs__fff-node` is
1127+
identical to upstream, which rules out patch divergence as the cause.
1128+
1129+
| Change set | Upstream | Decision | Pylon reference | Rationale or revisit condition |
1130+
| ---------- | --------------------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1131+
| M1 | `277a7cb44` / `#4899` | adopted | `3b2b8d512` | Signing out of the mobile settings account screen crashed: `UserProfileView` unmounts the instant `isSignedIn` flips false. The fix latches `hasBeenSignedIn` and pops back to `SettingsContent` instead. Clean single-file cherry-pick. Newly reachable for Pylon — mobile Connect sign-in only began working today, so this screen had never been exercised before. |
1132+
1133+
Deferred register: unchanged and still empty.
1134+
11131135
## Deferred register
11141136

11151137
_The register is currently empty. DEF-1 and DEF-2 were adopted on 2026-08-11

apps/mobile/src/features/settings/SettingsAuthRouteScreen.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useAuth } from "@clerk/expo";
22
import { AuthView, UserProfileView } from "@clerk/expo/native";
33
import { StackActions, useNavigation } from "@react-navigation/native";
4-
import { useCallback, useLayoutEffect } from "react";
4+
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
55
import { View } from "react-native";
66

77
import { hasCloudPublicConfig } from "../cloud/publicConfig";
@@ -25,11 +25,21 @@ function ConfiguredSettingsAuthRouteScreen() {
2525
() => navigation.dispatch(StackActions.popTo("SettingsContent")),
2626
[navigation],
2727
);
28+
const hasBeenSignedIn = useRef(isSignedIn);
29+
if (isSignedIn) {
30+
hasBeenSignedIn.current = true;
31+
}
32+
33+
useEffect(() => {
34+
if (hasBeenSignedIn.current && isLoaded && isSignedIn === false) {
35+
navigation.dispatch(StackActions.popTo("SettingsContent"));
36+
}
37+
}, [isLoaded, isSignedIn, navigation]);
2838

2939
return (
3040
<View collapsable={false} className="flex-1 overflow-hidden bg-sheet">
3141
{isLoaded ? (
32-
isSignedIn ? (
42+
hasBeenSignedIn.current ? (
3343
<UserProfileView isDismissible={false} onHostBack={handleHostBack} />
3444
) : (
3545
<AuthView isDismissible={false} onHostBack={handleHostBack} />

0 commit comments

Comments
 (0)