feat: switch default search engine to Brave Search#26356
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Selection Rationale:
Tags NOT selected:
Performance tests NOT selected:
Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
The MetaMask mobile in-app browser currently defaults to Google search, which shows ads that can lead users to fake/scam websites. This PR switches the default search engine to Brave Search, providing a privacy-focused, ad-free search experience that better protects users.
Changes:
DEFAULT_SEARCH_ENGINEconstant from'Google'to'Brave'https://search.brave.com/search?q=) and refactored the if/else chain to a module-scoped lookup map (SEARCH_ENGINE_URLS) for cleaner extensibility and to avoid re-allocation on every call'Brave Search'option to the search engine picker in General SettingsprocessUrlForBrowserdefault parameter to useAppConstants.DEFAULT_SEARCH_ENGINEinstead of hardcoded'Google'SitesSearchFooterto use the sharedSEARCH_ENGINE_URLSmap so the "Search for ... on {engine}" label and URL correctly reflect the selected engine (previously hardcoded to Google/DuckDuckGo only)AppConstants.DEFAULT_SEARCH_ENGINE(Brave) instead of hardcoded GoogleChangelog
CHANGELOG entry: Changed the default search engine to Brave Search for a privacy-focused, ad-free browsing experience
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes core browser URL processing and the default search engine, plus a state migration that mutates persisted user settings; mistakes could send users to wrong destinations or override preferences unexpectedly.
Overview
Switches the in-app browser default search engine from Google to Brave. This updates
AppConstants.DEFAULT_SEARCH_ENGINE, adds Brave to the General Settings search engine picker, and centralizes engine base URLs inSEARCH_ENGINE_URLS.Search URL generation is refactored to use the shared lookup (with fallback to the default) in both
processUrlForBrowserandSitesSearchFooter, and the footer testID/text are renamed from Google-specific to a generictrending-search-footer-search-link.Adds migration
126to move persistedsettings.searchEnginefromGoogletoBravefor existing users, and updates unit/integration/e2e tests and selectors to match the new engine + testIDs.Written by Cursor Bugbot for commit 471a8dd. This will update automatically on new commits. Configure here.