orca icon indicating copy to clipboard operation
orca copied to clipboard

fix: route sidebar hosted-review GitHub actions through owner runtime

Open siddqamar opened this issue 5 months ago • 1 comments

Summary

Fixes runtime-owned GitHub hosted review actions in the right sidebar so merge, auto-merge, and PR state updates are routed through the owning runtime instead of local Electron IPC, preventing Access denied: unknown repository path for remote-hosted reviews (#6753).

Screenshots

  • No visual change.

Testing

  • [x] pnpm lint
  • [x] pnpm typecheck
  • [x] pnpm test
  • [ ] pnpm build
  • [x] Added or updated high-quality tests that would catch regressions.

AI Review Report

Reviewed the host-routing logic for sidebar GitHub review actions. Verified the issue was caused by local IPC being used for runtime-owned reviews, and confirmed the fix preserves existing local and SSH flows.

Cross-platform compatibility was reviewed for Windows, macOS, and Linux. No changes to shortcuts, labels, shell behavior, or platform-specific Electron behavior.

Security Audit

Reviewed IPC routing, path handling, command execution, and authentication. No new security risks or dependencies introduced.

Notes

  • Scoped to GitHub right-sidebar hosted review actions only.
  • No visual or UX changes.

siddqamar avatar Jun 29 '26 22:06 siddqamar

Review Change Stack

📝 Walkthrough

Walkthrough

ownerSettings (containing activeRuntimeEnvironmentId) is threaded from ChecksPanel through HostedReviewActions into useHostedReviewActions. The hook derives a reviewTarget via getActiveRuntimeTarget and uses it to branch GitHub PR mutations (handleMerge, handleAutoMerge, handleReviewStateChange): when reviewTarget.kind === 'environment', calls go through callRuntimeRpc; otherwise the existing window.api.gh.* calls are used. A new test file validates the boundary routing by inspecting the hook's source text.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: routing sidebar hosted-review GitHub actions through the owner runtime.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description follows the required template and covers summary, screenshots, testing, AI review, security, and notes, with only one unchecked test item.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jun 29 '26 22:06 coderabbitai[bot]