Repository navigation
Route hosted review operations to the owning host - #36003
Conversation
[Medium impact] The PR changes repository review and refresh routing across local, SSH, and runtime workspaces. Fix the paired SSH comment target before merging. Findings
SummaryCarries repository ownership through review reads, comment actions, visible refreshes, and refreshes after Git operations.
|
Findings
|
681a33d to
8f56b74
Compare
There was a problem hiding this comment.
Actionable comments posted: 1

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:
a8898c1d-b51a-4146-8c50-6da6aba50391
Files selected for processing: 47-
config/focus-setting-read-baseline.txtsrc/main/ipc/hosted-review.tssrc/renderer/src/components/editor/CheckRunDetailsPanel.log-outcomes.test.tsxsrc/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsxsrc/renderer/src/components/editor/check-run-details-tab.tssrc/renderer/src/components/right-sidebar/checks-panel/saved-action-delivery.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-ai-queue.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-polling.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-polling.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-data.tsxsrc/renderer/src/lib/repository-owner-index.tssrc/renderer/src/lib/review-owner.test.tssrc/renderer/src/lib/review-owner.tssrc/renderer/src/lib/worktree-operation-route-index.test.tssrc/renderer/src/lib/worktree-operation-route.tssrc/renderer/src/lib/worktree-owner-route.tssrc/renderer/src/lib/worktree-runtime-owner-index.tssrc/renderer/src/runtime/forge-credential-target.tssrc/renderer/src/store/github/cache-model.tssrc/renderer/src/store/github/comment-mutation-actions.tssrc/renderer/src/store/github/conversation-comment-actions.tssrc/renderer/src/store/github/linked-review-clear.tssrc/renderer/src/store/github/pr-result-cache.tssrc/renderer/src/store/github/pull-request-actions.tssrc/renderer/src/store/github/pull-request-execution.tssrc/renderer/src/store/github/refresh-event-actions.tssrc/renderer/src/store/github/repository-routing.tssrc/renderer/src/store/github/request-coordination.tssrc/renderer/src/store/github/review-thread-actions.tssrc/renderer/src/store/github/visible-hosted-review-refresh-targets.test.tssrc/renderer/src/store/github/visible-hosted-review-refresh-targets.tssrc/renderer/src/store/github/worktree-refresh.tssrc/renderer/src/store/slices/editor-check-details-reconstructed-owner.test.tssrc/renderer/src/store/slices/editor-check-details-tab-owner.test.tssrc/renderer/src/store/slices/editor-check-details-tabs.test.tssrc/renderer/src/store/slices/editor/actions/check-run-details-actions.tssrc/renderer/src/store/slices/editor/actions/check-run-details-owner.tssrc/renderer/src/store/slices/editor/tabs/workspace-editor-item.tssrc/renderer/src/store/slices/github-linked-review-clear-ownership.test.tssrc/renderer/src/store/slices/github-post-operation-owner.test.tssrc/renderer/src/store/slices/github-pr-branch-coordinator-events.test.tssrc/renderer/src/store/slices/github-pr-branch-linked-pr-divergence.test.tssrc/renderer/src/store/slices/github-pr-host-scope.test.tssrc/renderer/src/store/slices/worktrees-metadata-persistence.test.tssrc/renderer/src/store/slices/worktrees/metadata/update-worktree-meta.tssrc/shared/hosted-review.tstests/e2e/claude-agent-row-view.unit.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
8f56b74 to
3d0b7ac
Compare
There was a problem hiding this comment.
Actionable comments posted: 2

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:
2130d91e-f16c-49e5-8253-6cd1e55c9a4c
Files selected for processing: 37-
config/focus-setting-read-baseline.txtdecision-explainer.htmlsrc/main/ipc/hosted-review.tssrc/preload/api/github-pull-request-api.tssrc/renderer/src/components/right-sidebar/checks-panel/hosted-review-manual-refresh.tssrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-check-and-review-actions.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-check-and-review-actions.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-comment-actions.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-comment-mutations.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-comment-resolution.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-entry-refresh-and-title-actions.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-manual-refresh.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-data.tsxsrc/renderer/src/lib/repository-owner-index.tssrc/renderer/src/lib/worktree-operation-route.tssrc/renderer/src/lib/worktree-runtime-owner-index.tssrc/renderer/src/store/github/check-actions.tssrc/renderer/src/store/github/comment-fetch-actions.tssrc/renderer/src/store/github/pr-for-branch-ipc-fallback.tssrc/renderer/src/store/github/pr-refresh-state.tssrc/renderer/src/store/github/pr-result-cache.tssrc/renderer/src/store/github/pull-request-execution.tssrc/renderer/src/store/github/refresh-event-actions.tssrc/renderer/src/store/github/refresh-routing-actions.tssrc/renderer/src/store/github/refresh-sweep-actions.tssrc/renderer/src/store/github/request-coordination.tssrc/renderer/src/store/github/slice-types.tssrc/renderer/src/store/github/worktree-refresh.tssrc/renderer/src/store/slices/editor-check-details-tab-owner.test.tssrc/renderer/src/store/slices/editor/actions/check-run-details-actions.tssrc/renderer/src/store/slices/editor/actions/check-run-details-owner.tssrc/renderer/src/store/slices/github-pr-host-scope.test.tssrc/renderer/src/store/slices/github-pr-refresh-linked-scope-lifetime.test.tssrc/renderer/src/store/slices/github.tssrc/renderer/src/store/slices/hosted-review-cache-state.tssrc/renderer/src/store/slices/hosted-review.tssrc/shared/hosted-review.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
d066b1a to
9e956fa
Compare
There was a problem hiding this comment.
Actionable comments posted: 2

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:
49744058-0c57-473d-a97c-e1bf0f4c9f95
Files selected for processing: 6-
src/renderer/src/store/github/worktree-refresh.tssrc/renderer/src/store/slices/editor-check-details-reconstructed-owner.test.tssrc/renderer/src/store/slices/editor-check-details-tab-owner.test.tssrc/renderer/src/store/slices/editor/actions/check-run-details-actions.tssrc/renderer/src/store/slices/editor/actions/check-run-details-owner.tssrc/renderer/src/store/slices/github-pr-refresh-owner-routing.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
3cceee3 to
bc91c77
Compare
- Refresh the correct hosted review after remote git operations - Scope comment mutations and AI acknowledgements to the owner cache
- Recover proxied runtime owners for older SSH worktree listings - Preserve direct and ambiguous host routing safeguards
- Route checks, comments, and linked-review clears through the selected repository owner - Reject ambiguous or mismatched host context to prevent cross-machine mutations
- Preserve linked-review clear scopes beyond cache eviction and clean them up on expiry - Handle failed or refused comment reactions and thread resolutions without stale optimistic UI
- Preserve server-owned review refreshes when a direct SSH copy exists - Fail comment mutations and refetches safely when ownership becomes invalid - Resolve check and sidebar data through the workspace’s owning host
- Prefer explicit execution owners when matching worktrees. - Avoid repeated tab scans when restoring check details.
bc91c77 to
23a5886
Compare
* Route hosted review refreshes to their owning host * Route remote review operations to their owning host - Refresh the correct hosted review after remote git operations - Scope comment mutations and AI acknowledgements to the owner cache * Route legacy paired SSH reviews through their server owner - Recover proxied runtime owners for older SSH worktree listings - Preserve direct and ambiguous host routing safeguards * Preserve review ownership across remote workspace operations - Route checks, comments, and linked-review clears through the selected repository owner - Reject ambiguous or mismatched host context to prevent cross-machine mutations * Keep check detail tabs scoped to their remote owner * Preserve remote worktree ownership across reconstructed check tabs * Preserve direct SSH check tabs when proxy listings overlap * Scope PR refresh ownership state and safely roll back comment mutations - Preserve linked-review clear scopes beyond cache eviction and clean them up on expiry - Handle failed or refused comment reactions and thread resolutions without stale optimistic UI * Preserve remote review ownership when SSH copies overlap * Fix review routing for overlapping remote repository hosts - Preserve server-owned review refreshes when a direct SSH copy exists - Fail comment mutations and refetches safely when ownership becomes invalid - Resolve check and sidebar data through the workspace’s owning host * Relax cache-sensitive test expectations * Route check refreshes to runtime owners and isolate restored requests * Scope reconstructed check detail tabs by execution owner * Fix review refresh ownership for shared remote hosts - Prefer explicit execution owners when matching worktrees. - Avoid repeated tab scans when restoring check details. * Fix hosted review polling for workspaces on multiple hosts * test: trim redundant review ownership scenarios
* Route hosted review refreshes to their owning host * Route remote review operations to their owning host - Refresh the correct hosted review after remote git operations - Scope comment mutations and AI acknowledgements to the owner cache * Route legacy paired SSH reviews through their server owner - Recover proxied runtime owners for older SSH worktree listings - Preserve direct and ambiguous host routing safeguards * Preserve review ownership across remote workspace operations - Route checks, comments, and linked-review clears through the selected repository owner - Reject ambiguous or mismatched host context to prevent cross-machine mutations * Keep check detail tabs scoped to their remote owner * Preserve remote worktree ownership across reconstructed check tabs * Preserve direct SSH check tabs when proxy listings overlap * Scope PR refresh ownership state and safely roll back comment mutations - Preserve linked-review clear scopes beyond cache eviction and clean them up on expiry - Handle failed or refused comment reactions and thread resolutions without stale optimistic UI * Preserve remote review ownership when SSH copies overlap * Fix review routing for overlapping remote repository hosts - Preserve server-owned review refreshes when a direct SSH copy exists - Fail comment mutations and refetches safely when ownership becomes invalid - Resolve check and sidebar data through the workspace’s owning host * Relax cache-sensitive test expectations * Route check refreshes to runtime owners and isolate restored requests * Scope reconstructed check detail tabs by execution owner * Fix review refresh ownership for shared remote hosts - Prefer explicit execution owners when matching worktrees. - Avoid repeated tab scans when restoring check details. * Fix hosted review polling for workspaces on multiple hosts * test: trim redundant review ownership scenarios
* Route hosted review refreshes to their owning host * Route remote review operations to their owning host - Refresh the correct hosted review after remote git operations - Scope comment mutations and AI acknowledgements to the owner cache * Route legacy paired SSH reviews through their server owner - Recover proxied runtime owners for older SSH worktree listings - Preserve direct and ambiguous host routing safeguards * Preserve review ownership across remote workspace operations - Route checks, comments, and linked-review clears through the selected repository owner - Reject ambiguous or mismatched host context to prevent cross-machine mutations * Keep check detail tabs scoped to their remote owner * Preserve remote worktree ownership across reconstructed check tabs * Preserve direct SSH check tabs when proxy listings overlap * Scope PR refresh ownership state and safely roll back comment mutations - Preserve linked-review clear scopes beyond cache eviction and clean them up on expiry - Handle failed or refused comment reactions and thread resolutions without stale optimistic UI * Preserve remote review ownership when SSH copies overlap * Fix review routing for overlapping remote repository hosts - Preserve server-owned review refreshes when a direct SSH copy exists - Fail comment mutations and refetches safely when ownership becomes invalid - Resolve check and sidebar data through the workspace’s owning host * Relax cache-sensitive test expectations * Route check refreshes to runtime owners and isolate restored requests * Scope reconstructed check detail tabs by execution owner * Fix review refresh ownership for shared remote hosts - Prefer explicit execution owners when matching worktrees. - Avoid repeated tab scans when restoring check details. * Fix hosted review polling for workspaces on multiple hosts * test: trim redundant review ownership scenarios
Problem
When the same repository exists on more than one machine, review data, CI checks, comments, and refreshes could accidentally use the wrong copy. This could make a remote workspace show local pull-request information or update the wrong cache.
Solution
Pass the repository owner host through pull-request, hosted-review, check, comment, and post-git-operation flows. Refreshes and mutations now find the matching repository and worktree on that host, keeping same-ID and same-path local, SSH, and runtime copies separate.
ELI5
What Changed
Why
A repository ID or path alone is not enough when local and remote copies exist. Carrying the owner host prevents one machine's review state from being read or changed through another machine.
Linked Issue
If you do not have one and are an outside contributor, your PR will be ignored. Refs is not sufficient. Link an actual issue
Fixes #
Visual Proof
N/A — routing and cache ownership behavior only; there is no visual UI change.
Testing
Added and updated automated tests covering local, SSH, and runtime repository twins; same-path and same-ID collisions; review refreshes; CI/check and comment operations; and post-git-operation refresh ownership.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)