Skip to content

feat(google): add read-only Gmail across connector surfaces - #493

Merged
adampeterhiggins merged 3 commits into
mainfrom
ah/add-gmail-google-connector
Oct 26, 2026
Merged

adampeterhiggins merged 3 commits into
mainfrom
ah/add-gmail-google-connector

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

The fork's Google connector supports Drive and Calendar but cannot supply Gmail context. Add read-only Gmail conversations to the same environment-owned connection, including native Gmail search syntax, bounded message snapshots, citations, thread links and change watches.

Web and desktop gain a Gmail picker tab and searchable palette actions. Mobile gains source tabs, Gmail search and conversation chips through the existing attachment, link and citation paths. Agents and scheduled tasks use the existing shared services and MCP tools (search_google_files with source: "gmail", read_context_link, and link/watch tools). Existing RPC permissions and environment routing apply to local and remote connections; providers consume the same context snapshots.

When Google reports a missing scope, the error now has its own permission reason and asks the user to reconnect, rather than saying the document cannot be read. A disabled or not-yet-propagated API (SERVICE_DISABLED) shows Google's own explanation. Combined searches and the People directory still fall back silently.

Enable the Gmail API and reconnect existing Google connections to grant gmail.readonly. Drive and Calendar searches remain available without Gmail permission. Attachments stay in Gmail; snapshots contain attachment names. HTML-only messages include bounded HTML source. Hexadecimal Gmail conversation links are supported; opaque browser-only links must be found using search first. Update the user guide and fork differences.

Before After

Validation:

  • 60 focused tests pass across Google API/OAuth, MIME content, contracts, link intake and existing watches.
  • vp run check:changed after rebasing on main: format, both Knip passes, GraphQL generation and typechecking of all 30 affected packages pass. Server, contracts and link tests pass (174 tests).
  • Two failures also occur on main: lint reports no-array-index-key in GoogleFileDetails.tsx (the lines are unchanged here), and CommandPalette.focus.browser.test.tsx fails to import because its useTheme mock lacks getRenderedAppearance.
  • Web verified in an isolated dev server against a real Google account (connected before this change, so without gmail.readonly). The Gmail tab, placeholder and palette actions render. The Gmail tab shows the reconnect message, confirmed against Google's real ACCESS_TOKEN_SCOPE_INSUFFICIENT response. After reconnecting with gmail.readonly, the Gmail tab lists real conversations. The mobile app was not exercised.

Model: gpt-6.1-sol, then Claude Opus 5.5 for verification and the permission fix. Harness: Codex and Claude Code in T3 Code.

🤖 Generated with Claude Code

@adampeterhiggins
adampeterhiggins force-pushed the ah/add-gmail-google-connector branch from ad6307d to b62af78 Compare October 26, 2026 12:08
@adampeterhiggins
adampeterhiggins marked this pull request as ready for review October 26, 2026 12:22
@adampeterhiggins
adampeterhiggins merged commit 39a760c into main Oct 26, 2026
@adampeterhiggins
adampeterhiggins deleted the ah/add-gmail-google-connector branch October 26, 2026 12:22
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