You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): fail over pull requests after a host timeout - #40939
A relay 504 leaves the mobile pull request screen waiting for its original environment even when another connected environment has the same repository.
Let the existing repository fallback run after a connection timeout. Keep the original environment during initial connection and while device approval is pending.
Verification
iPhone 17 simulator on iOS 26.5. With two paired environments sharing the same repository, I stopped the original endpoint from answering. On base 344de5fe8e, PR fix(mobile): attaching a photo on Android no longer fails while the + menu closes #40825 showed the timeout. With the patch, the same screen loaded its description, checks, reviews, and file list while the original endpoint still timed out.
The regression tests cover a relay HTTP 504, a direct timeout, and pending device approval. All 9 fallback tests passed with both iOS and Android compilation.
vp run check:changed and vp check passed. The mobile suite passed 3,734 tests and the scripts suite passed 296 tests with 20 skips.
No actionable comments were generated in the recent review.
Walkthrough
The pull request environment fallback now considers the requested environment’s last connection failure. Timeout and HTTP 504 failures trigger fallback to a connected repository copy while reconnecting. Approval-pending failures retain the requested environment.
Changes: Pull request environment fallback
Layer / File(s)
Summary
Pass connection failures into fallback selection apps/mobile/src/features/pull-requests/pullRequestEnvironmentFallback.ts, apps/mobile/src/features/pull-requests/usePullRequestEnvironmentFallback.ts
The hook passes the requested environment’s last connection failure to the fallback function. While reconnecting, the function retains the requested environment unless the failure is a timeout or has HTTP status 504.
Test timeout and pending-approval outcomes apps/mobile/src/features/pull-requests/usePullRequestEnvironmentFallback.test.tsx
Tests provide connection catalog state and check fallback behavior for timeout, HTTP 504, and approval-pending failures.
pingdotgg/t3code#24262: Changes the conditions for retaining a requested pull request environment or falling back to another connected repository copy.
Suggested reviewers:juliusmarminge, macroscopeapp
Merge Risk: Minimal · up to 8557b
Pull requests should now load from another connected environment after a host timeout or HTTP 504, while initial connection and pending device approval still keep the original environment. I found no concrete defect in the change, and it is low risk to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(mobile): fail over pull requests after a host timeout" matches the main change. The raw summary and PR objectives both describe a fallback to another connected environment after a relay…
Description check
The description covers the problem, the change, and verification, and it follows the template's intent. It states the problem (a relay 504 leaves the screen waiting on the original environment) and th…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(mobile): fail over pull requests after a host timeout" matches the main change. The raw summary and PR objectives both describe a fallback to another connected environment after a relay 504 or direct timeout, so the title is specific and on topic. It uses a conventional commit prefix and avoids vague wording. The PR objectives cite PR number #40939 while the description shows the same title, so no conflict affects the verdict.
Full details: Description check
Explanation
The description covers the problem, the change, and verification, and it follows the template's intent. It states the problem (a relay 504 leaves the screen waiting on the original environment) and the change (run the repository fallback after a connection timeout while keeping the original environment during initial connection and pending approval). Verification is detailed, with a simulator run, named regression tests, and before/after screenshots. The Scope section is missing: the description does not link an issue that shows the bug, does not explain why no issue is needed, and does not say whether a maintainer requested the PR. The template's agent attribution line is present ("Built with Codex (GPT-6.2 Sol) in T3 Code."). The PR is mostly complete, so the check passes, but the author should add the Scope information.
Resolution
Add a Scope section. Link the issue that shows the bug, or explain why a small obvious fix needs no issue. Link any maintainer request for the PR. Keep the section headings from the template.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
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.
A relay 504 leaves the mobile pull request screen waiting for its original environment even when another connected environment has the same repository.
Let the existing repository fallback run after a connection timeout. Keep the original environment during initial connection and while device approval is pending.
Verification
344de5fe8e, PR fix(mobile): attaching a photo on Android no longer fails while the + menu closes #40825 showed the timeout. With the patch, the same screen loaded its description, checks, reviews, and file list while the original endpoint still timed out.vp run check:changedandvp checkpassed. The mobile suite passed 3,734 tests and the scripts suite passed 296 tests with 20 skips.Built with Codex (GPT-6.2 Sol) in T3 Code.