Repository navigation
fix(google): stop showing Setting up on an agent's Google page once Google works - #49331
Conversation
…oogle works The page said Setting up whenever a setup run was open, even one left open after Google was signed in another way, while `orca bot connectors` said Signed in. Both now read one agent-scoped state (botGoogleConnectState); Setting up shows only while the agent can't use Google yet. Stop setup still closes an open run.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
) * fix(google): stop showing Setting up on an agent's Google page once Google works (#49331) The page said Setting up whenever a setup run was open, even one left open after Google was signed in another way, while `orca bot connectors` said Signed in. Both now read one agent-scoped state (botGoogleConnectState); Setting up shows only while the agent can't use Google yet. Stop setup still closes an open run. * feat(sharing): list Google under Uses on a shared agent's invite The invite card listed GitHub, Slack and Linear but never Google. The owner's hello now names Google for a shared agent with a Google account that works, read with botGoogleConnectState like `orca bot connectors`, kept fresh on agent writes and Google sign-ins or sign-outs. Desktop and phone invites show it with Google's mark; cards from older Orcas still read. * fix(sharing): release the Google account listener on stop, one hello per agent write The host now owns the Google cache and puts its account-write subscription with its other stops. An agent write waits for Google's read and then sends its one hello, instead of one hello before the read and a second after it.
Problem
An agent's Connectors > Google page said Setting up while
orca bot connectorssaid Google was signed in and every service was ready.Cause
BotGoogleCardshowed Setting up whenever the host had a Google setup run inrunningstate (added in #48187). A run stays open if it was started and Google then got signed in some other way, for example from Settings or the Connect card. The owner's agent had a run like that, open since 11-07 with no steps. The CLI decides from the agent's own accounts instead (googleBotConnectStateover the accounts the agent may use), so the two disagreed. Neither #49268 nor the sharing branch caused this.Fix
botGoogleConnectState(bot, host)insrc/shared/google/google-bot-connect-state.tsgives one agent's Google state.orca bot connectors, the host'shostGoogleBotState, and the Google page all read it now.botGoogleSettingUp(state, run): the page shows Setting up only while a run is open and the agent can't use Google yet.Screenshots (component fixture
bots/BotConnectorsPanel:googlePageSetupLeftOpen: two accounts signed in, a setup run still open)Before:
After:
Tests
src/shared/google/google-bot-connect-state.test.tsfails with the old rule ("expected true to be false") and passes with the fix.Performance
No new reads or calls.
botGoogleConnectStatefilters the agent's handful of Google accounts in memory, using the Google status and setup run the page andorca bot connectorsalready read, and it runs only when they render or run.