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
fix(bots): Connect and Sign in for a paired server's bot sign in that server - #45727
A bot that runs on a paired server needs that server signed in to Orca before Slack, GitHub, Linear or webhooks can reach it. When the server was signed out, pressing Connect on the bot's card signed in the Mac instead, so nothing changed on the server. Now the card and the setup dialog say which server needs signing in and offer Sign in on , which signs that server in.
Files
Added
Deleted
Net
Test
2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$26
$\color{#cf222e}{\Huge{\mathbf{−}}}$2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$24
Prod
8
$\color{#1a7f37}{\Huge{\mathbf{+}}}$230
$\color{#cf222e}{\Huge{\mathbf{−}}}$84
$\color{#1a7f37}{\Huge{\mathbf{+}}}$146
What Changed
Connect Slack / Linear / GitHub for a server bot. Before: the server answered "signed out", and the dialog showed "Slack connects through Orca Cloud. Sign in to Orca to continue." with a Sign in button for this computer. That sign-in finished on the Mac ("Signed in to Orca") and the server stayed signed out. After: the dialog says "Sign in to Orca to connect Slack." with Sign in on , which runs the server's own approve-in-browser sign-in (orcaAccount.signIn.start, the same path orca auth login and the Connectors notice use).
Sign in card in a server bot's chat (orca bot connectors --offer webhook, or events for a connector it has). Before: a plain line, "Sign in to Orca on your computer, then tell .", with no button, although the bot was told "Your owner now sees a Sign in line". After: the card's own line plus Sign in on (or Sign in again), with the code to check and Cancel while it waits. Once the server is signed in it turns into "Signed in to Orca · Continue", like this computer's card.
Mechanism. The three setup dialogs each had an early return for the signed_out failure that drew this window's sign-in for every bot. That made the failed step's existing BotHostSignInButton unreachable. The early return now applies only when the failure is this window's own: a bot on this computer, or the Slack hand-off's redeem, which runs on this desktop's account (signedOutHere in bot-host-copy.ts, and local on the Slack failed step). The chat card follows the split the Connectors tab already uses (BotCloudSignInNotice for this computer, BotConnectorsHostNotice for a server). It reuses the notice's sign-in control, now exported as BotHostSignInControl. It decides "signed in" from the server's account plus its connector status (bots.listconnectorStatus), the same fact orca bot connectors, trigger-options and the phone card read. It resolves its bot with useCardBot, so two servers with the same bot id don't get mixed up.
Why
Root cause: BotSlackSetupDialog.tsx:80, BotLinearSetupFlow.tsx:180 and BotGitHubSetupDialog.tsx:201 answered the host's signed_out with OrcaCloudSignInDialogBody, which calls connectCurrentOrcaProfile, the window's own loopback sign-in (client_id=orca-desktop, the URL in #45432). That is the wrong machine for a server bot. The issue's ERR_SOCKS_CONNECTION_FAILED came from that desktop loopback URL opening in a server-routed browser tab.
Options considered:
Tunnel the desktop's loopback callback to the server, or have the desktop's sign-in apply to the server. Rejected: the server already has its own device-code sign-in, which keeps its PKCE secrets on the server and needs no callback.
Real paired setup: a headless orca serve (the server, named g16) with a fake Orca Cloud, and a hidden desktop paired to it. The bot on g16 ran bots.connector.offer from its own chat.
Before, webhook Sign in card (no action) and Connect Slack dialog (signs in this desktop):
After: the server signed out again, so the connected Slack card reads Paused with g16's sign-in.
After, the same two, then the server signed in from the dialog. The card reads Signed in, and the approval page opened in g16's browser tab. The certificate error is the fake cloud's test certificate.
Testing
Reproduced on main with a throwaway Playwright spec, not committed. It used launchHeadlessPairedRuntimeHost (with ORCA_CLOUD_API_URL and ORCA_CONNECTOR_URL pointed at the e2e fake Orca Cloud and connector fixtures, plus the Claude stub) and launchPairedElectronClient. The bot on the server offered webhooks and then Slack. Main showed the plain line and the desktop sign-in dialog.
Same spec on this branch: the dialog showed "Sign g16 in to Orca to connect Slack." Clicking Sign in on g16 signed the server in (orcaAccount.status → signed-in), and the desktop's own account stayed signed out. The server's bots.listconnectorStatus went to ok. A Slack event delivered through the connector fixture woke the bot: the stub agent got the message.
Surfaces checked against one fact: desktop dialog and chat card, the Connectors notice, bots.listconnectorStatus (what orca bot connectors and orca automations trigger-options read), and the phone card in fix(mobile): pause Connect cards when the host is signed out #45440, which reads the same connectorStatus.
BotSlackSetupDialog.paired.test.tsx: new case "signs the server in, not this desktop, when the server is signed out". It fails on main, which shows the desktop's Sign in.
NativeChatConnectorOfferCard.test.tsx: new case "reads Paused, not Connected, while the bot's host is signed out of Orca". It fails without the change. The same e2e spec then signed the server out, and the Slack card turned to Paused.
pnpm check:changed passes except localization catalogs. That check fails on main right now: zh.json has extra keys bots.header.runs and bots.header.newBot from fix(i18n): show the Bots UI in Simplified Chinese #45750, and this PR doesn't touch zh.json. Tested on macOS.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Renderer only, with no wire or saved-data changes. The riskiest part is the chat card for a server bot. A server too old to answer orcaAccount.status, or one without Orca Cloud configured, keeps the host's plain line as before. An answered card reads nothing from the server. A paired web window, where host labels are hidden, keeps today's behaviour. To back out, revert the PR.
Level: Low
AI Disclosure
Review
Two review rounds (Codex and Claude). Fixed in this PR:
The Slack hand-off's redeem failing signed_out is this desktop's sign-in, not the server's.
The card counts a connector the server's cloud halted as not signed in.
The card looks up its bot with useCardBot.
An answered card no longer reads the server.
Composes with two community PRs, landed first and this branch rebased onto them. Both use the same startBotHostSignIn path:
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Not in this PR: Settings › Orca Account ignores the Settings host picker and always shows this computer's account. With a server picked, it reads "Connected" for the Mac (the second comment on #45432). The server's real account and its sign-in are under Settings › Bots. Whether that page should follow the picker is a product call, raised separately.
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
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)
No actionable comments were generated in the recent review.
Walkthrough
The changes distinguish local sign-out failures from server-side failures in GitHub, Linear, and Slack setup flows. They add a reusable host sign-in control and use it in server notices and remote bot connector offers. Remote offers display sign-in, signed-in, paused, or fallback states based on host and Orca account state. Tests cover paired-server Slack sign-in and a paused connector offer when the host is signed out.
Severity of issue fixed: Medium
Merge Risk: Moderate · up to 9f6c6
This PR lets desktop users sign in the server that hosts a bot. One reported case remains open. If the server account looks signed in but its connector needs sign-in again, the card's recovery button may be refused by the server, leaving the user without a way to recover from that card. A linked service may also still read "Connected" in that state. Resolve or explicitly accept these before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix and the target: a paired server's bot sign-in and Connect action now sign in that server rather than the desktop. The changeset matches this: setup dialogs and the chat card of…
Description check
The description follows the repository template and covers ELI5, What Changed, Why, Linked Issue (Fixes #45432, Fixes #45278), Visual Proof with before/after images, Testing, Risk with level, and Revi…
Linked Issues check
Both directly linked issues are open, so their coding requirements apply.
[#45432, #45278] Sign-in routing for a server bot. The PR changes the setup dialogs (BotSlackSetupDialog.tsx, BotLinearSetupF…
Out of Scope Changes check
Each changed area connects to #45432 or #45278: - The three setup dialogs and their routing through signedOutHere (bot-host-copy.ts) implement the server sign-in objective. - The local?: true flag…
Full details: Title check
Explanation
The title names the fix and the target: a paired server's bot sign-in and Connect action now sign in that server rather than the desktop. The changeset matches this: setup dialogs and the chat card offer 'Sign in on <server>', and signedOutHere routes only local failures to the desktop sign-in. The title is in the conventional commit form, uses 'Connect and Sign in' phrasing that is slightly awkward, and is 76 characters long, which is within a reasonable limit.
Full details: Description check
Explanation
The description follows the repository template and covers ELI5, What Changed, Why, Linked Issue (Fixes #45432, Fixes #45278), Visual Proof with before/after images, Testing, Risk with level, and Review. The AI Disclosure section is empty, which is allowed for StablyAI team members. The orca-pr-loc block is auto-generated and left in place. The checklist's final lint/typecheck/test/build item is unchecked, and the description says the localization catalog check fails on main, so this is a partial gap rather than a missing section.
Full details: Linked Issues check
Explanation
Both directly linked issues are open, so their coding requirements apply.
[#45432, #45278] Sign-in routing for a server bot. The PR changes the setup dialogs (BotSlackSetupDialog.tsx, BotLinearSetupFlow.tsx, BotGitHubSetupDialog.tsx). A signed_out failure now opens the server's own sign-in (Sign in on <server>, orcaAccount.signIn.start) when the failure belongs to a remote host. The early return to this window's sign-in applies only when signedOutHere (bot-host-copy.ts) is true. That covers a local bot and the Slack hand-off redeem (local flag in use-bot-slack-setup.ts). This addresses the wrong-machine sign-in described in #45432 and the server-side sign-in gap described in #45278.
[#45278] Chat card guidance. NativeChatConnectorOfferCard.tsx and the shared BotHostSignInControl (BotConnectorsHostNotice.tsx) show the server's sign-in control in a server bot's chat. The card reads signed-in state from the server's account and bots.listconnectorStatus. A connected service whose host is signed out now shows a paused state (new test in NativeChatConnectorOfferCard.test.tsx), so the connector no longer looks connected when it cannot wake the bot.
[#45432] Slack Connect completion. The PR description reports a paired-runtime Playwright run on this branch. The server signed in while the desktop stayed signed out, the server's connectorStatus became ok, and a Slack fixture event woke the bot. A paired unit test (BotSlackSetupDialog.paired.test.tsx) covers the server-sign-in branch. I did not run these tests. The evidence is the PR description and the change summaries.
Not required: the Settings > Orca Account host picker, which the PR explicitly excludes. Community PRs #45488 and #45502 are landed-first dependencies that this PR's core objectives do not require. No separate stack evidence was supplied.
Full details: Out of Scope Changes check
Explanation
Each changed area connects to #45432 or #45278:
The three setup dialogs and their routing through signedOutHere (bot-host-copy.ts) implement the server sign-in objective.
The local?: true flag on the failed step in use-bot-slack-setup.ts keeps this desktop's own Slack hand-off redeem on local sign-in. This is needed to avoid sending the desktop's own failure to the server.
The chat card changes in NativeChatConnectorOfferCard.tsx (paused state, server sign-in control, useCardBot lookup) implement the chat-card part of #45278.
The export of BotHostSignInControl from BotConnectorsHostNotice.tsx reuses the existing notice control. This is a refactor that supports the card change.
The en.json connectorOffer strings support the new Sign in and paused text.
The paired and card tests cover the new behavior.
The PR description excludes the Settings > Orca Account host-picker behavior, and the summaries show no change to it. The Connectors-tab reveal (#45502) and sign-in-again (#45488) are not in the changed code. I found no change unrelated to the linked issues in the summaries. Scope conclusions rely on the supplied summaries. I did not read the full diff.
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: 12c10f72-dd58-4e0c-93d7-564ac938ce40
Commits
Reviewing files that changed from the base of the PR and between 9a83ae2 and 9f6c654.
Files selected for processing: 1
src/renderer/src/i18n/locales/en.json
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Cover the card's server sign-in routing in NativeChatConnectorOfferCard.test.tsx.
The paired-server case in this file asserts only the fallback line and the absence of buttons. The card's ServerSignInOffer path, which renders BotHostSignInControl for a signed-out remote server, has no test that would fail if its routing were reverted.
Add a case for a remote bot on a named, signed-out server. Click the Sign in on <server> control and assert that the start request targets that server, not the desktop. Keep the assertions to routing and the wait state. Do not assert copy or label text.
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: bfca6ab3-cfee-45e5-a9b8-f4a62b9fa7de
Commits
Reviewing files that changed from the base of the PR and between 2a0c7ad and 78602e0.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Heavy lift
The sign-in control on a signed-in server cannot start a recovery sign-in.
When the server account reads signed-in and its connector reports needs-sign-in or signed-out, the card renders "Sign {host} in again". That button starts a plain sign-in with switchAccount: false. The server refuses a plain sign-in while an account is signed in, and the flow fails with "This server is already signed in. Use Switch account to change it." The card offers no switch-account action, so the user cannot recover from this card in this state.
Choose the start intent this state should use, or change the state so the card does not offer a plain sign-in. Either change must keep the sign-in control working when the account is signed in.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Pause connected offers when the host requires renewed sign-in.
If hostStatus is needs-sign-in, this condition leaves a linked service marked “Connected” and shows its connected-workspace details. The same status produces a lapsed-sign-in notice in botHostNoticeState and blocks success in ServerSignInAsk.
Include needs-sign-in in the pause condition. Keep the Google exception and the ok path unchanged.
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
A bot that runs on a paired server needs that server signed in to Orca before Slack, GitHub, Linear or webhooks can reach it. When the server was signed out, pressing Connect on the bot's card signed in the Mac instead, so nothing changed on the server. Now the card and the setup dialog say which server needs signing in and offer Sign in on , which signs that server in.
What Changed
orcaAccount.signIn.start, the same pathorca auth loginand the Connectors notice use).orca bot connectors --offer webhook, or events for a connector it has). Before: a plain line, "Sign in to Orca on your computer, then tell .", with no button, although the bot was told "Your owner now sees a Sign in line". After: the card's own line plus Sign in on (or Sign in again), with the code to check and Cancel while it waits. Once the server is signed in it turns into "Signed in to Orca · Continue", like this computer's card.orca auth login, so bot connectors look connected but never wake #45278. The phone (fix(mobile): pause Connect cards when the host is signed out #45440) says "Paused until signs in to Orca." After: the desktop card shows the same line, with that host's sign-in (Sign in on , or this computer's Sign in for its own bots). It reads the same per-hostconnectorStatusthe phone andorca bot connectorsread, from the bots list the window already has, so there are no new reads. Onlysigned-outpauses, and Google keeps its own state.signed_outfailure that drew this window's sign-in for every bot. That made the failed step's existingBotHostSignInButtonunreachable. The early return now applies only when the failure is this window's own: a bot on this computer, or the Slack hand-off's redeem, which runs on this desktop's account (signedOutHereinbot-host-copy.ts, andlocalon the Slack failed step). The chat card follows the split the Connectors tab already uses (BotCloudSignInNoticefor this computer,BotConnectorsHostNoticefor a server). It reuses the notice's sign-in control, now exported asBotHostSignInControl. It decides "signed in" from the server's account plus its connector status (bots.listconnectorStatus), the same factorca bot connectors, trigger-options and the phone card read. It resolves its bot withuseCardBot, so two servers with the same bot id don't get mixed up.Why
Root cause:
BotSlackSetupDialog.tsx:80,BotLinearSetupFlow.tsx:180andBotGitHubSetupDialog.tsx:201answered the host'ssigned_outwithOrcaCloudSignInDialogBody, which callsconnectCurrentOrcaProfile, the window's own loopback sign-in (client_id=orca-desktop, the URL in #45432). That is the wrong machine for a server bot. The issue'sERR_SOCKS_CONNECTION_FAILEDcame from that desktop loopback URL opening in a server-routed browser tab.Options considered:
orca auth loginon the server" (fix(connectors): a signed-out server is told how to sign in #45398 did this for the CLI). Rejected for the desktop: the desktop can already start that sign-in for the server.signed_outfailure to the existing server sign-in. Smallest change, and no new wire fields.Linked Issue
Fixes #45432
Fixes #45278
Visual Proof
Real paired setup: a headless
orca serve(the server, named g16) with a fake Orca Cloud, and a hidden desktop paired to it. The bot on g16 ranbots.connector.offerfrom its own chat.Before, webhook Sign in card (no action) and Connect Slack dialog (signs in this desktop):


After: the server signed out again, so the connected Slack card reads Paused with g16's sign-in.

After, the same two, then the server signed in from the dialog. The card reads Signed in, and the approval page opened in g16's browser tab. The certificate error is the fake cloud's test certificate.



Testing
Reproduced on main with a throwaway Playwright spec, not committed. It used
launchHeadlessPairedRuntimeHost(withORCA_CLOUD_API_URLandORCA_CONNECTOR_URLpointed at the e2e fake Orca Cloud and connector fixtures, plus the Claude stub) andlaunchPairedElectronClient. The bot on the server offered webhooks and then Slack. Main showed the plain line and the desktop sign-in dialog.Same spec on this branch: the dialog showed "Sign g16 in to Orca to connect Slack." Clicking Sign in on g16 signed the server in (
orcaAccount.status→signed-in), and the desktop's own account stayed signed out. The server'sbots.listconnectorStatuswent took. A Slack event delivered through the connector fixture woke the bot: the stub agent got the message.Surfaces checked against one fact: desktop dialog and chat card, the Connectors notice,
bots.listconnectorStatus(whatorca bot connectorsandorca automations trigger-optionsread), and the phone card in fix(mobile): pause Connect cards when the host is signed out #45440, which reads the sameconnectorStatus.BotSlackSetupDialog.paired.test.tsx: new case "signs the server in, not this desktop, when the server is signed out". It fails on main, which shows the desktop's Sign in.NativeChatConnectorOfferCard.test.tsx: new case "reads Paused, not Connected, while the bot's host is signed out of Orca". It fails without the change. The same e2e spec then signed the server out, and the Slack card turned to Paused.pnpm check:changedpasses exceptlocalization catalogs. That check fails on main right now:zh.jsonhas extra keysbots.header.runsandbots.header.newBotfrom fix(i18n): show the Bots UI in Simplified Chinese #45750, and this PR doesn't touchzh.json. Tested on macOS.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Renderer only, with no wire or saved-data changes. The riskiest part is the chat card for a server bot. A server too old to answer
orcaAccount.status, or one without Orca Cloud configured, keeps the host's plain line as before. An answered card reads nothing from the server. A paired web window, where host labels are hidden, keeps today's behaviour. To back out, revert the PR.Level: Low
AI Disclosure
Review
Two review rounds (Codex and Claude). Fixed in this PR:
signed_outis this desktop's sign-in, not the server's.useCardBot.Composes with two community PRs, landed first and this branch rebased onto them. Both use the same
startBotHostSignInpath:Agent skill upstream boundary
Notes
Not in this PR: Settings › Orca Account ignores the Settings host picker and always shows this computer's account. With a server picked, it reads "Connected" for the Mac (the second comment on #45432). The server's real account and its sign-in are under Settings › Bots. Whether that page should follow the picker is a product call, raised separately.
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)