Skip to content

fix: recover google enable flow when setup is incomplete - #10

Merged
hhhjin merged 3 commits into
mainfrom
codex/fix-google-enable-reauth
Mar 18, 2026
Merged

hhhjin merged 3 commits into
mainfrom
codex/fix-google-enable-reauth

Conversation

@hhhjin

@hhhjin hhhjin commented Mar 18, 2026

Copy link
Copy Markdown
Member

Summary

  • verify Gmail and Google Calendar enable flows before toggling the connector on
  • fall back into the Google OAuth reconnect flow when stored setup is incomplete instead of silently doing nothing
  • cover both missing-scope upgrades and incomplete-stored-credential recovery in the TUI tests

Testing

  • bun run lint:fix
  • bun test packages/tui/src/app.test.ts

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the robustness of Google service integrations by ensuring that both Gmail and Google Calendar enablement flows are thoroughly verified. It introduces a critical improvement where incomplete Google OAuth setups no longer result in silent failures but instead trigger a guided reconnect process, improving user experience and system reliability. The changes are supported by expanded test coverage for these new recovery and scope upgrade scenarios.

Highlights

  • Google Connector Enablement Flow: Implemented verification steps for Gmail and Google Calendar enablement flows to ensure proper configuration before activating the connectors.
  • Google OAuth Reconnect Logic: Introduced a fallback mechanism to initiate the Google OAuth reconnect flow when the stored Google setup is incomplete, preventing silent failures.
  • Test Coverage Expansion: Added new TUI tests to cover scenarios involving missing-scope upgrades and the recovery of incomplete stored Google credentials.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly implements the recovery flow for Google connectors when the setup is incomplete or scopes are missing. The changes in app.ts handle these cases by triggering a re-authentication flow. The new tests in app.test.ts provide good coverage for these new scenarios. I have one suggestion to improve the maintainability of the ensureGoogleScopesForConnector method by simplifying its signature to reduce redundant parameters.

Comment thread packages/tui/src/app.ts Outdated
@hhhjin
hhhjin merged commit c986862 into main Mar 18, 2026
1 check passed
@hhhjin
hhhjin deleted the codex/fix-google-enable-reauth branch March 18, 2026 06:20
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