Feat/browser privacy consent#21119
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 enhances the privacy features of the Browser Agent. It introduces a mandatory, interactive consent mechanism for first-time users, ensuring they are informed about data collection and browser content exposure to the AI model. Furthermore, it integrates user configuration preferences to control the passing of privacy-related flags to the underlying browser automation tool, thereby respecting user choices regarding usage statistics and performance tracking. 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
|
|
Hi @gsquared94, I have added a screencast in the PR description as POC, please review this once and let me know if any changes are required |
- Fix missing closing brace for usageStatisticsEnabled check in browserManager.ts - Fix missing closing braces for browserConsent mock in browserManager.test.ts
Head branch was pushed to by a user without write access
|
@gsquared94 I have made the appropriate changes. Can you please re-run the checks again |
Summary
This PR implements privacy enhancements for the Browser Agent, adding a first-run privacy disclosure and ensuring data collection flags are passed according to user preferences.
Details
Privacy Flags
Opts out of usage statistics and performance tracking in
chrome-devtools-mcpif the user has disabled usage statistics.Interactive Consent
A new utility prompts users with a privacy notice on their first browser agent invocation.
Persistent Choice
User acknowledgement is stored locally to avoid re-prompting.
Related Issues
Fixes #21101
How to Validate
** 1. Clear Existing Consent**
Delete the browser consent acknowledgment file from your local profile directory to trigger the first-run experience.
2. Test Interactive Notice
Run a browser agent command:
npm run start -- --agent browser "open google.com"Verify the privacy notice appears.
Type n and press enter; verify the agent aborts.
Run again, type y and press enter; verify the agent proceeds.
3. Verify Privacy Flags
Disable statistics in your config:
Run with debug logging and verify --no-usage-statistics and --no-performance-crux appear in the launch arguments:
GEMINI_DEBUG=core npm run start -- --agent browser "open google.com"Search the output for Launching chrome-devtools-mcp and verify --no-usage-statistics and --no-performance-crux are present in the arguments.
4. Automated Tests
Attaching screencast for POC:
Screen.Recording.2026-03-08.at.6.28.02.AM.mov
Pre-Merge Checklist