Skip to content

feat(google): offer 'Set up a new Google app' from Use another account and the sign-in card - #47905

Merged
Jinwoo-H merged 9 commits into
mainfrom
google-setup-discover
Nov 24, 2026
Merged

Jinwoo-H merged 9 commits into
mainfrom
google-setup-discover

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor

Summary

Makes "Set up a new Google app" findable where people get stuck. Stacked on #47820 (which adds google-setup start --new-app); lands together with #47790, #47814, #47820 and #47823.

  • Use another account (Settings › Google and the chat's Google Connect card) now opens a menu, replacing "Add another Google account":
    • Sign in with Google: "Uses your current Google app". This is the same add-account path as before.
    • Set up a new Google app: "If your current app doesn't work for this account or organization".
  • Access blocked line: from the moment the waiting card appears ("Finish connecting Google in your browser"), it shows "Seeing 'Access blocked'? Set up a new Google app". The expired sign-in error shows the same line. Google's Access blocked page never returns to Orca, so people otherwise wait out the 5-minute expiry with no way forward.
  • One start path: the owner's start RPC now takes the same newApp flag Start a new Google app setup when one already exists #47820 gave the CLI. From Settings it uses the existing "Set up Google" rule: open the last-visited agent's chat on that host and start there, or offer New when there's none. From a chat's Connect card, it starts in that chat. If a setup is already running, it gets marked as a new-app setup instead of restarting.
  • The expired message is now a shared constant (GOOGLE_SIGN_IN_EXPIRED), so the renderer can recognise it.

The line and the menu show for every app. Orca doesn't record who made the app.

Screenshots

Settings, Use another account open (dev Orca, isolated profile):

Use another account menu

The waiting card with the Access blocked line (component fixture):

Waiting card with Access blocked line

Performance

None, because the new code runs only when Google Settings or the Google Connect card renders, or when someone clicks. The last-visited lookup now selects one id from the store instead of the whole visit map, so Settings re-renders less than before.

Risk

Level: Low. The riskiest part is the owner start path: a new-app start over an ordinary running setup marks that setup instead of restarting it, the same rule #47820 uses for the CLI. If the menu broke, people would lose the add-account click; "Sign in with Google" runs the same code as before. A plain revert backs it out.

Testing

  • Google setup RPC test: an owner start with newApp begins a new-app run whose old key doesn't count, marks a running setup without restarting it, and doesn't tell the agent twice.
  • New-app entry test: each menu item calls its own handler, the waiting card shows the line, and a failed sign-in shows it only when the sign-in expired.
  • tc:web, tc:node, oxlint, ratchets, and localization checks pass locally.
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​178 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​172
Prod 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​372 $\color{#cf222e}{\Huge{\mathbf{−}}}$​118 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​254

Adds --new-app to google-setup start: it runs the guided setup instead of
showing the Connect card, and only a key saved after the start counts as
that setup's key, so the existing app's key can't finish it.
Also drops type assertions from the start routing test.
…ng it

Replacing it wiped the owner's answers and let a stale card answer land on
the new run. Also words --new-app as making a new app, not adding an account.
@Jinwoo-H
Jinwoo-H changed the base branch from google-setup-new-app to main November 23, 2026 23:59
# Conflicts:
#	src/main/google/google-connect.ts
#	src/main/google/google-setup-runs.ts
#	src/main/runtime/rpc/methods/bots-google-setup.test.ts
#	src/renderer/src/components/native-chat/NativeChatGoogleOfferCard.tsx
#	src/shared/google/google-connect-types.ts
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Google setup now supports a new-app option through the runtime contract, setup RPC, and setup-run handling. The renderer exposes the option in account settings and the native chat card, with runtime capability checks for non-local targets. Shared sign-in components display an access-blocked prompt for expired sign-ins. Sign-in cancellation calls the host only while sign-in is waiting.

Merge Risk: Low · up to 924d5

Setting up a new Google app over a setup already on the import path can reuse the old setup instead of starting over. This is a narrow edge case with an easy workaround, and the rest of the new-app flow looks sound. A small fix to the guard in the setup RPC handler is advisable before or shortly after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a new 'Set up a new Google app' option in the Use another account menu and the sign-in card. The changeset adds that menu, the access-blocked prompt on the waiting and…
Description check Passed The description follows the template's main sections. It has an ELI5-style summary, a What Changed list, a Why explanation via the Access blocked rationale, Performance ('None, because ...'), Risk wit…
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 new 'Set up a new Google app' option in the Use another account menu and the sign-in card. The changeset adds that menu, the access-blocked prompt on the waiting and expired-sign-in states, and the owner start path with a newApp flag. The conventional-commit prefix is acceptable. The title is long at 91 characters, but it stays specific and on topic.

Full details: Description check

Explanation

The description follows the template's main sections. It has an ELI5-style summary, a What Changed list, a Why explanation via the Access blocked rationale, Performance ('None, because ...'), Risk with a Low level and a revert note, and Testing. Two template parts are missing: there is no explicit 'Linked Issue' entry (it says it stacks on #47820 and lands with other PRs, but has no 'Fixes #' line), and the 'Visual Proof' section has before/after images only for the new menu and the waiting card, without a clear before state. The AI Disclosure section is blank, and the testing checklist boxes are unchecked. The author also needs to state how the change was tested on platforms (manual test not checked). These gaps are minor, so the description is mostly complete.

  • 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

@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

Nitpick comments: 1

src/renderer/src/components/bots/google/google-new-app-entry.test.tsx: 1

25-26: Trivial · Maintainability & Code Quality · Quick win

Remove the UI-wiring unit tests.

These suites assert copy, menu callbacks, and behavior under a mocked capability result. They add maintenance when labels or component structure change, but do not validate real server compatibility. Use the documented rendered-UI validation workflow instead. (raw.githubusercontent.com)

Based on learnings, the repository rule excludes unit tests of UI behavior, wiring, mock calls, copy, and constants.

Source: Learnings

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: 10ca303f-ab22-4593-9cf5-6a5ea0c2653a
Commits

Reviewing files that changed from the base of the PR and between b1c1282 and 924d59a.

Files selected for processing: 21

  • config/whole-hot-map-selector-baseline.txt
  • src/main/google/google-connect.ts
  • src/main/google/google-setup-runs.ts
  • src/main/google/google-sign-in-run.ts
  • src/main/runtime/rpc/methods/bots-google-setup.test.ts
  • src/main/runtime/rpc/methods/bots-google-setup.ts
  • src/renderer/src/components/bots/google/GoogleAccountSettings.tsx
  • src/renderer/src/components/bots/google/GoogleSignInTrouble.tsx
  • src/renderer/src/components/bots/google/GoogleSignInWaiting.fixture.tsx
  • src/renderer/src/components/bots/google/GoogleSignInWaiting.tsx
  • src/renderer/src/components/bots/google/GoogleUseAnotherAccountMenu.tsx
  • src/renderer/src/components/bots/google/google-new-app-entry.test.tsx
  • src/renderer/src/components/bots/google/setup-cards/google-setup-run-store.ts
  • src/renderer/src/components/bots/google/use-google-host-label.ts
  • src/renderer/src/components/bots/google/use-google-new-app.tsx
  • src/renderer/src/components/bots/google/use-google-setup-start.tsx
  • src/renderer/src/components/bots/google/use-google-sign-in.ts
  • src/renderer/src/components/native-chat/NativeChatGoogleOfferCard.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/shared/google/google-connect-types.ts
  • src/shared/rpc-contract/google-setup-params.ts
Files with no reviewable changes: 1

  • config/whole-hot-map-selector-baseline.txt

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

@Jinwoo-H
Jinwoo-H merged commit bb60725 into main Nov 24, 2026
57 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