Skip to content

Conversation

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Oct 23, 2025

Additional details

We kept encountering this address save popup in Chrome when preparing for the CyConf demo. This add Chrome default preferences that include disabling the address and credit card save popups.

  • Additionally, I walked through every flag outlined in this spreadsheet and added what may be relevant for us to pass by default.
  • I also walked through EVERY Chrome preference available to see if any others may be relevant for automation and added ones that seemed relevant.

Steps to test

How has the user experience changed?

Before

image

After

No popup!

PR Tasks


Note

Disables Chrome autofill popups by introducing default Chrome preferences, merges/writes them before launch, expands default Chromium flags, and adds comprehensive unit tests.

  • Browser launch (Chrome):
    • Add '_getDefaultChromePreferences' and '_getChromePreferencesWithDefaults'; merge defaults with on-disk/user prefs via '_mergeChromePreferences' and write final prefs before launch ('_writeChromePreferences').
    • Defaults disable address/credit-card save popups and suppress security/promotions warnings; add debug logs and export new helpers.
  • Chromium flags:
    • Expand disabled features and default flags (e.g., GlobalMediaControls, MediaRouter, OptimizationHints, InterestFeedContentSuggestions, LensOverlay, disable-domain-reliability, disable-field-trial-config).
  • Tests:
    • Add unit tests covering default prefs generation, merging, writing behavior, IGNORE_CHROME_PREFERENCES, and launch integration; update stubs/protocol usage.
  • Changelog:
    • Note autofill popup suppression and added Chrome flags/preferences under Bugfixes.

Written by Cursor Bugbot for commit 4bec6a5. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@cypress
Copy link

cypress bot commented Oct 23, 2025

cypress    Run #66863

Run Properties:  status check passed Passed #66863  •  git commit 4bec6a5417: Update cli/CHANGELOG.md
Project cypress
Branch Review new-chrome-flags-prefs
Run status status check passed Passed #66863
Run duration 20m 13s
Commit git commit 4bec6a5417: Update cli/CHANGELOG.md
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 12
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26755
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.48%
  Untested elements 188  
  Tested elements 161  
Accessibility  97.98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@jennifer-shehane jennifer-shehane self-assigned this Oct 23, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@@ -1,12 +1,34 @@
const disabledFeatures = [
Copy link
Member Author

Choose a reason for hiding this comment

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

Some of this was just alphabetizing and also adding new flags

}

// Reads raw preferences from disk and merges them with defaults
const _getChromePreferencesWithDefaults = (userDir: string): Bluebird<ChromePreferences> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

are we able to make this function async and just await? Really not an immediate concern but this file will need to be refactored likely in the near future

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed here: f2ce594

// Get the default preferences that should be written
const defaultChromePrefs = chrome._getDefaultChromePreferences()

expect(chrome._writeChromePreferences('/foo', originalPrefs, defaultChromePrefs)).to.eventually.equal()
Copy link
Contributor

Choose a reason for hiding this comment

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

is there supposed to be a value in to.eventually.equal()?

Copy link
Contributor

Choose a reason for hiding this comment

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

might be cleaner to await the output then assert on the prefs

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed here: f2ce594

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Incomplete Test Setup Causes Failures

The test setup is incomplete. The beforeEach function stubs utils.getPort() to return 50505, but in the actual test file at line 13, protocol is imported and line 1303 stubs protocol.getRemoteDebuggingPort(). However, the original beforeEach at lines 42-75 does not stub protocol.getRemoteDebuggingPort(), it only stubs utils.getPort(). This means the existing tests in the #open context would fail because protocol.getRemoteDebuggingPort() is called in the actual implementation (chrome.ts line 582) but is not stubbed in the original beforeEach. The new integration tests at line 1303 correctly stub it, but the existing tests don't have this stub and would fail.

packages/server/test/unit/browsers/chrome_spec.js#L68-L80

this.onCriEvent = (event, data, options) => {
this.pageCriClient.on.withArgs(event).yieldsAsync(data)
return chrome.open({ isHeadless: true }, 'http://', { ...openOpts, ...options }, this.automation)
.then(() => {
this.pageCriClient.on = undefined
})
}
sinon.stub(chrome, '_writeExtension').resolves('/path/to/ext')
sinon.stub(BrowserCriClient, 'create').resolves(this.browserCriClient)
sinon.stub(plugins, 'execute').callThrough()

Fix in Cursor Fix in Web


@jennifer-shehane jennifer-shehane merged commit 367abb5 into develop Oct 28, 2025
90 of 92 checks passed
@jennifer-shehane jennifer-shehane deleted the new-chrome-flags-prefs branch October 28, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable the "save address" popup in Chrome

2 participants