Skip to content

feat(connectors): Add org and a new Refresh on the GitHub row go through GitHub sign-in - #47467

Merged
Jinwoo-H merged 2 commits into
mainfrom
fix/github-add-access-signin
Nov 23, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
fix/github-add-access-signin

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

Linked Issue

Fixes #47390

Visual Proof

The GitHub connector row's menu, before and after (component fixture bots/BotConnectorsPanel:gitHubPageMenu):

Before After
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.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive 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 Passed checks: 3 passed

Check name Status Explanation
Title check Passed 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 Passed 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 Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57e73c32-476e-4f64-b939-d3d65e4b7363
Commits

Reviewing files that changed from the base of the PR and between f3156ac and 52dcf17.

Files selected for processing: 17

  • cloud/packages/connector-contract/src/connect-messages.ts
  • src/main/connector-cloud/bots-cloud-client.ts
  • src/main/connector-cloud/connector-connect-trips.ts
  • src/main/connector-cloud/connector-connect.ts
  • src/main/runtime/rpc/methods/bots-connect.ts
  • src/renderer/src/components/bots/BotConnectorsPanel.fixture.tsx
  • src/renderer/src/components/bots/ConnectorSetupDialogs.tsx
  • src/renderer/src/components/bots/bot-connector-row-parts.tsx
  • src/renderer/src/components/bots/bot-connectors-host-fixture.tsx
  • src/renderer/src/components/bots/github/BotGitHubCard.tsx
  • src/renderer/src/components/native-chat/NativeChatConnectorOfferCard.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/bot-connector-host-calls.ts
  • src/renderer/src/lib/bot-github-install-record.ts
  • src/renderer/src/lib/connector-connect-state.ts
  • src/shared/rpc-contract/bots-connector-setup-params.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.

@Jinwoo-H
Jinwoo-H merged commit 14641e1 into main Nov 23, 2026
62 checks passed
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.

GitHub App installed on an additional org, but the org never appears in bot connectors

1 participant