feat(voice): add privacy and compliance UX warning for Gemini Live backend#26454
feat(voice): add privacy and compliance UX warning for Gemini Live backend#26454cocosheng-g merged 1 commit 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 enhances the user experience by providing clear privacy and compliance notifications for the Gemini Live voice backend. By integrating a warning message directly into the UI and updating the configuration documentation, the changes ensure that enterprise users are adequately informed about data handling practices when using cloud-based transcription services. 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. Footnotes
|
|
Size Change: +321 B (0%) Total Size: 33.9 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces a privacy warning in the VoiceModelDialog and the settings schema, informing users that voice recordings are sent to Google Cloud when using the Gemini Live backend. It also adds a new test suite for the VoiceModelDialog to verify this behavior. A critical issue was identified where a snapshot file for SettingsDialog was deleted, which will cause CI test failures and needs to be addressed.
84bce1e to
3c90202
Compare
3c90202 to
0735ebf
Compare
0735ebf to
6134229
Compare
There was a problem hiding this comment.
From /review-frontend:
Code Review for PR #26454 (Frontend Focus)
Summary
This PR successfully introduces a conditional privacy warning in the VoiceModelDialog when the Gemini Live API backend is highlighted. The UI implementation and the React state handling for the highlighted item are logically sound and match the existing component patterns.
However, the new unit tests introduced in VoiceModelDialog.test.tsx are failing the CI pipeline because they interact with Ink components (stdin.write) without wrapping the interactions in act(). Additionally, I investigated the automated comment from gemini-code-assist about a 'deleted snapshot' and confirmed it is a false positive—no snapshot files were deleted, and existing snapshot tests pass successfully.
Findings
Critical
-
Test Failures (
VoiceModelDialog.test.tsx): The UI component tests simulate user keystrokes usingstdin.writebut fail to wrap these side-effecting operations inact(). In this repository,vitesttreatsact()warnings as strict errors. To fix the CI tests, you need to importactfromreactand wrap thestdin.writecalls.Example Fix:
import { act } from 'react'; // ... await act(async () => { stdin.write('\u001b[B'); // Arrow Down }); // ... await act(async () => { stdin.write('\r'); // Enter });
Improvements
- PR Description Clarification: The PR description mentions 'Updated
SettingsDialog.test.tsxsnapshots due to the improved setting description.' However,experimental.voice.backendis not actually captured in those snapshots, so no snapshot update was necessary (and none was included in the commit). You might want to remove that line from the PR description to avoid confusion for future maintainers. - Automated Bot Hallucination: You can safely ignore the comment from
gemini-code-assistabout the deleted snapshot file. Verification confirmsSettingsDialog.test.tsxpasses locally without any missing snapshot files.
Conclusion
Request Changes
The frontend feature itself is implemented perfectly, but the missing act() wrappers in the new tests block the build. Once those test interactions are updated to use await act(async () => { ... }), the CI will pass and the PR will be ready to merge.
Summary
This PR adds a privacy and compliance UX warning for the Voice/Gemini Live backend. It ensures that enterprise users are informed when their voice recordings are being sent to Google Cloud for transcription.
Details
WarningMessagein theVoiceModelDialogthat appears when the "Gemini Live API (Cloud)" backend is highlighted or selected.experimental.voice.backendsetting insettingsSchema.tsto include a privacy note.docs/cli/settings.md,docs/reference/configuration.md) and JSON schema (schemas/settings.schema.json) to keep them in sync with the updated description.VoiceModelDialog.test.tsxto verify the conditional display of the warning and the backend selection logic.SettingsDialog.test.tsxsnapshots due to the improved setting description.Related Issues
Fixes #25491
How to Validate
npm test -w @google/gemini-cli -- packages/cli/src/ui/components/VoiceModelDialog.test.tsxCtrl+,) or the voice model dialog (/voice model).Pre-Merge Checklist