fix(core): add actionable warnings for terminal fallbacks (#14426)#22211
fix(core): add actionable warnings for terminal fallbacks (#14426)#22211spencer426 merged 9 commits intomainfrom
Conversation
Summary of ChangesHello, 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 significantly improves the CLI's terminal compatibility by shifting from forceful feature restrictions to providing informative and actionable warnings. It introduces robust detection for various terminal environments like tmux, GNU screen, and basic terminals, offering users clear guidance and configuration tips to optimize their experience. This change ensures better usability and preserves power-user configurations across diverse terminal setups. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces valuable, actionable warnings for various terminal environments, which will significantly improve the user experience for those on non-standard terminals. The new compatibility checks for tmux, GNU screen, and dumb terminals are well-implemented.
I've identified a minor bug in the warning message for "dumb" terminals where the TERM value is hardcoded, leading to incorrect output. I've also suggested an improvement to the corresponding test to make it more robust and prevent similar issues in the future. Once these points are addressed, this will be a great addition.
|
Size Change: +1.88 kB (+0.01%) Total Size: 26.2 MB
ℹ️ View Unchanged
|
cc2d7c8 to
bbdb0c5
Compare
Adds detection for tmux, GNU screen, JetBrains IDEs, and dumb terminals. Provides actionable warnings without artificially restricting features like alternate screen buffer or truecolor overrides.
bbdb0c5 to
165b32d
Compare
Summary
This PR introduces actionable terminal compatibility warnings for problematic environments such as
tmux, GNUscreen, JetBrains IDE terminals, and "dumb" terminal setups. Instead of forcefully restricting functionality (like disabling alternate screen buffers), it preserves power-user configurations while alerting the user to potential issues and providing specific configuration fixes.Details
isTmux,isGnuScreen,isDumbTerminal,isJetBrainsTerminal, andisLowColorTmux) topackages/core/src/utils/compatibility.ts.getCompatibilityWarningsto natively surface warnings based on these precise terminal detections.getTerminalNameFromEnv) and their associated tests.JETBRAINS_IDEinisJetBrainsTerminaldetection.compatibility.test.ts, ensuring robust tests that isolate environment variables to prevent leakage across the test suite.Related Issues
Fixes #14426
How to Validate
tmuxsession withTERM=screen.set -g default-terminal "tmux-256color".TERM=dumb.npm run preflight.Pre-Merge Checklist