You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(connectors): Add org and a new Refresh on the GitHub row go through GitHub sign-in - #47467
When you add a GitHub org, or press the new Refresh on the GitHub connector row, Orca now asks GitHub again which orgs you can reach instead of only opening the install page. GitHub asks which account to use. Orca reads that account's orgs, and any org that's already installed shows as Connected right away. The install page opens only if that account can't reach the org you asked for.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
17
$\color{#1a7f37}{\Huge{\mathbf{+}}}$159
$\color{#cf222e}{\Huge{\mathbf{−}}}$45
$\color{#1a7f37}{\Huge{\mathbf{+}}}$114
What Changed
Add org (the chat card, and the row's add-access action) goes through one owner, useConnectorSetup.start → addGitHubAccess. For a connector already on GitHub, it now starts the existing GitHub sign-in (switchAccount, GitHub's account picker) with addAccess: { workspace }, naming the org when the card has one. It no longer calls openGitHubInstallPage directly. The cloud opens GitHub's install page after the sign-in only when the login picked can't reach that org, or when none is named (stablyai/orca-cloud#1180). The card reads Connected when the trip finishes and the GitHub state refreshes.
Refresh on the GitHub row's menu runs the same sign-in with no addAccess (addGitHubAccount), so the logins' installations are read again. It shows wherever "Add another GitHub account" already shows: a cloud that lists several logins, and not a paired web client.
Plumbing: addAccess is added to ConnectorConnectStartRequestSchema (additive), to the bots.connect.start RPC params, and through startConnectorTrip, connectConnector and startConnect. A host that passes it on answers addAccess: true.
Mixed versions: an older paired host drops addAccess and doesn't echo it. The renderer then cancels that trip before its page opens and opens the install page as before. A paired web client, which can't start a sign-in, keeps the install page.
Why
Today, Add org opens only GitHub's install page. For an org a teammate installed, or one installed under your other GitHub login, GitHub shows "already installed", nothing comes back, and the card waits forever (#47390). GitHub App integrations normally sign the person in, list what that login can reach, and offer the install only for what's missing. This reuses the sign-in trip that "Add another GitHub account" already runs. It adds no GitHub permission and stores nothing new.
The GitHub connector row's menu, before and after (component fixture bots/BotConnectorsPanel:gitHubPageMenu):
Before
After
Add org has no new UI. Its click now opens GitHub's account picker instead of the install page.
Testing
The cloud routing (teammate-installed org shows with no install page; other login; unreachable org goes to the install page; Refresh re-reads; state-less Configure → Save goes through the sign-in; older desktop unchanged) is tested in stablyai/orca-cloud#1180, on SQLite and Postgres.
The cloud's connector suites also pass against this branch's connect-messages.ts, as they will after its pin bump. connect-messages.test.ts passes.
pnpm tc:web, pnpm tc:node, oxlint and oxfmt on the changed files.
Not run end to end against GitHub: a real sign-in needs a GitHub account and the cloud PR deployed.
I manually tested these changes locally (fixture screenshot only; see above)
Automated tests added/updated, or explained why not below: the logic that decides when the install page opens lives in the cloud and is tested there. The desktop change is wiring.
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because it runs only when someone clicks Add org or Refresh. It is one sign-in trip, the same one "Add another GitHub account" runs.
Risk
Level: Low
Order: deploy stablyai/orca-cloud#1180 first. An older cloud ignores addAccess, so against it, Add org would sign in and finish without the install page for an org the login can't reach.
Older paired servers fall back to the install page. Phones are unchanged.
Back out: a plain revert.
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance. No platform-specific code. Remote hosts are covered by the echo fallback. Mobile is unchanged.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
…ugh GitHub sign-in
Add org (the chat card and the row's add-access action) now starts the existing GitHub sign-in
with the account picker, naming the org when there is one. The cloud opens GitHub's install page
after the sign-in only when the login picked can't reach that org, so an org a teammate already
installed, or one installed under another login, shows as connected without the install page.
The GitHub row gets Refresh, the same sign-in, to read again what the logins reach.
A host too old to pass addAccess on is detected from the start answer, and Add org falls back to
the install page as before; a paired web client, which can't sign in, keeps the install page.
No actionable comments were generated in the recent review.
Walkthrough
Connector setup now supports optional GitHub access targeting by workspace. The request passes through the RPC and cloud connection layers. The renderer handles host responses that do not confirm support by opening the install page. The GitHub connector card also adds a refresh action, with related fixture and localization updates.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 25dca
This change adds GitHub sign-in for adding orgs and a Refresh action on the GitHub row. The earlier concern about stale requests triggering the install-page fallback has been addressed. No remaining concrete risk was found; the cloud change should be deployed before this one.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #47390 asks why installations made under a different GitHub login do not appear in bot connectors, and how existing installations can be linked without reinstalling. The reviewed desktop changes…
Provide the reviewed state of stablyai/orca-cloud#1180 (or its merged commit) so the routing rules can be checked against #47390: a teammate-installed org shows as Connected without the install page; an org that the selected login cannot re…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title names the two main changes: Add org and the new Refresh on the GitHub row both go through GitHub sign-in. This matches the changeset, which adds addAccess plumbing, routes useConnectorSetup.…
Description check
The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #47390), Visual Proof with before and after images, Testing, Performance, Risk with level a…
Out of Scope Changes check
All changed files connect to the stated objective of routing Add org and Refresh through GitHub sign-in. The addAccess field is added to ConnectorConnectStartRequestSchema, the `bots.connect.start…
Full details: Title check
Explanation
The title names the two main changes: Add org and the new Refresh on the GitHub row both go through GitHub sign-in. This matches the changeset, which adds addAccess plumbing, routes useConnectorSetup.start through addGitHubAccess, and adds a Refresh action that calls addGitHubAccount. The title is long (87 characters) and uses a 'feat(connectors):' prefix, but it describes the primary change accurately.
Full details: Description check
Explanation
The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #47390), Visual Proof with before and after images, Testing, Performance, Risk with level and back-out steps, AI Disclosure, Review, Notes, and Checklist. The Testing section explains that end-to-end testing against GitHub was not run and that the routing tests live in the cloud PR. The Performance section is filled in. Gaps: the 'Level' line in Risk is filled in, but the AI Disclosure section is left as template text, which is acceptable for a stablyai member. The final lint/typecheck/test/build checklist item is unchecked, and the manual-testing checkbox is unchecked while the fixture screenshot is noted. These are minor and do not make the description incomplete.
Full details: Out of Scope Changes check
Explanation
All changed files connect to the stated objective of routing Add org and Refresh through GitHub sign-in. The addAccess field is added to ConnectorConnectStartRequestSchema, the bots.connect.start RPC params, startConnectorTrip, connectConnector, startConnect, and connectorTripCalls.start. These changes carry the field end to end. connector-connect-state.ts and bot-github-install-record.ts implement the older-host fallback and the workspace validation. BotGitHubCard.tsx adds the Refresh action, which re-reads installations for #47390. NativeChatConnectorOfferCard.tsx passes offer.workspace through, which is the same path. The i18n files add the labels for the new action. The fixture and host-fixture changes support the visual proof. No file changes an unrelated area.
Full details: Linked Issues check
Explanation
Issue #47390 asks why installations made under a different GitHub login do not appear in bot connectors, and how existing installations can be linked without reinstalling. The reviewed desktop changes route Add org and the new Refresh action through a GitHub sign-in trip (addGitHubAccess, addGitHubAccount, startConnectorConnect, connectConnector, bots.connect.start). The desktop code is present at the reviewed head, and Add org no longer calls openGitHubInstallPage directly for a connector already on GitHub. The core outcome, however, depends on cloud logic in stablyai/orca-cloud#1180. That logic decides whether the install page opens, and whether the card reads Connected after the GitHub state refreshes. That code is not in this repository. The cloud tests cited in the PR description cannot be checked here. The desktop side also depends on the cloud change being deployed first. Desktop unit coverage for the wiring is not shown in the evidence available to this review.
Resolution
Provide the reviewed state of stablyai/orca-cloud#1180 (or its merged commit) so the routing rules can be checked against #47390: a teammate-installed org shows as Connected without the install page; an org that the selected login cannot reach opens the install page; Refresh re-reads the login's installations. Also provide the desktop test results for the addGitHubAccess path and the older-host cancel fallback in connector-connect-state.ts.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 4786ced0-c835-40eb-b271-a3b6dc456033
Commits
Reviewing files that changed from the base of the PR and between 52dcf17 and 25dcad0.
Files selected for processing: 1
src/renderer/src/lib/connector-connect-state.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
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
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 you add a GitHub org, or press the new Refresh on the GitHub connector row, Orca now asks GitHub again which orgs you can reach instead of only opening the install page. GitHub asks which account to use. Orca reads that account's orgs, and any org that's already installed shows as Connected right away. The install page opens only if that account can't reach the org you asked for.
What Changed
useConnectorSetup.start→addGitHubAccess. For a connector already on GitHub, it now starts the existing GitHub sign-in (switchAccount, GitHub's account picker) withaddAccess: { workspace }, naming the org when the card has one. It no longer callsopenGitHubInstallPagedirectly. The cloud opens GitHub's install page after the sign-in only when the login picked can't reach that org, or when none is named (stablyai/orca-cloud#1180). The card reads Connected when the trip finishes and the GitHub state refreshes.addAccess(addGitHubAccount), so the logins' installations are read again. It shows wherever "Add another GitHub account" already shows: a cloud that lists several logins, and not a paired web client.addAccessis added toConnectorConnectStartRequestSchema(additive), to thebots.connect.startRPC params, and throughstartConnectorTrip,connectConnectorandstartConnect. A host that passes it on answersaddAccess: true.addAccessand doesn't echo it. The renderer then cancels that trip before its page opens and opens the install page as before. A paired web client, which can't start a sign-in, keeps the install page.Why
Today, Add org opens only GitHub's install page. For an org a teammate installed, or one installed under your other GitHub login, GitHub shows "already installed", nothing comes back, and the card waits forever (#47390). GitHub App integrations normally sign the person in, list what that login can reach, and offer the install only for what's missing. This reuses the sign-in trip that "Add another GitHub account" already runs. It adds no GitHub permission and stores nothing new.
Linked Issue
Fixes #47390
Visual Proof
The GitHub connector row's menu, before and after (component fixture
bots/BotConnectorsPanel:gitHubPageMenu):Add org has no new UI. Its click now opens GitHub's account picker instead of the install page.
Testing
The cloud routing (teammate-installed org shows with no install page; other login; unreachable org goes to the install page; Refresh re-reads; state-less Configure → Save goes through the sign-in; older desktop unchanged) is tested in stablyai/orca-cloud#1180, on SQLite and Postgres.
The cloud's connector suites also pass against this branch's
connect-messages.ts, as they will after its pin bump.connect-messages.test.tspasses.pnpm tc:web,pnpm tc:node, oxlint and oxfmt on the changed files.Not run end to end against GitHub: a real sign-in needs a GitHub account and the cloud PR deployed.
I manually tested these changes locally (fixture screenshot only; see above)
Automated tests added/updated, or explained why not below: the logic that decides when the install page opens lives in the cloud and is tested there. The desktop change is wiring.
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because it runs only when someone clicks Add org or Refresh. It is one sign-in trip, the same one "Add another GitHub account" runs.
Risk
Level: Low
addAccess, so against it, Add org would sign in and finish without the install page for an org the login can't reach.Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance. No platform-specific code. Remote hosts are covered by the echo fallback. Mobile is unchanged.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)