Repository navigation
Keep worktree PR badges stable during refresh - #6397
Merged
Merged
Conversation
Co-authored-by: Orca <[email protected]>
Contributor
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
8 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
Co-authored-by: Orca <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Keep legacy detailed worktree cards from briefly losing their right-side PR badge when hosted-review metadata writes an older transient miss while the branch PR cache already has a newer PR.
The card now uses the GitHub PR cache only when hosted-review data is still warming, or when the PR cache is strictly newer than a hosted-review
nullmiss. Equal or older PR cache entries do not resurrect a stale badge. When the PR cache supplies an unlinked branch review, the display path also gets the neutral review hint needed to render branch-discovered GitHub PR metadata.The GitHub-only PR cache is blocked from masking durable linked metadata for GitLab, Bitbucket, Azure DevOps, and Gitea worktrees.
Design And Review
WorktreeCard, no provider calls, polling changes, cache-key changes, or visual styling changes.fetchedAtcomparison, and later tightened so the neutral hint follows the same fallback decision.prCachecannot override durable non-GitHub linked review metadata.Code Review
nullfallback could resurrect stale PR cache data. Fixed with strict timestamp ordering and negative tests.Tests
git diff --checkpnpm run typecheckpnpm run lint(exited 0; existing warning inuseGitStatusPolling.ts)pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsx(24 tests)window.api.app.getIdentity()root/Users/thebr/orca/workspaces/orca/velvetfishbrennanb2025/continue-taskstablyai/demo-project#21brennanb2025/pr-badge-real-pr-20260626Linked PR #21Screenshots
Manual validation evidence was captured from the exact PR worktree:
.playwright-cli/page-2026-06-26T02-21-34-854Z.png.playwright-cli/page-2026-06-26T02-20-51-705Z.png.playwright-cli/page-2026-06-26T02-00-03-688Z.png.playwright-cli/page-2026-06-26T01-59-37-287Z.pngThe latest clean screenshot shows the real demo-project PR
#21in the Checks panel after clicking the legacy detailed worktree card. DOM inspection after the click showed the selected card's metadata node containedLinked PR #21.Accepted validation notes:
nullplus newer PR cache.stablyai/demo-project#21for reproduction/manual validation through the actual provider data path.#21intentionally remains open as a throwaway validation PR.Security Audit
AI Review Report
Notes
Post-PR Stabilization
verifypassed andtrack-community-prpassed.