[HNT] When user chooses homepage as opening screen and on cold start, navigating to any URL replaces last accessed tab
Categories
(Firefox for Android :: Homepage, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: npoon, Assigned: npoon)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Whiteboard: [fxdroid] [group5])
Attachments
(3 files, 1 external file)
Precondition
- Have homepage as new tab enabled
- Set opening screen to homepage (under homepage settings)
Steps to reproduce
- Open a tab and go to a url. Ex: https://www.google.com/
- Kill the app and then reopen it
- Click on the homepage toolbar
- Type in the any url and press enter
Expected behavior
Open a new tab that goes to the same url
Actual behavior
When opening a fresh fenix instance, the user lands on the homepage (and it doesn't count as a tab). When the user navigates, they are directed to the same opened tab, which is now replaced by the second url, instead of opening a new tab with the second url
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Comment 2•2 months ago
|
||
| frontend-triage | ||
With HNT enabled, BrowserToolbarSearchMiddleware.kt hardcodes newTab = false on URL commit, as does FenixSearchMiddleware.kt for awesomebar suggestions, so FenixBrowserUseCases.kt takes the loadUrlUseCase branch and navigates whichever tab is selected. That assumes the homepage on screen is always backed by a selected about:home tab, which is false on a cold start with "open on homepage": HomeActivity.kt only skips navigateToBrowserOnColdStart() and leaves the restored tab selected, while HomepageTabBinding.kt adds a homepage tab only when the current mode has zero tabs. Any URL typed from that screen therefore loads into the restored tab, which reads as "switched to the existing tab" when the typed URL happens to match it.
Fix: In HomeActivity.onCreate, when shouldStartOnHome() and enableHomepageAsNewTab are both true, select or add a homepage tab so the selected tab matches what is displayed, and derive newTab in both search middlewares from whether the selected tab is a homepage tab (isHomepageTab, BrowserState.kt, currently private) rather than hardcoding false.
Suggested severity: S3. A URL entered from the homepage after a cold start replaces the user's restored tab instead of opening a new one, though opening a tab explicitly from the tab manager first works around it and the feature is still Nimbus-gated to nightly.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.
Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 3•2 months ago
|
||
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 6•2 months ago
|
||
Hey QA,
Can we also confirm that the behaviour for homepage as new tab off hasn't changed? Thanks
Comment 7•2 months ago
|
||
Verified as fixed on Nightly 159.0a1 with Samsung S23 Ultra(Android 14) and Pixel 3 XL (Android 9). Also the behaviuor of HNT off is not changed.
Updated•2 months ago
|
Description
•