Repository navigation
fix(mobile): Agent's browser and browser preview no longer crash on open - #665
Conversation
The workspace pinned @react-navigation/core to 7.21.13 for TypeScript 7. @react-navigation/native 7.5.1 needs core ^7.24.0, and native-stack 7.21.0 calls the render() that only newer core returns, so every plain native stack threw 'undefined is not a function' on mount. Move the override to 7.24.0, the same change as pingdotgg/t3code#20131, and add a test that fails when a React Navigation package resolves outside its declared range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From the #654 review: with this PR applied locally on an iOS 26.5 simulator against the #654 preview, Agent's browser opened without the crash, and the #579 banner, status and Done all worked. The mirror area itself stayed blank on mobile, though: both while resting and while someone drove the tab from web, where the page rendered fine. Please check that the WebView renders the mirror once the crash is fixed; it may be a separate issue. |
|
Merged by the coordinator. CI was green on the head, with no bot findings. The builder's live proof is in this PR. A scratch merge of current main with #665, #706, #688, #693 and #651 passed: contracts 676 tests, automations 24, the api parity check 21, cloud GitHub and automations 38, mobile 17, plus server layer, compiler and upstream-sync hook tests. Typecheck was clean for contracts, cloud, server, web and mobile. |
Problem
On mobile, opening Agent's browser (fork) or the browser preview (upstream) throws
Render Error: undefined is not a functionincreateNativeStackNavigator.js. Closes #662 and #619: they're the same bug.pnpm-workspace.yamloverrides@react-navigation/coreto 7.21.13 (added upstream in pingdotgg/t3code#10663 for TypeScript 7). Upstream's Expo bump (#20067) then moved@react-navigation/nativeto 7.5.1, which requires core^7.24.0, andnative-stackto 7.21.0, which calls therender()thatuseNavigationBuilderonly returns from newer core. The override silently forced the old core, so every plaincreateNativeStackNavigatorthrows on mount. The app's own stacks usecreateV5StackNavigator(which readsNavigationContent), so on iOS only the two nested-stack screens crash; on Android upstream reports it crashes at launch.Fix
NavigationContent, so the custom navigators keep working, and the mobile typecheck passes, so the TypeScript 7 problem the override exists for doesn't come back.query-stringand its deps dropped);pnpm install --frozen-lockfilepasses.apps/mobile/src/navigation-dependencies.test.tswalks the installed@react-navigation/*graph from the app and fails when any package resolves outside another's declared range. It fails onmainwith@react-navigation/native@7.5.1 wants @react-navigation/core@^7.24.0, got 7.21.13and passes here. That's the guard for the next time the override doesn't move withnative.Verification
vp test run src/navigation-dependencies.test.ts: red onmain, green here.tsc-rs --noEmitinapps/mobile: clean.main's lockfile the core resolves to 7.21.13 and both screens throw the render error; with this branch (core 7.24.0) both open. Upstream'sBrowserPreviewRouteScreencrashes the same way, so Upstream's mobile browser screen likely crashes on iOS (nested stack navigator) #619 is this bug./agent-browser.htmlredirect), fixed in fix(mobile): Agent's browser shows the agent's page instead of a blank pane #706. With both applied, the mirror shows the agent's page and tapping a link in it opens my own copy in the thread's tabs.main)Upstream: pingdotgg/t3code#20131 (open, not ours) already makes this exact override change for the Android launch crash but couldn't check iOS. A comment with the iOS evidence is drafted in
upstream-drafts/20131-ios-comment.md, not posted.🤖 Generated with Claude Code