Skip to content

Improve git remote selection - #2207

Merged
AmethystLiang merged 2 commits into
mainfrom
improve-git-remote-selection
May 18, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
improve-git-remote-selection

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Add docs/fork-pr-check-detection.md documenting fork-aware PR/check detection.
  • Resolve PR repository candidates from upstream and origin, preserving head repository identity for fork workflows.
  • Thread prRepo through PR check fetching and renderer cache/inflight keys so checks are requested from the repository that owns the PR.

Validation

  • Focused Vitest: 8 files, 94 tests passed.
  • pnpm typecheck passed.
  • pnpm lint passed.
  • Electron validation passed in the running app:
    • temp fork repo leynier/orca + upstream stablyai/orca branch staged-changes-first resolved PR feat(source-control): make group order configurable #2188 with prRepo=stablyai/orca and headRepo=leynier/orca.
    • checks fetch with prRepo returned track-community-pr; origin-only checks returned 0; cache key used stablyai/orca.
    • warm repeat preserved prRepo/headRepo and avoided stale origin-only data.
    • adjacent origin-only non-fork lookup did not crash and preserved prior null-or-origin behavior.

Reviewer Notes

  • Design doc: docs/fork-pr-check-detection.md.
  • Local validation screenshots are intentionally uncommitted under validation-screenshots/ for reviewer reference:
    • validation-screenshots/01-golden-fork-pr-pass.png
    • validation-screenshots/02-checks-pr-repo-cache-pass.png
    • validation-screenshots/03-warm-repeat-pass.png
    • validation-screenshots/04-adjacent-nonfork-pass.png

@AmethystLiang
AmethystLiang force-pushed the improve-git-remote-selection branch from 9ac1f48 to 3dcc8d6 Compare May 18, 2026 03:11
@AmethystLiang AmethystLiang changed the title Detect GitHub checks for fork PRs Improve git remote selection May 18, 2026
Add the fork PR/check detection design doc and thread PR repository identity through PR lookup, check fetching, and renderer cache keys.
- Pass explicit PR repo identity through IPC, preload, and runtime APIs for comments, title edits, merges, and review-thread updates
- Key PR comments by normalized PR repo to avoid stale fork/upstream cache reuse
- Guard check status syncs against in-flight results from a different PR repo
@AmethystLiang
AmethystLiang force-pushed the improve-git-remote-selection branch from 51a2d53 to b258db7 Compare May 18, 2026 04:00
@AmethystLiang
AmethystLiang merged commit c7ddfd1 into main May 18, 2026
1 check passed
@AmethystLiang
AmethystLiang deleted the improve-git-remote-selection branch May 18, 2026 04:00
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant