Skip to content

Conversation

@ptone
Copy link
Collaborator

@ptone ptone commented Nov 19, 2025

Summary

If the user is authenticated with Google login, the /about box now displays the email of the logged in user
Screenshot 2025-11-19 at 3 36 15 PM

Details

  1. packages/core/src/index.ts: Exported UserAccountManager so it can be used by the CLI.
  2. packages/cli/src/ui/types.ts: Updated HistoryItemAbout and Message types to include the optional userEmail field.
  3. packages/cli/src/ui/commands/aboutCommand.ts: Modified the about command to instantiate UserAccountManager, retrieve the cached user email, and include it
    in the aboutItem.
  4. packages/cli/src/ui/components/AboutBox.tsx: Updated the AboutBox component to conditionally render the "User Email" row if an email address is present.
  5. packages/cli/src/ui/commands/aboutCommand.test.ts: Updated unit tests to mock UserAccountManager and verify that the user email is correctly passed to the
    UI.

Related Issues

fixes #13458

How to Validate

login with different auth methods and ensure email is shown when, and only when logged in via oauth

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@ptone ptone requested a review from a team as a code owner November 19, 2025 23:45
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ptone, 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 introduces a new feature to display the authenticated user's email address within the /about box, specifically for users logged in with Google. The changes involve integrating user account management logic into the CLI's about command, updating UI data structures to support the new email field, and modifying the AboutBox component to render this information conditionally. This enhancement provides users with immediate access to their authenticated email directly within the application's information display.

Highlights

  • User Email Display: The /about box now displays the email address of the logged-in user when authenticated via Google login, enhancing user information visibility.
  • User Account Management Export: The UserAccountManager class has been exported from @google/gemini-cli-core, making it accessible for use by the CLI.
  • UI Type Updates: The HistoryItemAbout and Message types in the CLI's UI have been updated to include an optional userEmail field, accommodating the new display feature.
  • About Command Logic: The aboutCommand now instantiates UserAccountManager to retrieve the cached user email and passes it to the UI components.
  • About Box Component Enhancement: The AboutBox React component has been modified to conditionally render the 'User Email' row only when an email address is available.
  • Unit Test Coverage: Unit tests for the aboutCommand have been updated to mock UserAccountManager and verify that the user email is correctly passed and handled.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link
Contributor

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

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 adds the user's email to the about box when they are authenticated via Google login. The changes are well-structured, touching the necessary files from the core package to the UI components. My review focuses on improving the test coverage for this new feature. I've provided a suggestion to make the mock for UserAccountManager more flexible, which will enable testing the scenario where a user is not logged in and no email should be displayed. This will help ensure the feature is robust and behaves as expected in all cases.

@cornmander cornmander added this pull request to the merge queue Nov 20, 2025
Merged via the queue into google-gemini:main with commit 43d6dc3 Nov 20, 2025
21 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.

Show logged in user in /about

2 participants