Repository navigation
fix(review): review providers resolve the repo on its host - #27247
Merged
Merged
Conversation
…led reads show as errors GitLab task lists, the item dialog, right-sidebar MR actions and the Checks panel now pick their host from the repo or workspace row: a server-owned repo asks its server over runtime RPC, a local or SSH repo uses this computer's glab. The focused Active Server is never consulted. The runtime arm reuses the web client's gl-over-RPC table, now shared. A failed checks or comments read in the Checks panel renders as an error that names the machine that answered, instead of 'No checks configured'.
… host for post-launch thread resolves An SSH workspace reached through a paired server keeps ssh:<target> as its host and names the server separately; its GitLab credentials live on that server, so the Checks panel and job-log tab now route there. A comment-resolution launch now records the MR's credential host when it is queued, so the post-launch resolve no longer looks the repo up by a bare id that two hosts can share.
8 of 9 tasks
8 tasks done
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
When a GitLab project lives on a different machine than the one you are sitting at, Orca sometimes asked the wrong machine about it. The other machine said "I don't know that repository", and Orca either showed "Access denied" or pretended there were simply no checks and no comments. Now every GitLab request goes to the machine that holds that repo's GitLab sign-in, and a failed request says so, naming that machine.
What Changed
Before
Access denied: unknown repository path([Bug]: GitLab Tasks fail with "Access denied: unknown repository path" for repos on a remote host #14603).After
glab(where its GitLab sign-in lives). The Active Server dropdown is never consulted. This covers task lists, todos, the item dialog (details, comments, merge/close/reopen, labels, reviewers, job logs, retry), the right-sidebar MR actions and title edit, ready-for-review, the Checks panel and its job logs, and the paste-a-URL / MR search pickers.Could not load from Build box: glab: not logged in, so a sign-in error says which machine needsglab auth login.Mechanism
forgeCredentialTarget(renderer) turns the row's own host (a task source's host, else the workspace's or repo'sexecutionHostId) into a transport:runtime:E(or a nested key behind E) goes to server E, everything else to local IPC. An unresolved owner is refused, not guessed.gitLabApiFor(selector)returns theglAPI for that target. Its server arm reuses the web client's gl-over-runtime-RPC table, which moved out ofweb/preload-apiintoruntime/runtime-gitlab-api.tsso desktop and web share one copy. Everywindow.api.gl.*call site in the renderer (except the row-less rate-limit badge) now goes through it.ssh:<target>as its host and names the server separately (runtimeOwnerEnvironmentId). Its credentials live on that server, soforgeOwnerHostIdForWorkspacesends it there. A direct SSH workspace still uses this computer.checksError/commentsErrornext to its lists. Setting new checks or comments clears them, so the existing reset paths need no changes.Why
The ownership table from the owner-routing work already says forge calls follow the repo's credentials: server-owned repo → its server, local/SSH repo → this computer. The GitHub task path already worked this way. GitLab still had three separate routing styles: always local IPC, the focused server, and a one-off owner check for ready-for-review. Moving every caller onto one owner-derived adapter fixes both issues at the root. It also stops the next GitLab call from copying the wrong pattern. I chose to reuse the web client's existing RPC method table over writing a second desktop-only one. That keeps one list of GitLab runtime methods and their argument rules, such as stripping the desktop-only owner guard. No wire change: every runtime method used already exists. An old server that lacks the ready-for-review capability gets the existing "update server" message.
Linked Issue
Fixes #14603
Fixes #24264
Visual Proof
N/A for screenshots: the agent environment cannot launch the Electron UI on this machine. The only visible change is in the Checks panel: when the read fails and the list is empty, the error text (destructive color,
role="alert") replaces "No checks configured" / "No comments". A rendering test covers it.Testing
Acceptance tests written first and confirmed failing on
origin/main(e41b8e17f0):use-task-page-gitlab-loading.test.tsx: a server-owned repo's issue list goes to its server over RPC, not local IPC ([Bug]: GitLab Tasks fail with "Access denied: unknown repository path" for repos on a remote host #14603). Fails on main: localgl.listIssuesis called.checks-list-expanded-details.test.tsx: a failed read renders the error instead of "No checks configured". Fails on main.Plus:
gitlab-owner-api.test.ts(server/SSH/local routing, SSH workspace behind a server, task-source repo id, unresolved owner rejects), the polling test (a failed MR read sets an error naming the machine), and updated job-log, hosted-review action and URL-lookup tests.pnpm tc, focused vitest suites (36 files),oxlint,pnpm run check:code-quality:changed, the owner-routing ratchet (pruned), and the localization checks pass locally.Review
Agent skill upstream boundary
Notes
glab, which main runs against the SSH host as before. Only the choice of transport changed.id:<repoId>, the selector the web client already sends.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)