Skip to content

fix(bots): a connector offer from a Slack thread tells the bot how to reach the card - #50694

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/connect-card-slack-link
Nov 27, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/connect-card-slack-link

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a bot answering in Slack asks its owner to connect a service, the Connect card it offers only exists in the bot's chat in Orca. The bot used to say it "opened the card here", so the owner found no card and no way to reach it from Slack. Now Orca tells the bot that the card is only in Orca and gives it the line to write. In Slack, Orca adds its "Open this thread in Orca" link under that line, which opens the chat with the card.

Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​303 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​301
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​179 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​154

What Changed

  • orca bot connectors --offer <service> (and Google setup when it routes to a Connect card): when the turn answers a Slack, Linear or GitHub thread (the same check workers and waits use to report back to their thread), the answer to the bot now says the card shows only in Orca, not in that thread.
    • Slack: the bot ends its final message with a line such as "Open Orca to connect GitHub." Orca Cloud already puts its signed "Open this thread in Orca" link (desktop and phone) under a Slack answer with such a line. The bot is told to keep the line in English and word for word, and to leave tables out of that message, so the link shows.
    • Linear: the bot says the card is waiting in Orca; the issue's agent session already shows Open in Orca.
    • GitHub: the bot says the card is waiting in Orca (no link is available there yet).
    • "Don't tell them where to click." is dropped from those answers, since it now contradicts them.
  • Variants say what the card is for: connect, add more GitHub repositories or organizations, add another Slack or Linear workspace, add another Google account, sign in to Orca Cloud.
  • An offer whose card wasn't written (the chat changed first) now answers offered: false and says to run it again, instead of claiming the owner sees a card.
  • The Google setup guide says the final message still includes that line; the CLI help for bot connectors describes it.

Out of scope (follow-ups): a direct sign-in link in Slack (it would need a private message: a connect link posted to a shared thread links whoever clicks it), and a cloud-side flag so every thread (including GitHub) gets the link without depending on the line's wording.

Why

The offer's answer assumed the reader was in the Orca chat, so a bot answering in Slack had nothing to point to. Orca's Slack links are signed HTTPS pages from Orca Cloud: Slack doesn't open every app scheme, so a bare orca:// link from the desktop wouldn't be reliably clickable. The cloud already adds that link under a Slack answer asking to open something in Orca, so giving the bot that line fixes it with no cloud change. Checked against how comparable products handle this.

Linked Issue

N/A (internal report).

Visual Proof

N/A: no UI changed. The change is the text Orca gives the bot. Before, a Slack-thread turn got "Your owner now sees a Connect card for GitHub in this chat … Don't tell them where to click." After, it also gets "The card shows only in Orca, not in the Slack thread in #orca, so don't say it is there. Your final message goes there. End it with this line … "Open Orca to connect GitHub." Orca then adds a link to this chat under it, so don't write one yourself."

Testing

  • 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

bot-connector-offer-thread-note.test.ts pins every variant's line against the cloud's link pattern and checks the Slack, Linear, GitHub and DM wording. bots-connector-offer.test.ts covers a thread turn, a turn in Orca, another bot's link, add access, sign in, Google already on, and an unwritten card. The thread-turn and unwritten-card tests fail on main. The cloud side was checked by running its connector code locally: a later Slack answer with the line gets the signed "Open this thread in Orca" link. Not tested end to end in a live Slack workspace.

Performance

None, because this runs only when a bot offers a connector: one in-memory lookup of the chat's conversation links and one turn-state check, on a path that already writes a journal item.

Risk

Level: Low

Only the text a bot reads after --offer changes, and only on turns that answer a thread; turns in Orca get the same answer as before. If the bot rewords the line, Slack gets no link, but the reply still says the card is in Orca. Plain revert.

Review

… reach the card

The Connect card a bot offers shows only in its Orca chat. When the turn answers a Slack, Linear
or GitHub thread, the offer's answer now says so and tells the bot what to write there; on Slack
that line gets Orca Cloud's existing "Open this thread in Orca" link. An offer whose card wasn't
written says so instead of claiming it is shown, and Google setup's card route gets the same note.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Shared helpers generate offer instructions and thread-specific notes. Connector-offer handling now reports whether the card was shown and adds a note for a matching external-conversation thread. Google setup routing checks the card result and rejects the request if no card was shown. Tests and CLI guidance cover these behaviors.

Merge Risk: Minimal · up to 7618c

Connector offers in Slack, Linear and GitHub threads now tell the bot where the Connect card is and what to say to the owner. An offer for a card that was not written now says so and asks the bot to retry. No concrete defect was found, and the change is low risk to merge. Live Slack behavior was not tested end to end.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a connector offer from a Slack thread now tells the bot how to reach the Connect card. The changeset adds thread-aware offer text (Slack, Linear, GitHub), the 'shown' …
Description check Passed The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (marked N/A with reason), Visual Proof (N/A with reason), Testing with checkboxes and test details…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a connector offer from a Slack thread now tells the bot how to reach the Connect card. The changeset adds thread-aware offer text (Slack, Linear, GitHub), the 'shown' status for unwritten cards, and the Google setup guide update, all of which match the title's scope. The 'fix(bots)' prefix follows conventional commit style and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue (marked N/A with reason), Visual Proof (N/A with reason), Testing with checkboxes and test details, Performance (a completed 'None, because' line), Risk with level and revert plan, and Review. The AI Disclosure section is left blank, which the template allows for internal contributors. The Agent skill upstream boundary checkbox is not ticked and the closing checklist is not marked. These are minor gaps. The 'Visual Proof' N/A rationale is reasonable because the change is bot-facing text, but it also describes before and after text in prose.

  • 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: a2094131-726e-43a8-8a53-dc6277487d80
Commits

Reviewing files that changed from the base of the PR and between 329c46e and 7618cc1.

Files selected for processing: 12

  • skill-guides/orca-cli/references/google-setup.md
  • src/cli/skills/bundled-skill-guides.ts
  • src/cli/specs/bot.ts
  • src/main/runtime/rpc/methods/bots-connector-offer.test.ts
  • src/main/runtime/rpc/methods/bots-connector-offer.ts
  • src/main/runtime/rpc/methods/bots-google-setup.test.ts
  • src/main/runtime/rpc/methods/bots-google-setup.ts
  • src/shared/bots/bot-connector-offer-thread-note.test.ts
  • src/shared/bots/bot-connector-offer-thread-note.ts
  • src/shared/bots/bot-connector-offer.ts
  • src/shared/bots/connector-offer-directions.ts
  • src/shared/google/google-bot-connect-state.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@AmethystLiang
AmethystLiang merged commit 3e4a1d5 into main Nov 27, 2026
101 of 104 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.

1 participant