Skip to content

feat(cli): make JetBrains warning more specific#19687

Merged
jacob314 merged 2 commits intomainfrom
terminal_warnings
Feb 20, 2026
Merged

feat(cli): make JetBrains warning more specific#19687
jacob314 merged 2 commits intomainfrom
terminal_warnings

Conversation

@jacob314
Copy link
Contributor

@jacob314 jacob314 commented Feb 20, 2026

Summary

Fixes #19686

@jacob314 jacob314 requested a review from a team as a code owner February 20, 2026 19:25
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Feb 20, 2026

Hi @jacob314, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jacob314, 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 refines the user experience by making terminal compatibility warnings more precise and actionable. Specifically, it targets JetBrains terminal users with a more detailed warning that is conditional on the alternate buffer mode and offers platform-specific external terminal suggestions. This ensures users receive relevant information only when necessary, guiding them towards better compatibility solutions.

Highlights

  • Enhanced JetBrains Terminal Warning: The warning for JetBrains terminals is now more specific, indicating that mouse scrolling issues are primarily related to alternate buffer mode. It also provides platform-specific recommendations for external terminals (e.g., Windows Terminal for Windows, iTerm2/Ghostty for macOS, Ghostty for Linux).
  • Conditional JetBrains Warning Display: The JetBrains terminal warning will now only be displayed if the alternate buffer mode is enabled, preventing unnecessary warnings when the user is not in a context where the issue would occur.
  • Improved Test Readability and Maintainability: Unit tests for compatibility functions (isWindows10, isJetBrainsTerminal, supports256Colors, supportsTrueColor) have been refactored to use it.each for parameterized testing, making them more concise and easier to read.
  • Warning Priority Consistency: The WarningPriority enum is now consistently imported and used in compatibility tests, improving type safety and code clarity.
Changelog
  • packages/cli/src/gemini.tsx
    • Determined the useAlternateBuffer state based on settings and screen reader configuration.
    • Passed the isAlternateBuffer state as an option to getUserStartupWarnings.
  • packages/cli/src/utils/userStartupWarnings.ts
    • Updated getUserStartupWarnings to accept an optional options object containing isAlternateBuffer.
    • Forwarded the isAlternateBuffer option to getCompatibilityWarnings.
  • packages/core/src/utils/compatibility.test.ts
    • Imported WarningPriority enum for consistent usage in tests.
    • Refactored isWindows10, isJetBrainsTerminal, supports256Colors, and supportsTrueColor test suites to use it.each for parameterized testing.
    • Modified the JetBrains warning test to check for conditional display based on isAlternateBuffer and verify platform-specific recommendations.
    • Updated priority assertions to use WarningPriority.High and WarningPriority.Low.
  • packages/core/src/utils/compatibility.ts
    • Removed redundant JSDoc for WarningPriority enum.
    • Modified getCompatibilityWarnings to accept an optional options object with isAlternateBuffer.
    • Made the JetBrains terminal warning conditional on isAlternateBuffer being true.
    • Implemented logic to provide platform-specific external terminal recommendations within the JetBrains warning message (Windows, macOS, Linux).
Activity
  • No human activity has been recorded on this pull request yet.
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 refactors the compatibility warnings, specifically for JetBrains terminals. The warning is now more specific, mentioning mouse scrolling issues, and is only displayed when using the alternate screen buffer. It also provides platform-specific recommendations for external terminals. The changes are well-implemented and propagated correctly through the components. The associated tests have been updated and refactored to use it.each, which improves their clarity and maintainability. I have one suggestion to improve the maintainability of the platform-specific terminal logic.

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

Size Change: +587 B (0%)

Total Size: 25.2 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.2 MB +587 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@jacob314 jacob314 changed the title Make Jetbrains warning more specific Make terminal recommendations platform specific. feat(cli): make JetBrains warning more specific Feb 20, 2026
@gemini-cli gemini-cli bot added the area/core Issues related to User Interface, OS Support, Core Functionality label Feb 20, 2026
Make terminal recommendations platform specific.
Copy link
Contributor

@spencer426 spencer426 left a comment

Choose a reason for hiding this comment

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

LGTM

@jacob314 jacob314 added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 089aec8 Feb 20, 2026
27 checks passed
@jacob314 jacob314 deleted the terminal_warnings branch February 20, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing terminal warnings for JetBrains users

2 participants