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
Keep desktop fork pull requests on their opened repository - #36172
Opening a fork pull request from a clone that also tracks upstream can show upstream’s different pull request with the same number, then use the wrong files, conversation or action IDs. This PR keeps the opened GitHub host, repository and pull request together throughout the desktop GitHub dialog and Tasks PR page: every tab, action, cache entry and pending result uses that identity while retaining the selected account and execution host.
The dialog and Tasks page share the complete details and cache owner. Repository options are cached by repository and account rather than fetched again for each PR number. Comments that finish after navigation update their originating pull request, and Viewed requests release their own pending state without changing a successor’s state. Shared GitHub views also stop reading browser storage merely because they are loaded; browser setup and requests retain their existing saved-pairing behavior.
The shared server changes keep target support optional for older clients and carry the selected repository through the full provider operation. Updated clients check that the executing server supports the requested operation, including the final server behind a relay. An unsupported generic operation produces one existing-surface server-update error rather than acting on a repository rediscovered from the clone. Existing exact PR-body, Project, repository-option and accepted node/path operations keep their routes and credentials; matching older-server reads remain usable. Ordinary opens retain their fallback and cached-read behavior. Explicit issue Refresh uses a strict, uncached read only when the executing server declares that support; newer clients also preserve the existing canonical-only server encoding. No minimum server version, new permission, saved field or RPC method is introduced.
If a project's GitHub account changes before the host starts a details read, repository-option load or Viewed update, the updated local implementation or a capable server fails that stale request before reading or changing GitHub. An operation already started keeps its original account. The request's captured account and cache entry stay together; navigating away does not cancel another view's valid pending read.
Full path: this changes resource identity, account and request ownership, caches and pending-result settlement, concurrency, and independently versioned clients and servers. It has a plan and the full review loop.
Differences from the common pattern:
Intended: keep execution host, source and account separate from the opened GitHub resource, including local, paired, SSH and WSL execution. Opening a different repository does not select different credentials or broaden access.
Intended: retain explicit GitHub Enterprise host identity and configured-remote trust for exact repository lookups. Mutations and repository options preserve their existing authenticated override behavior and workspace-level permissions.
Intended: preserve exact legacy operations and matching reads while refusing generic operations whose server explicitly declares that the required target semantics are unsupported.
Intended: missing read intent remains an ordinary open, preserving stable clients’ fallback and caching. Explicit Refresh is sent separately when supported. The older developer-hourly owner-only Refresh dialect is treated as ordinary on the updated server under the approved compatibility policy of 2026-11-01.
Intended: preserve the host's applied project-account selection and existing bound-account execution. The check verifies that selected host/login, or the existing unbound policy; it does not certify an external token's identity. Older paired servers keep their existing account behavior (same as today); the account-switch guarantee applies to matched local code and servers that report github.account-expectation.v1. The older-server account-switch read and Viewed race remains. No new refusal or notice is added for a missing declaration.
Intended: browser module loading leaves pairing unselected until the existing synchronous setup or request boundary reads the actual saved pairing. A storage failure still stops that acquisition before an API is installed; it does not select a different execution host.
Intended: keep the native and hosted phone program at main’s existing behavior in this PR, including older installed phones paired with an updated capable host. The older phone bridge retains its existing narrow connection-switch race between checking and sending; this PR does not add an update-phone requirement.
Temporary: a background PR-details read can still leave a Viewed checkbox unchecked after GitHub accepted the mark, and an immediate reopen can reuse that answer. This inherited race is tracked in STA-12937. This PR repairs pending release, matching rollback and successor isolation; complete reconciliation of successful Viewed changes remains separate. Separate inherited transport lifetime and recovery defects are outside this change.
Final head 89c7b8fd2d33f32bfce400881b0d8604630adcb3 is source-reviewed and published. Root CI passed on generated merge 20c24b023b08, into main 51cb2f189c13; the CI merge was checked as a clean union. Static analysis, the five root compiler programs, dependency isolation, RPC catalog, localization and performance contracts ran successfully. All 26 changed test files, all 21 census paths and the browser test list passed at file level. The 12 shards cover the full 13,616-file selection with no gaps, duplicates or unhandled errors (13,437 passed, 179 skipped; no PR-relevant file skipped). Packaging, Windows parity and the separate WSL distro workflow passed. Conditional e2e, cross-version wire and contract jobs were skipped. Mixed-version unit fixtures passed. Baseline Mobile checks do not validate the separate phone follow-up. The final source, reference comparison, performance and readiness reviews are complete for this desktop change.
Earlier Tasks app checks verified rendered fork details, conversation, files, checks, list-route reentry and a private Viewed toggle restored afterward. They used the d9680e4c7685e3b022df044b346003d61a0802eb desktop build, checked again at b37b7b4a5c3f17fe755d9532ff512b59ef9f9318 after test-only changes and a type-only import adjustment. That evidence carries only for unchanged flows. Windows checks at 0c73076368cbd452fa6700e0aff4c882d54c4854 also exercised the mention error against a real 1.4.245 server; the error remained visible with no matching option, and Escape preserved the unsent draft. The pinned-main comparison exercised fork details, conversation and files, but did not reproduce the original defect in that single sequence.
Search resolved each repository’s URL into the existing Create worktree route. A targeted Windows check using the same 0c73076368cbd452fa6700e0aff4c882d54c4854 build verified upstream/fork lookup and sequential reentry, with the final row and dialog chip retaining the fork. A native handler observer recorded the fork details read and all 26 distinct file-content requests against the fork, and the opened file rendered the expected content. Reentry inputs were 25 seconds apart; this run did not stress overlapping requests. The copy stopped gracefully, no recorded processes survived, and real configuration hashes were unchanged. Later commits retain this evidence only for unchanged app flows; current tests cover the changed protocol and ownership flows. They were not launched as part of that run. The repository-backed Project check is now complete on 43ade101c7c8ea084260f4a7d22c02fafd8824b4. In a real private GitHub Project, opening upstream first then the fork reproduced the defect on pinned main 3fa0f200: the fork title showed upstream’s Merged state, description, comment and two files. The branch showed the fork’s Draft state, description, empty comments, 38 matching checks and 26 files; twelve distinct content paths and two diffs were sampled. The earlier Tasks run covered all 26 file contents. Request evidence tied the observed reads and the personal Viewed toggle to the fork; the toggle was restored through the UI, both pull requests returned to all files unviewed, and the sample Project was deleted. Closing and reopening retained the correct fork. The test copy stopped gracefully and five real configuration hashes were unchanged. Console warnings from the diff viewer occurred on reentry without a visible failure; main’s console was not captured, so their cause is unassigned. This running-app evidence carries only for unchanged flows; the branch build was not the current published head. The phone follow-up has its own separate validation requirements.
Overlaps #34245 and #35023. Both changes are integrated. #35023’s complete repository-account execution wrapper is preserved. #34245’s issue-only Refresh and unconditional pending-fetch settlement are preserved, with separate ordinary and explicit Refresh intent. Mixed client/server compatibility remains required.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Walkthrough
The changes add repository-aware GitHub work-item targeting across shared RPC contracts, runtime and relay request paths, renderer details and metadata, and mobile task actions. Requests can include repository identity and expected runtime-source information. Detail responses, cache entries, and asynchronous UI updates are checked against work-item identity and current connection state. The changes also add tests for authority checks, target mismatches, cancellation, retries, stale results, and bridge recording behavior.
Merge Risk: Low · previous review d9680
Previously reported issues may still affect targeted GitHub operations and leave some mobile updates or picker states stale. The authorization concern needs owner clarification; the other known effects are localized.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
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.
Title check
The title clearly and concisely describes the primary change: keeping desktop fork pull requests tied to their opened repository.
Description check
The description is comprehensive and covers the change, rationale, linked issues, visual proof, testing, risks, compatibility, limitations, and rollback context. It does not use the template headings …
Full details: Description check
Explanation
The description is comprehensive and covers the change, rationale, linked issues, visual proof, testing, risks, compatibility, limitations, and rollback context. It does not use the template headings or checklist format, and it does not include an explicit Fixes # reference, but the linked issue context is present and the required information is mostly complete.
Full details: Docstring Coverage
Explanation
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 108 functions across 129 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Apply the detailsLoaded guard to the page Files tab. · tabs-shell.tsx:183
src/renderer/src/components/pull-request-page/page/tabs-shell.tsx:183 Minor · Functional Correctness · Quick win
Apply the detailsLoaded guard to the page Files tab.
Before the fetch effect starts, details is null, loading is false, and files is empty. The Files tab can therefore render “No files changed.” briefly for a pull request that has files. detailsLoaded is already available in this component's props.
The target-mismatch cache case sets an error, so it does not reach this empty-state branch.
235-237: Minor · Maintainability & Code Quality · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Localize the new refusal message.
The new error text is hard-coded English. The same module already uses translate('session.githubPrRpc.requestFailed', ...) for its fallback, and the picker shows outcome.error verbatim. Users with other locales therefore see an untranslated message. The repository also runs mobile localization coverage checks (verify:mobile-localization-coverage), which may flag this literal.
🌐 Proposed fix
if (!prRepo) {
- throw new Error('Unable to identify this pull request. Open it again.')+ throw new Error(+ translate(+ 'session.githubPrRpc.unidentifiedPullRequest',+ 'Unable to identify this pull request. Open it again.'+ )+ )
}
Update the test assertion if it depends on the English fallback.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 0a40a5b2-f541-47e0-867b-99a8d9093e92
Commits
Reviewing files that changed from the base of the PR and between 099e5d0 and b212ba0.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
brennanb2025
changed the title
Keep fork pull request dialogs on their opened repository
Keep fork pull requests on their opened repository
Oct 30, 2026
Remove the dead helpers or restore the deleted crash tests.
This change deletes the screenMount and hookScreenMount crash-projection tests. It keeps their imports and helpers under underscore names only to silence the unused-variable lint. Crash recording in mounted-screen-tree.ts no longer has coverage. Either restore the two tests or delete _Broken, _effectSink and the aliased imports.
The slug-options assertion calls the mock directly and tests no production code.
Line 486 calls io.rpc from the test, with a target that the test supplies. The assertion on Line 491 therefore proves only that the mock forwards to listLabelsBySlug. It does not prove that any renderer path keeps Project slug options on { kind: 'environment', environmentId: 'original' }. The test title claims runtime and credential retention for slug options. Drive a real consumer instead (for example, the Project label options hook or component with projectOrigin), and assert the io.rpc call that consumer issues.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: aad54c85-8a75-4d63-a291-975a0da69018
Commits
Reviewing files that changed from the base of the PR and between d9cf450 and 15ff00a.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Remove the dead helpers or restore the deleted crash tests.
This change deletes the screenMount and hookScreenMount crash-projection tests. It keeps their imports and helpers under underscore names only to silence the unused-variable lint. Crash recording in mounted-screen-tree.ts no longer has coverage. Either restore the two tests or delete _Broken, _effectSink and the aliased imports.
The slug-options assertion calls the mock directly and tests no production code.
Line 486 calls io.rpc from the test, with a target that the test supplies. The assertion on Line 491 therefore proves only that the mock forwards to listLabelsBySlug. It does not prove that any renderer path keeps Project slug options on { kind: 'environment', environmentId: 'original' }. The test title claims runtime and credential retention for slug options. Drive a real consumer instead (for example, the Project label options hook or component with projectOrigin), and assert the io.rpc call that consumer issues.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: aad54c85-8a75-4d63-a291-975a0da69018
Commits
Reviewing files that changed from the base of the PR and between d9cf450 and 15ff00a.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
# Locate the helper definitions and the drift/closure functions.
rg -n -F -e 'afterCorpus' -e 'corpusChecks' -e 'observed = ' -e 'observed.set' -e 'readPageClosure' -- mobile/src/test-support ||test"$?" -eq 1
rg -n -A40 -e 'pageClosureDrift\s*\(' -e 'pageClosureDrift\s*=' -e 'export function pageClosureDrift' -- mobile/src ||test"$?" -eq 1
# Read the test-file region containing the observation helper and the corpus-check registration.
sed -n '560,640p' mobile/src/test-support/rpc-recording/bridged-recording-corpus.test.ts
Repository: stablyai/orca
Length of output: 14629
Skip the page-closure checks when their observations are absent.
When RPC_FOUNDATION_BRIDGE is 0, the page-bridge tests do not run. The four closure checks still register inside the skipped describe callback. The top-level afterAll then runs them against an empty observed map. Each pinned id is reported as "left", so the file fails even though the opt-out was intended to skip this gate. A name-filtered run can produce the same failure for the goldens it skips.
Gate the registration on the opt-out. This covers the local opt-out case:
Suggested fix
function afterCorpus(_id: string, check: () => void) {
- corpusChecks.push(check)+ if (process.env[BRIDGED_PARITY_FLAG] !== BRIDGED_PARITY_OFF) {+ corpusChecks.push(check)+ }
}
A name-filtered run still needs a separate guard. Run the closure checks only when every golden in the pinned families was observed. Otherwise, skip those checks.
# Read the changed file in full.
cat -n mobile/src/test-support/rpc-recording/scenario-execution-mode.ts
# Locate the consumers of site, golden id, and reply branch logic.
rg -n -F -e 'replyMatrixGoldenId' -e 'matrixSites' -e 'replyBranches' -e 'driveReplyMatrix' -e 'materializeScenario' mobile/src ||test"$?" -eq 1
# Check for sites that use the positional form, or ids that would fail goldenPath.
rg -n -F -e ':steps[' mobile/src mobile/rpc-foundation ||test"$?" -eq 1
rg -n -F '"site"' mobile/rpc-foundation mobile/src/test-support ||test"$?" -eq 1
Repository: stablyai/orca
Length of output: 8175
Script executed:
# Read the reply-matrix consumers: site ids, golden id construction, and branch lookup.
sed -n '55,140p' mobile/src/test-support/rpc-recording/reply-matrix.ts | cat -n
# Read the expected golden id in the runner test.
sed -n '258,272p' mobile/src/test-support/rpc-recording/recording-runner.test.ts
# Read the step and branch shape around status.get#1 in the pilot scenario.
sed -n '11810,11840p' mobile/rpc-foundation/pilot-scenarios.json
# Check whether any golden filename contains characters rejected by goldenPath.
fd . mobile/rpc-foundation/goldens | rg -n '[:\[\]]'||test"$?" -eq 1
Repository: stablyai/orca
Length of output: 5097
Positional site default overrides completion-name and frame ids.
Line 16 gives every step without an explicit site a positional value. Line 23 therefore never falls back to complete. Frame steps lose their ${frame}@${occurrence} ids as well.
For complete steps, matrixSites now yields ids such as <scenario-id>:steps[2]. replyMatrixGoldenId keeps :, [ and ], and goldenPath rejects them with Unsafe scenario id. The golden ids also no longer match the completion-name goldens already in the repository.
replyBranches entries match on entry.site === request. An entry such as "site": "status.get#1" cannot match a step that now has a positional id, so driveReplyMatrix never applies that branch.
Apply the positional default only to steps that matrixSites does not name. Complete steps then fall back to the completion name, and frame steps keep their frame-based ids.
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
113-119: Minor · Stability & Availability · Quick win
Await the async dispose() calls and close causality in these finally blocks.
ScriptedRpcTransport.dispose() is now async. It can reject with the collected cleanup errors. These blocks call original.dispose(), replacement.dispose() and transport.dispose() without await. A rejection then becomes an unhandled rejection that Vitest reports outside this test, or it is lost. The blocks also skip causality.assertTransparentCalls() and causality.close(), which every other updated transport test runs. The AsyncLocalStorage instances therefore stay enabled.
The test runs the real gh binary through runProcess({ program: 'gh', ... }). The subprocess environment passes only PATH, SystemRoot, TEMP, TMP, and fixture values. The file has no skip condition and no availability check. On a machine or runner without gh, the subprocess cannot start. The test can then fail for a reason unrelated to the change.
Either skip the test when gh is absent, or document gh as a prerequisite for running this suite.
brennanb2025
changed the title
Keep fork pull requests on their opened repository
Keep desktop fork pull requests on their opened repository
Oct 31, 2026
Opening a fork pull request could show upstream’s different pull request with the same number and then use its files, conversation or action IDs. The desktop GitHub dialog and Tasks PR page now keep the opened host, repository, kind and number throughout reads, actions, cached results and late replies. Execution host and account remain separate from that resource.
The fix shares the existing details owner across both surfaces, caches repository options by repository/account, and settles late comments and Viewed requests into their captured pull request. A capable executor checks the captured account before starting GitHub work; an already admitted request keeps its original account. Older servers keep their existing supported operations and account behavior. Unsupported generic exact-target operations show the existing update-server error rather than act on a rediscovered repository. Ordinary opens retain fallback and caching; explicit issue Refresh keeps its strict read when supported.
Reviewed head 89c7b8fd2d33f32bfce400881b0d8604630adcb3 is source-reviewed. Published head d388639e299633f75843a841b124173c5adf3a17 merges main after 8310b1daa65dcdcdbb198988a8a057b39d8eb3af, which only drops duplicate tests. Root CI passed on generated merge 20c24b023b08, into main 51cb2f189c13; the CI merge was checked as a clean union. Static analysis, the five root compiler programs, dependency isolation, RPC catalog, localization and performance contracts ran successfully. All 26 changed test files, all 21 census paths and the browser test list passed at file level. The 12 shards cover the full 13,616-file selection with no gaps, duplicates or unhandled errors (13,437 passed, 179 skipped; no PR-relevant file skipped). Packaging, Windows parity and the separate WSL distro workflow passed. Conditional e2e, cross-version wire and contract jobs were skipped. Mixed-version unit fixtures passed. Baseline Mobile checks do not validate the separate phone follow-up. The final source, reference comparison, performance and readiness reviews are complete for this desktop change. No individual case counts are inferred. Out of draft, with all six review threads resolved. Mergeability is checked again on the published head.
App evidence is retained for the flows later commits did not change:
The repository-backed Project dialog ran on 43ade101c7c8ea084260f4a7d22c02fafd8824b4. Pinned main 3fa0f200 showed upstream’s Merged state, body, comment and two files under the fork title. The branch showed the fork’s Draft state, body, empty conversation, 38 checks and 26 files. Twelve distinct content paths and two diffs were sampled; observed reads and personal Viewed writes targeted the fork. Closing and reopening retained the fork. Viewed was restored through the UI, both pull requests returned to all files unviewed, and the private sample Project was deleted. All 12 recorded processes were absent afterward and five real configuration hashes were unchanged.
Tasks and Search evidence on 0c73076368cbd452fa6700e0aff4c882d54c4854 includes fork details, conversation, checks, reentry and all 26 distinct file-content reads targeting the fork. Reentry inputs were sequential, 25 seconds apart, not overlapping-request stress. A personal Viewed toggle was restored. A real 1.4.245 server kept the mention error visible, and Escape preserved the unsent draft. The pinned-main Tasks sequence did not reproduce the original defect; the Project comparison above did.
Limits: the GitHub button destination was not exercised. Diff-viewer console warnings on Project reentry had no visible failure; main’s console was not captured, so their cause remains unassigned. The evidence does not claim a launch of the current published head.
Main integrations since Tasks QA are baa988714e65 (main c408634a), bac508275550 (main 964fe5b7), 43ade101c7c8 (main 3fa0f200), 57871feaf9f4 (main 263d3b16), ce1f2cbc00c4 (main 8e326f26) and 7c570f17d407 (main 8458e704). Project QA ran on 43ade; subsequent merges were checked for conservation. Later PR code changes affect tests-row flows, with no changed layout or run-row flow:
Commits
Changed flow
Verification
ce1f2cbc00c4
Separate ordinary details from explicit Refresh across mixed versions
Reviewed; owning test files passed: lookup, isolation, RPC, relay and query-command fixtures
fa44a08812b9
Keyed details queries retain valid pending ownership across navigation
Reviewed; owning test files passed: target-sharing and mounted reconnect/remount fixtures
c3c3e33e200b, 12cf6083e4e8
Account capture, client dispatch, metadata and Viewed settlement
Reviewed; owning test files passed: real schema/dispatcher/IPC, held status and web adapter fixtures
dff18b9a64c8
Preserve the status already observed during environment switching
Reviewed; owning test files passed: Settings and capable-server switch fixtures
Types and test setup; restore the existing negative-capability assertion
Preserving review; compiler, static gates and owning fixtures passed
8310b1daa65
Duplicate fork-identity tests removed. The fork-versus-upstream, addressed-write, old-server, and account-capture tests stay
Test-only. No new app run
d388639e299
Merge main. The shared details owner stays. A failed write still leaves the open pull request up and owes one fresh read, including Checks
Main merge. No new app run
Deferred: native and hosted phone changes and their complete verification are tracked in #36762. This desktop repair is useful independently; baseline phone checks do not verify that follow-up. The inherited Viewed reconciliation race is tracked in STA-12937. The inherited Tasks source-summary label can name upstream while Origin items are shown; routing is correct, and the follow-up is tracked in STA-13220. Repository options and issue-update overrides retain existing workspace permissions. One unused test mock remains a cleanup nit. Older undeclared servers retain the account-switch read/Viewed race; the new guarantee applies to matched local code and servers declaring github.account-expectation.v1.
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
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.
Opening a fork pull request from a clone that also tracks upstream can show upstream’s different pull request with the same number, then use the wrong files, conversation or action IDs. This PR keeps the opened GitHub host, repository and pull request together throughout the desktop GitHub dialog and Tasks PR page: every tab, action, cache entry and pending result uses that identity while retaining the selected account and execution host.
The dialog and Tasks page share the complete details and cache owner. Repository options are cached by repository and account rather than fetched again for each PR number. Comments that finish after navigation update their originating pull request, and Viewed requests release their own pending state without changing a successor’s state. Shared GitHub views also stop reading browser storage merely because they are loaded; browser setup and requests retain their existing saved-pairing behavior.
The shared server changes keep target support optional for older clients and carry the selected repository through the full provider operation. Updated clients check that the executing server supports the requested operation, including the final server behind a relay. An unsupported generic operation produces one existing-surface server-update error rather than acting on a repository rediscovered from the clone. Existing exact PR-body, Project, repository-option and accepted node/path operations keep their routes and credentials; matching older-server reads remain usable. Ordinary opens retain their fallback and cached-read behavior. Explicit issue Refresh uses a strict, uncached read only when the executing server declares that support; newer clients also preserve the existing canonical-only server encoding. No minimum server version, new permission, saved field or RPC method is introduced.
If a project's GitHub account changes before the host starts a details read, repository-option load or Viewed update, the updated local implementation or a capable server fails that stale request before reading or changing GitHub. An operation already started keeps its original account. The request's captured account and cache entry stay together; navigating away does not cancel another view's valid pending read.
Full path: this changes resource identity, account and request ownership, caches and pending-result settlement, concurrency, and independently versioned clients and servers. It has a plan and the full review loop.
Differences from the common pattern:
github.account-expectation.v1. The older-server account-switch read and Viewed race remains. No new refusal or notice is added for a missing declaration.Final head
89c7b8fd2d33f32bfce400881b0d8604630adcb3is source-reviewed and published. Root CI passed on generated merge20c24b023b08, into main51cb2f189c13; the CI merge was checked as a clean union. Static analysis, the five root compiler programs, dependency isolation, RPC catalog, localization and performance contracts ran successfully. All 26 changed test files, all 21 census paths and the browser test list passed at file level. The 12 shards cover the full 13,616-file selection with no gaps, duplicates or unhandled errors (13,437 passed, 179 skipped; no PR-relevant file skipped). Packaging, Windows parity and the separate WSL distro workflow passed. Conditional e2e, cross-version wire and contract jobs were skipped. Mixed-version unit fixtures passed. Baseline Mobile checks do not validate the separate phone follow-up. The final source, reference comparison, performance and readiness reviews are complete for this desktop change.Earlier Tasks app checks verified rendered fork details, conversation, files, checks, list-route reentry and a private Viewed toggle restored afterward. They used the
d9680e4c7685e3b022df044b346003d61a0802ebdesktop build, checked again atb37b7b4a5c3f17fe755d9532ff512b59ef9f9318after test-only changes and a type-only import adjustment. That evidence carries only for unchanged flows. Windows checks at0c73076368cbd452fa6700e0aff4c882d54c4854also exercised the mention error against a real 1.4.245 server; the error remained visible with no matching option, and Escape preserved the unsent draft. The pinned-main comparison exercised fork details, conversation and files, but did not reproduce the original defect in that single sequence.Search resolved each repository’s URL into the existing Create worktree route. A targeted Windows check using the same
0c73076368cbd452fa6700e0aff4c882d54c4854build verified upstream/fork lookup and sequential reentry, with the final row and dialog chip retaining the fork. A native handler observer recorded the fork details read and all 26 distinct file-content requests against the fork, and the opened file rendered the expected content. Reentry inputs were 25 seconds apart; this run did not stress overlapping requests. The copy stopped gracefully, no recorded processes survived, and real configuration hashes were unchanged. Later commits retain this evidence only for unchanged app flows; current tests cover the changed protocol and ownership flows. They were not launched as part of that run. The repository-backed Project check is now complete on43ade101c7c8ea084260f4a7d22c02fafd8824b4. In a real private GitHub Project, opening upstream first then the fork reproduced the defect on pinned main3fa0f200: the fork title showed upstream’s Merged state, description, comment and two files. The branch showed the fork’s Draft state, description, empty comments, 38 matching checks and 26 files; twelve distinct content paths and two diffs were sampled. The earlier Tasks run covered all 26 file contents. Request evidence tied the observed reads and the personal Viewed toggle to the fork; the toggle was restored through the UI, both pull requests returned to all files unviewed, and the sample Project was deleted. Closing and reopening retained the correct fork. The test copy stopped gracefully and five real configuration hashes were unchanged. Console warnings from the diff viewer occurred on reentry without a visible failure; main’s console was not captured, so their cause is unassigned. This running-app evidence carries only for unchanged flows; the branch build was not the current published head. The phone follow-up has its own separate validation requirements.Project comparison: main shows upstream files under the fork title, branch shows fork files, and reopening keeps the fork and restored Viewed state.
Overlaps #34245 and #35023. Both changes are integrated. #35023’s complete repository-account execution wrapper is preserved. #34245’s issue-only Refresh and unconditional pending-fetch settlement are preserved, with separate ordinary and explicit Refresh intent. Mixed client/server compatibility remains required.
Tracked in STA-12585.