Skip to content

fix(connectors): migrate webui connectorsStore off dropped /api/connections#1631

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
autofix/issue-1630
Draft

fix(connectors): migrate webui connectorsStore off dropped /api/connections#1631
github-actions[bot] wants to merge 1 commit into
mainfrom
autofix/issue-1630

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

In the Agent UI, the Email Triage agent's mailbox selector never rendered even with a Google and a Microsoft account fully mail-connected. The webui connectorsStore still fetched the legacy /api/connections* endpoints, which the backend stopped mounting when connections moved to the T-8b /api/connectors framework — so the fetch failed, the store saw zero connected providers, and the selector's connectedMailProviders.length > 0 gate never opened. After this change the store reads connected providers from /api/connectors, so the selector renders, auto-selects a sole provider, and lets the user switch when both are connected.

This unblocks the mailbox-provider selector (#1596/#1600) and multi-inbox triage (#1614) when driven through the Agent UI.

Closes #1630

Test plan

  • python util/lint.py --all passes (Black/isort clean; this change touches no Python)
  • cd src/gaia/apps/webui && npm install && npm run test — the new connectorsStore refresh() tests pass
  • npm run build — TypeScript compiles (legacy /connections* helpers removed; no dangling references)
  • Rebuild the UI and run on-machine with both a Google and a Microsoft mailbox connected (mail scopes): open the Email Triage agent and confirm the mailbox selector renders, a single connected provider auto-selects, and switching providers updates the active mailbox

⚠️ Needs manual validation — the automated checks here confirm no Python regression but can't exercise this frontend fix (no Node toolchain in CI for this job, and it needs a UI rebuild + live Google/Microsoft connections). A maintainer should verify on a machine with both mailboxes connected via the steps above before merging.

Follow-up (out of scope here): the issue notes that "triage my inbox" engaged Gmail only when both mailboxes were connected. That is most likely downstream of this bug (a dead selector can never set the session mail_provider). Once this lands, confirm mail_provider = null fans out to all connected mailboxes per #1614 — if it still defaults to Gmail, there's a second backend-side gap to file separately.

…ctions

The Agent UI mailbox selector for the Email Triage agent never rendered:
the webui connectorsStore still fetched the legacy /api/connections
endpoints, which the backend no longer mounts (connections moved to the
T-8b /api/connectors framework). The fetch failed, leaving the store with
zero connected providers, so the selector's connectedMailProviders.length
> 0 render gate never opened.

Migrate the store's refresh() onto listConnectors() / listConnectorGrants()
(/api/connectors), mapping connected OAuth ConnectorRow entries to the
ConnectorInfo shape the store and ChatView consume. Retire the dead
/connections* helpers in services/api.ts (all provably unused after the
migration) so nothing else regresses onto the unmounted prefix.

Closes #1630
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.

Agent UI: Email Triage mailbox selector never renders — connectorsStore calls dropped /api/connections (not migrated to /api/connectors)

0 participants