fix(patch): cherry-pick 0a7ee67 to release/v0.8.2-pr-10900 to patch version v0.8.2 and create version 0.8.3#10928
Conversation
Summary of ChangesHello @gemini-cli-robot, 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 focuses on enhancing accessibility within the CLI by introducing a dedicated screen reader mode. It includes a new configuration option to activate this mode and provides clear user feedback through a notification when the mode is active, guiding users on how to manage the setting. This change is being delivered as a patch release, Highlights
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 a new screen reader accessibility mode. The changes include updating the documentation and settings schema, and adding a notification in the UI when this mode is active. My review focuses on the implementation of this new notification. I've identified a high-severity issue where the path to the settings file is hardcoded in a UI component, which can lead to incorrect instructions for the user due to the CLI's layered configuration system. I've provided suggestions to remove the hardcoded path and improve the user-facing message to be more accurate and robust.
| import { homedir } from 'node:os'; | ||
| import path from 'node:path'; | ||
|
|
||
| const settingsPath = path.join(homedir(), '.gemini', 'settings.json'); |
There was a problem hiding this comment.
Hardcoding the path to the settings file is brittle. The Gemini CLI supports multiple configuration files with a specific order of precedence (e.g., user, project, system). If the screen reader setting is enabled in a higher-precedence file like a project's .gemini/settings.json, editing the user-level file at the hardcoded path will not disable the feature, leading to user confusion.
This path logic should be removed from the UI component. The path, if needed, should be provided by the application's configuration service.
| <Text> | ||
| You are currently in screen reader-friendly view. To switch out, open{' '} | ||
| {settingsPath} and remove the entry for {'"screenReader"'}. | ||
| </Text> |
There was a problem hiding this comment.
The instruction to the user is ambiguous and relies on a hardcoded path that may be incorrect. The setting is ui.accessibility.screenReader, but the message only refers to "screenReader". Also, it suggests removing the entry, when setting it to false is the correct way to disable it.
A clearer and safer message would be to instruct the user on the setting they need to change, without specifying a file path.
<Text>
You are currently in screen reader-friendly view. To switch out, set `ui.accessibility.screenReader` to `false` in your settings file.
</Text>
|
Size Change: +538 B (0%) Total Size: 17.6 MB ℹ️ View Unchanged
|
This PR automatically cherry-picks commit 0a7ee67 to patch version v0.8.2 in the stable release to create version 0.8.3.