Repository navigation
fix(github): a twin project's PR cards, rows and dialogs act on the host that returned the item - #31252
Merged
Conversation
…ost that returned the item
…one row ignores the stamp
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
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 |
This was referenced Oct 20, 2026
Merged
Merged
nwparker
added a commit
that referenced
this pull request
Oct 20, 2026
…t that returned them (#31271) GitLab task items now carry the host of the repo row that fetched them, and the project-view dialog stamps the row its slug matched. Both resolve through one provider-neutral helper (getWorkItemRepo, generalized from #31252's GitHub-only getGitHubWorkItemRepo), so a repo id published by two hosts never routes an action to the other host's row.
This was referenced Oct 21, 2026
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.
ELI5
If the same project is added on two machines (say this laptop and an SSH server), the GitHub task page lists PRs from both. When you reviewed, merged, edited or started work on one of those PRs, Orca could run the action on the other machine. Each PR now remembers which machine listed it, and its buttons act on that machine.
What Changed
Before: the task page selects both copies of a twin project and fetches items from each host. But a
GitHubWorkItemcarried onlyrepoId. Every place that acted on an item rebuilt its host withrepoMap.get(item.repoId), which returns whichever twin was listed last:The cache sync and refresh reconcile also keyed rows by
repoId + id, so one twin's row was silently swapped for the other twin's copy.After:
repoHostIdon each item. It is the host of the row the request read (getGitHubWorkItemRowHostId): the id row on the source's host, else the id+path row, else the only row.getGitHubWorkItemRepo(src/renderer/src/lib/github-work-item-repo-row.ts):taskPageWorkItemKey), the React row key and the dialog's cache lookup include the host, so the two hosts' copies of a PR stay separate.Why
Not changed (out of scope, reported to main):
repoMap.get(item.repoId).validateRegisteredRepolooks repos up by id only, which can refuse the second twin's local+SSH fetch.Linked Issue
N/A (internal follow-up).
Visual Proof
N/A: routing only. Rows look the same; the actions go to a different host.
Testing
New tests that fail on main:
components/task-page/github/rows-twin-host-routing.test.tsx: the review, merge, status and assignees cells get the twin row that returned the item.components/use-task-page-workspace-actions-twin-host.test.tsx: starting work from a PR card opens the composer for that host.store/slices/github-work-items-twin-host-stamp.test.ts: first and later pages stamp the row's host.components/task-page-cache-selectors.test.ts: the dialog opens that host's cached copy, and the cache sync keeps each twin row's own copy.Also added:
lib/github-work-item-repo-row.test.ts, which covers twin, lone-row and unstamped resolution.Runs:
store/github,store/slices/github*,components/task-page*,components/use-task-page*andlib/github*(120 files) pass single-worker.Full static-analysis job run locally.
Not verified live on real hosts: this is renderer routing, covered by unit tests.
Automated tests added/updated
Review
Codex (gpt-6.1-sol, high) and an independent Opus review, two rounds each.
Agent skill upstream boundary
Notes
Checklist
N/Avisual proof with reason