GeezerVison is showing github.com — fix(mobile): settings and draft links no longer hang the running iOS app by juliusmarminge · Pull Request #27429 · pingdotgg/t3code
Conversation
Problem
A Settings link (t3code://settings/<page>, including the Subscription Usage widget's settings/usage?tab=limits) or a draft page link (new/draft/files, …) that reaches the running iOS app rebuilds the whole workspace. On a folded iPhone Duo the collapsed split view never finishes that transition: the app freezes until iOS kills it. Reproduced on main fa4e4677c0 on a pool iPhone Duo simulator (folded): with the app on the thread list, settings/about never opens and the next tap times out on the main thread; the same from the Pull requests tab with settings/appearance. A bare settings link over an open Settings page also pushes a second Settings route instead of going to the Settings tab.
Change
These links parse to three routes, so React Navigation answers with a plain RESET that the root stack rehydrates under a new key, with new keys for every route. The workspace navigators key their base screen on the root key, so the whole workspace is replaced.
runningAppLinkAction (in apps/mobile/src/lib/appLinking.ts, wired into appLinking.getActionFromState) handles links while the app is running:
- A Settings link opens the Settings tab the way the Settings button does (
settingsNavigationState): the live Home and Settings list keep their keys, and the linked page opens fresh so its params (tab=limits) apply again.
- Any other root
RESET keeps the live root key and reuses the keys of Home and of the leading routes the link repeats with the same params; only the linked page gets a new key.
Cold-start links, thread and pull request links, pairing links, and single-page links are unchanged.
Scope and approval
Fixes #27396
Verification
vp test run apps/mobile/src/lib/appLinking.test.ts: 38 passed. The five new tests in "links that arrive while the app runs" drive the real StackRouter, getStateFromPath and getActionFromState. On main's link chain, settings/about and new/draft/files get a new root key and a new Home key, and a bare settings link over an open About page leaves Home, Settings, SettingsAbout, Settings. A repeated settings/usage?tab=limits link reopens Usage, and a draft page link keeps the open draft's key.
vp run check:changed after merging main: format, lint, knip, typecheck, tests and React compiler pass.
Before, folded iPhone Duo simulator, iOS 27.2, 466×678, Light, main fa4e4677c0. Each strip shows the app before the link, then two later frames: seconds after the link, and after a tap on the rail. The page never opens, and the next tap fails with main thread execution timed out.
Thread list → settings/about:

Pull requests tab → settings/appearance:

Pixel 9, Android 16, 1080×2424, Light. The steps are: running thread list → settings/about → bare settings → Back. Before, Back returns to About through the duplicate Settings route; after, it returns to Threads.
| Pixel 9 · Light |
Before fa4e4677c0 |
After dd245160d1 |
| Recording |
 |
 |
| After one Back · Pixel 9 · Light |
Before fa4e4677c0 |
After dd245160d1 |
Diff0 |
DiffT (5% fuzz) |
| Final screen |
 |
 |
 |
 |
Control, iPhone 17 Pro, iOS 27.2, 402×874, Light (card stack, which never hung). Running thread list → settings/about → Back. About opens and Back reaches Settings on both sides. The only differences are the clock and status bar.
| iPhone 17 Pro · Light |
Before fa4e4677c0 |
After dd245160d1 |
Diff0 |
DiffT (5% fuzz) |
| Recording |
 |
 |
|
|
| About |
 |
 |
 |
 |
Not verified:
- The after side on the folded iPhone Duo. The pool simulator's "Open in T3 Code Dev?" launch prompt stopped accepting input on two hosts, so the dev client could not load for the after captures. The evidence that the hang is gone is the key-preservation tests: the hang needs a new root key, and the fix no longer produces one.
- The draft Files link on a device.
cannot-verify ios-device: the physical iPhone Duo watchdog kill (0x8BADF00D).
Model and harness: Claude Opus 5.5 (Claude Code) as lead, test writer and implementer; reviewers GPT-6.1-sol (Codex) and Claude Opus 5.5.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…g the workspace
These tests reproduce #27396: a settings/<page> or new/draft/<page> link
arriving while the app runs resets the root stack under new keys, and a
bare settings link over an open Settings page pushes a second Settings.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…orkspace
A Settings or draft-page link that arrived while the app ran fell through to
React Navigation's RESET of an unkeyed partial state. The root stack rehydrated
it under a new key, so the workspace navigator (keyed on the root) was replaced
and a collapsed iOS split view hung. A bare `settings` link over an open
Settings page also pushed a second Settings route.
With a live root, Settings-tab links now reset to the same state the Settings
button dispatches, and any other root RESET keeps the root's key and the live
keys of Home and of the leading routes the link repeats.
Fixes #27396
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The linked page now always opens fresh, so a second usage-widget tap
reapplies tab=limits; only the routes under it keep their keys.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approvability
Verdict: Approved at fd41f19
Macroscope's review found this PR approvable — Running-app settings and draft links preserve workspace navigation identity rather than rebuilding it, addressing the iOS hang. The change is confined to navigation handling, with existing cold-start and specialized link behavior retained.
No code changes detected at c87c34e. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 30, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Running-app deep links now use the live root navigation state to build navigation actions. Settings links use a targeted reset. Other reset actions reuse matching live routes. Tests cover settings and draft-page links, repeated settings links, and bare settings links.
Changes: Running-app links
| Layer / File(s) |
Summary |
Build actions from the live navigation state apps/mobile/src/lib/appLinking.ts |
runningAppLinkAction creates a targeted reset for settings links. For other reset actions, it reuses matching live routes and targets the live root key. |
Apply and test running-app actions apps/mobile/src/App.tsx, apps/mobile/src/lib/appLinking.test.ts |
getActionFromState passes the live root state and default action to runningAppLinkAction. Tests cover route preservation, draft names, repeated settings links, and bare settings links. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: maria-rcks
Merge Risk: Minimal · up to c87c3
-
Running-app Settings and draft links now build navigation actions from the live root state, which should stop them from replacing the workspace. Tests cover the main cases. The folded-device and draft Files behavior was not verified on a device, which is normal pre-merge uncertainty and not a concrete defect.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: settings and draft links no longer hang the running iOS app. It follows the conventional commit form and matches the PR objectives and the linked issue. It is 72 chara… |
| Description check |
 |
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem and Change sections are specific and explain the root cause (a plain RESET that rehydrates under a … |
| Linked Issues check |
 |
Issue #27396 requires that Settings and draft links received by a running app open their pages without replacing the live workspace, and that a bare settings link open the Settings tab. At the revie… |
| Out of Scope Changes check |
 |
The production changes are limited to running-app link handling: the runningAppLinkAction function and its wiring in App.tsx, and the associated tests in appLinking.test.ts. The new code reuses … |
Full details: Title check
-
Explanation
The title names the main change: settings and draft links no longer hang the running iOS app. It follows the conventional commit form and matches the PR objectives and the linked issue. It is 72 characters, which is within a typical limit.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem and Change sections are specific and explain the root cause (a plain RESET that rehydrates under a new root key) and the fix. Scope links issue #27396 and Verification lists focused test results, before/after evidence, and unverified items. Minor gaps: the Scope section does not follow the template's wording on why an issue is needed, and the template's agent-model line is present but the "Scope and approval" heading differs slightly from the template. These are non-critical.
Full details: Linked Issues check
-
Explanation
Issue #27396 requires that Settings and draft links received by a running app open their pages without replacing the live workspace, and that a bare settings link open the Settings tab. At the reviewed head, runningAppLinkAction in apps/mobile/src/lib/appLinking.ts handles both cases. When a live root exists and the link opens Settings, it builds a root-targeted RESET with settingsNavigationState, keeps the live Home and Settings routes, and appends the linked page with its params. A bare settings link resolves to the Settings tab without a second Settings route. For other RESET fallbacks, it keeps target: root.key, reuses the live keys of leading routes that repeat with the same params, and reuses the live Home route. Only the linked page receives a new key. The diff shows App.tsx passes the live root state and the React Navigation fallback to this function. Cold starts still use the fallback when no root exists. The test changes exercise the real StackRouter and link parsers for these key-preservation cases. The after-fix behavior on a folded iPhone Duo was not captured in the PR, so the device-level hang resolution rests on the key-preservation tests and code path, not on a device run.
Full details: Out of Scope Changes check
-
Explanation
The production changes are limited to running-app link handling: the runningAppLinkAction function and its wiring in App.tsx, and the associated tests in appLinking.test.ts. The new code reuses existing helpers (settingsNavigationState, settingsOpenIn, RootStackResetAction) for the linked behavior. The change does not alter cold-start, thread, pull request, pairing, or single-page link behavior, as described in the PR and shown in the diff. The PR description's screenshots and verification notes support the scope and do not add unrelated behavior.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
Note This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between bdec362 and c87c34e.
Files selected for processing: 1
-
Limit details: You’ve used all 10 included reviews currently available.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The automated pipeline stopped on this pull request and will not merge it:
someone else pushed to fix/issue-27396 (head is now fd41f19); the pipeline does not build on commits it did not review
It stays open for a person to finish or close.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The automated pipeline stopped on this pull request and will not merge it:
the capture step could not show the problem on the base commit, so there is nothing to prove fixed.
Both commits opened settings/about externally while the app was running. Head also received a bare settings link and displayed Settings without a visible Back button. The folded About screen covered the tab bar, preventing the scripted Chats interaction. Manual fallback failed before pairing was confirmed. No completed equivalent interaction demonstrated the reported freeze or its absence.
It stays open for a person to finish or close.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The automated pipeline ran the reported steps in the real app without this change, and the problem did not appear. So it cannot show that this change fixes anything.
What was run on f313d0a6cb, the commit before this change:
On the closed Duo, externally opened settings/about from the running thread list, tapped Back, selected Pull requests, externally opened settings/appearance, tapped Back, opened new/draft/files with the seeded environment and project IDs, and tapped Back. Then opened settings/about followed by bare settings. Both commits remained responsive. Base retained About after bare settings; head selected Settings. On the regular phone, repeated About then bare Settings: base retained About and its Back button returned to Settings; head selected the Settings tab without a Back button, and tapping Chats returned to the thread list.
How: Scenario runner attempted twice, followed by manual real-app verification. Separate base and head backends and Metro bundles used fresh isolated state, one synthetic project, and one replay thread. Tested iOS 27.2 in light appearance on a closed iPhone Duo, confirmed at 0 degrees with a 466x678-point outer panel, and a regular iPhone 18 Pro. Both commits used the same native-client fingerprint. Uploaded captures were inspected. Servers, device leases, scratch files, and disposable worktrees were cleaned up.
Closing this pull request. #27396 has been asked for the missing steps; once the problem can be shown this can be reopened, or the fix built again.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|