Repository navigation
Keep phone fork pull requests on their selected repository - #36762
Conversation
A disconnect or session change while the reviewer list loaded left the drawer showing an empty list until it was reopened. The drawer now shows its loading state while disconnected and fetches the same repository again once connected, still ignoring the cancelled load's result. Also merges a duplicate type import that failed mobile lint.
The reviewer picker now owns one query per open visit of a client, worktree and repository. A connection or session change retires the in-flight request at once but keeps the people already loaded; reconnecting refreshes them in the background. Without loaded people the drawer shows its spinner, or the existing connection explanation once an outage is revealed, and never a false empty list. Closing, retargeting or reopening starts a fresh visit that no earlier reply can paint. Also wraps the synchronous bridge teardown steps so the cleanup loop awaits only promises.
A relay/direct switch or reconnect selected a fresh, hidden PR observation in Source Control and Diff Review, so the next render unmounted the PR, closed the reviewer picker and erased an unsent comment. The PR observation is now scoped to the client, worktree and branch. One connection listener retires the in-flight reads when the connection changes and repeats the query the screen already asked for once connected, so accepted content stays mounted and refreshes in place. A failed background refresh keeps the accepted result. Task PR files likewise keep their loaded contents and expansion across a connection loss and read an interrupted file again on reconnect.
…ry connection change A failed refresh of an accepted PR (or no-PR) result now keeps the content and shows the existing "Failed to refresh pull request." line with Retry above it, whoever started the read, until the next good read. Task PR file reads are retired and re-read from the task selection's own connection listener, so a reconnect batched into one render or a connection switch at the same state also recovers an interrupted file. The reviewer-picker contract test leaves the React Native test program for now; its checked owner follows.
…2025/sta-12585-phone-pr-identity
…ns stay out of its Node-checked program
The desktop fork pull request is on main, so this branch follows it. A write reread keeps the shown pull request and its checks, and replaces a details read the write retired.
The sheet fixture omitted the required reread, so the phone typecheck failed. Desktop settlement tests that main already removed were still on this branch and pulled telemetry into the web typecheck.
Main removed another batch of low-value workspace tests. This branch follows that tree.
The sidebar already shows this sentence when a refresh fails. The English catalog omitted it, and the boot bundle still carried two strings no startup call needs.
Walkthrough
Pre-merge checks:
|
The sidebar records the client's connection before it loads a pull request. These tests drive that through the screen's connection prop, so the stand-in client only has to accept the subscription.
The changed-code check rejects a new cast unless the line says why it is sound. These tests still only subscribe and read connection state.
A same-numbered pull request in another repository is not this one. The loaded body has to name the repository the test selected.
|
A fork and upstream can have different pull requests with the same number. The phone could display one repository's details or reviewers while an action used the other. This change keeps the selected host, owner, repository and number together, keeps the phone's observation owner, and retains loaded details during the read after a write. When a newer detail revision is accepted, earlier thread, checks and file replies cannot replace its checks, errors or files, or delete its draft, even before the screen renders. Independent review finished on The existing iOS simulator run used Changes after the screenshot head: The test-only cleanup in For Brennan's review D1 — Reviewers search lists people for the selected repository. (screenshot removed: contained real product data) D2 — Stopping the host keeps the open sheet, search and rows steady. (screenshot removed: contained real product data) D3 — Restarting the host reconnects with the same search and rows. (screenshot removed: contained real product data) D4 — An empty offline search says “Can't connect”; the same search recovered after the host returned. (screenshot removed: contained real product data) D5 — The unsent draft remains after the host restarts. QA did not send it. (screenshot removed: contained real product data) Inherited issues listed for follow-up, outside this change: with several threads the overlay's comment box is at the end of the scroll; the Source Control route unmounts PR content on a full host drop; first-load content can shift and Merge can enable before details are known; Comments can show loading or no connection cue while offline; the generated description's wide table can clip. Earlier review also noted raw transport copy in existing phone flows. Main’s single GitLab details fetch is retained by this integration. The separate Viewed reconciliation race remains tracked in STA-12937. CI note: the unchanged WebKit Link/Image render test initially timed out waiting for its local image to load. One retry of that failed job passed all 481 render tests, including the exact WebKit case; successful jobs were retained. Independent tracing found an inherited malformed PNG test fixture on main, but did not prove it caused the timeout. That fixture is listed outside this change and remains unchanged. |
A fork and its upstream can have different pull requests with the same number. On a phone, opening the fork’s pull request could load upstream’s details or people, or send an action using a different repository from the one displayed. This PR keeps the selected GitHub host, repository and pull request together through the native and hosted phone experience, using the desktop and shared-server fix tracked in #36172.
The change covers Tasks pull-request details, the pull-request sidebar reached from Source Control and Diff Review, reviewer selection, metadata loading and actions. Accepted repository and item IDs stay attached to their originating request. Results from an earlier selection or detail revision cannot replace the current selection, and finishing an action releases that action’s pending state and file ownership without releasing a newer action. Hidden controls do not start metadata requests just to populate options that are not displayed; this does not expose new editors.
The native client, hosted page and phone shell move together. Requests retain the selected target through the native connection wait and the shell’s receipt and forwarding steps, then use the shared server’s final-connection check. This includes the tests, recording inputs and shared action owners needed by those callers; it is not a shell-only change. Execution host and credentials remain separate from the GitHub resource being viewed.
Full path: this changes request identity and ownership, pending-result acceptance, concurrent actions and independently versioned phone, page and server programs. It retains the plan and full review obligations of the original change.
Differences from the common pattern:
Validation: all CI checks passed on
608a03f69149776dc47a2e1625230f7cf626f69c, including Mobile app and test types, runtime tests, static analysis, Windows compiler diagnostics, the web bundle, relay integration and all test shards. Independent review accepted the final changes. The queued-reply regression failed on the earlier detail owner and passed after the repair; the focused run also passed all 1,627 affected tests. The iOS simulator run exercised the Diff Review overlay: reviewer rows and search stayed through a host stop and restart, an empty offline search showed “Can't connect” and recovered, and an unsent comment draft survived a restart. Later state and request-handling repairs retain those screens. The review status comment contains the screenshots and inherited issues outside this change.Test-size cleanup: duplicate cases and repeated standalone stream preludes were removed. Recording observations now focus on relevant identity, errors, busy settlement, drafts and file contracts while retaining real production-hook owners and setters. The real recorder regenerated 49 goldens, removing 27,284 net lines across 65 test/support/recording files without changing shipping code. The 22 named files passed all 1,684 tests, including fault and mutant checks; three deliberate observation omissions still failed as intended. Core repository, stale-reply, reconnect, migration, compatibility, queued-revision and bridge coverage remains.
The desktop and shared-server change tracked in #36172 has merged. This PR targets main and retains that contract, including ordinary versus explicit Refresh reads, the integrated repository-account wrapper from #35023, and #34245’s issue-only refresh and pending-fetch settlement.
Tracked in #36172. Tracked in STA-12585.