Repository navigation
Show accurate PR status for local worktrees - #6460
Conversation
📝 WalkthroughWalkthroughThe PR changes cache-key generation and host-scope selection across GitHub PR, issue, checks, comments, and hosted-review flows. Store slices now pass repo identity and a repo-owner discriminator into cache-key helpers, and several fetch and refresh paths use repo-scoped settings instead of work-item scoped settings. Component and worktree/status-bar code was updated to call the expanded helpers, and tests were added or adjusted for runtime-focused local repository cases. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0280e713-0363-412b-996c-73c62c014294
📥 Commits
Reviewing files that changed from the base of the PR and between b899aef and 2d3cc766b669922171fa41d1bbbf0552d71c1bd6.
📒 Files selected for processing (28)
src/renderer/src/components/editor/check-run-details-fix-context.tssrc/renderer/src/components/right-sidebar/ChecksPanel.tsxsrc/renderer/src/components/right-sidebar/SourceControl.tsxsrc/renderer/src/components/right-sidebar/active-checks-status.tssrc/renderer/src/components/right-sidebar/parent-pr-checks-rows.tssrc/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.tsxsrc/renderer/src/components/sidebar/folder-workspace-card-pr-display.tssrc/renderer/src/components/sidebar/use-worktree-issue-link.tssrc/renderer/src/components/sidebar/worktree-list-groups.test.tssrc/renderer/src/components/sidebar/worktree-list-groups.tssrc/renderer/src/components/status-bar/WorkspaceSpaceManagerPanel.tsxsrc/renderer/src/components/status-bar/workspace-space-presentation.test.tssrc/renderer/src/store/slices/github-cache-key.tssrc/renderer/src/store/slices/github-checks.test.tssrc/renderer/src/store/slices/github-checks.tssrc/renderer/src/store/slices/github-pr-refresh-host-guard.test.tssrc/renderer/src/store/slices/github.test.tssrc/renderer/src/store/slices/github.tssrc/renderer/src/store/slices/hosted-review-cache-identity.tssrc/renderer/src/store/slices/hosted-review-cache-race.test.tssrc/renderer/src/store/slices/hosted-review-cache.test.tssrc/renderer/src/store/slices/hosted-review.test.tssrc/renderer/src/store/slices/hosted-review.tssrc/renderer/src/store/slices/repo-owner-cache-identity.test.tssrc/renderer/src/store/slices/worktrees.test.tssrc/renderer/src/store/slices/worktrees.ts
2d3cc76 to
43abe0c
Compare
Summary
Keep sidebar PR, check, hosted-review, and linked-issue status tied to the repo that owns the worktree instead of the currently focused runtime. Known local repos now read and write local cache keys even when a runtime is selected; SSH and runtime-owned repos still keep their explicit owner scopes, and missing owner context still follows the focused runtime fallback.
I checked the latest 50 merged PRs before opening this. Recent adjacent fixes such as #6397 and #6456 are already in
origin/main; they fix badge stability and merged PR preservation, butorigin/mainstill used focused-runtime fallback cache keys for known local repos. This PR is rebased on top of those fixes.Design and Review
Verification
origin/main.stablyai/demo-project#22, which has a failedtestcheck. The exact PR worktree rendered the left sidebar asPR checks: Failedfor titlePR status sidebar repro, not just the branch.Screenshots
Manual validation evidence was captured from the exact PR worktree:
/tmp/orca-pr-status-sidebar-validation/pr-status-sidebar-pr-checks-failed.pngThe screenshot shows the real demo-project PR
#22rendered in the left sidebar withPR checks: Failed.Testing
pnpm run typecheckpnpm run lint(passed with existinguseGitStatusPolling.tsexhaustive-deps warning)git diff --checkpnpm exec vitest run --config config/vitest.config.ts src/renderer/src/store/slices/github-pr-refresh-host-guard.test.ts src/renderer/src/store/slices/hosted-review.test.ts src/renderer/src/store/slices/repo-owner-cache-identity.test.ts src/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsx src/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsx src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/status-bar/workspace-space-presentation.test.ts src/renderer/src/store/slices/github-checks.test.ts src/renderer/src/store/slices/hosted-review-cache-race.test.ts src/renderer/src/store/slices/hosted-review-cache.test.ts src/renderer/src/store/slices/worktrees.test.ts src/renderer/src/store/slices/github.test.ts src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx src/renderer/src/components/right-sidebar/parent-pr-checks-rows.test.ts- 14 files, 504 tests/Users/thebr/orca/workspaces/orca/devilray, branchbrennanb2025/fix-pr-status-sidebar; validatedstablyai/demo-project#22with failedtestcheck rendered asPR checks: Failedin the left sidebar.AI Review Report
origin/mainwith adjacent PR badge fixes already present.Security Audit
No new network endpoints, shell commands, filesystem writes, credential handling, IPC handlers, or permissions are introduced. The change adjusts renderer/store cache identity and existing provider routing. GitHub-specific behavior remains in GitHub paths, and SSH/runtime boundaries remain explicit through existing connection/execution-host owner scopes. No telemetry or agent-facing prompt text was added.
Manual Evidence
/Users/thebr/orca/workspaces/orca/devilray, branchbrennanb2025/fix-pr-status-sidebarstablyai/demo-project#22, open, headc490fc22...,testcheck conclusionFAILUREactiveRuntimeEnvironmentId; known local demo repo still wrote/readlocal::<repoId>::orca-pr-status-repro-20260626142453, noruntime:focused-runtime-validation::...hosted-review cache entry was created, and UI stayedPR checks: Failed.Assumptions and Gaps
Post-PR Stabilization
track-community-prpassed;verifywas still pending.43abe0cwith a regression test; the inline comment is marked addressed.verifypassed and GitHub reports the PR merge state as clean. A follow-up CodeRabbit run was rate-limited and did not post new actionable comments. The docstring coverage warning is a generic repository-wide warning with no actionable inline finding for this PR.