feat: open url from trending when max tabs are already open#24555
feat: open url from trending when max tabs are already open#24555
Conversation
Update logic for handling new tabs when max tabs are reached. Add tests for this scenario. Co-authored-by: adrien.guguin <adrien.guguin@consensys.net>
|
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 detailsThe changes modify the Browser component's tab management behavior, specifically how new tabs are opened when the maximum tab limit is reached. The key change adds a The changes are:
The This is a medium-risk change because:
|
|



Description
When trying to open a url from trending, if the maximum number of tabs are open, it currently shows a modal.
This change replaces the active tab url with the selected url.
Changelog
CHANGELOG entry: Added replaces active tab if max tabs are open and request comes from trending
Related issues
Fixes: #24386
Manual testing steps
Screenshots/Recordings
Before
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-01-15.at.13.55.57.mp4
After
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-01-15.at.13.54.22.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Implements conditional tab replacement when opening links from Explore/Trending at max tab capacity.
Browser/index.jsnewTab(url, linkType, { replaceActiveIfMax })to replace the active tab instead of opening a new one whentabs.length >= MAX_BROWSER_TABSandreplaceActiveIfMaxis true; otherwise navigates toRoutes.MODAL.MAX_BROWSER_TABS_MODALreplaceActiveIfMaxbased onroute.params?.fromTrendingin the timestamp/deeplink handlercurrentUrl/tabs view state accordinglyBrowser.rendering.test.tsxto verify modal behavior and the new active-tab replacement pathWritten by Cursor Bugbot for commit b7bd473. This will update automatically on new commits. Configure here.