Closed Bug 1967708 Opened 9 months ago Closed 9 months ago

Private tabs thumbnails are visible when opening a bookmark/history/search group item in a private tab

Categories

(Firefox for Android :: Privacy, defect)

Firefox 140
All
Android
defect

Tracking

()

VERIFIED FIXED
141 Branch
Tracking Status
firefox138 --- unaffected
firefox139 --- unaffected
firefox140 + verified
firefox141 --- verified

People

(Reporter: vtamas, Assigned: mavduevskiy)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group2])

Attachments

(5 files, 6 obsolete files)

6.70 MB, video/mp4
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
5.82 MB, video/mp4
Details

Lock tabs

Steps to reproduce

  1. Open at least one private tab.
  2. Switch to non-private mode.
  3. Minimize and restore the app.
  4. a) Go to Settings -> Bookmarks, tap o 3 dots menu displayed on the right side of a bookmarks and select "Open in private tab";
    b) Go to Settings -> History, select multiple items, tap on the 3 dot menu and select "Open in private tab";
    c) Go to Homepage -> Recently visited, tap on a search group, select an item, tap on the 3 dot menu and select "Open in private tab".

Expected behavior

The biometric authentication is requested before displaying the tabs thumbnails in private tabs tray.

Actual behavior

The new opened tab is displayed in the private tabs tray, also revealing the other private tabs thumbnails already opened. The authentication is requested only when selecting a private tab from tabs tray.

Device information

  • Firefox version: Firefox for Android Nightly 140 (2025-05-20)
  • Android device model: Samsung S24 Ultra (Android 14), Google Pixel 8 (Android 15)
Whiteboard: [fxdroid][group2]
Assignee: nobody → rebecatudor273
Assignee: rebecatudor273 → mavduevskiy

We need to use exactly the same logic on history and bookmarks fragments before opening tabstray, refactoring to avoid code duplication.

Bookmarks part requires more time, there is more architecture there; probably, have to add a new action, something like "onVerified", to wire up MiddleWare and a Fragment. Otherwise, if the vefification goes through a pin, there is no way to continue same midleware action chain.

This is a concept to get feedback from people who worked on the recent bookmarks refactoring.

Blocks: 1970257

synced with :matt-tighe today about it, discussing ways to improve it. opened up a followup for it

based on feedback for D252266, exploring an option to reuse UnlockPrivateTabsFragment in a headless state, to be used by History/Bookmarks fragment and listening to appstate for result.

Blocks: 1970719
No longer blocks: 1970719
Attachment #9491886 - Attachment description: WIP: Bug 1967708 - Part 1: Make PBM lock verification logic reusable and available outside of tabstray → Bug 1967708 - Part 1: Make PBM lock verification logic reusable and available outside of tabstray
Attachment #9491965 - Attachment description: WIP: Bug 1967708 - Part 2: Require auth for private tabs on history screen → Bug 1967708 - Part 2: Require auth for private tabs on history screen
Attachment #9492293 - Attachment description: WIP: Bug 1967708 - Part 3: Require auth for private tabs on bookmarks screen → Bug 1967708 - Part 3: Require auth for private tabs on bookmarks screen
Pushed by mavduevskiy@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/21e5826341c3 https://hg.mozilla.org/integration/autoland/rev/e99a039a6853 Part 1: Make PBM lock verification logic reusable and available outside of tabstray r=android-reviewers,twhite,gmalekpour https://github.com/mozilla-firefox/firefox/commit/baeffff90ff9 https://hg.mozilla.org/integration/autoland/rev/184e3b83f557 Part 2: Require auth for private tabs on history screen r=android-reviewers,twhite,gmalekpour https://github.com/mozilla-firefox/firefox/commit/aea917d972d0 https://hg.mozilla.org/integration/autoland/rev/1ff38bc5a9fb Part 3: Require auth for private tabs on bookmarks screen r=android-reviewers,gmalekpour,matt-tighe
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/437ac6d21915 https://hg.mozilla.org/integration/autoland/rev/dcea5a30dd46 Revert "Bug 1967708 - Part 3: Require auth for private tabs on bookmarks screen r=android-reviewers,gmalekpour,matt-tighe" for causing Fenix failures.

That's a suspicious failure, the code area isn't related and wasn't modified, the same job did pass mach try and it passes locally. Rebasing and trying again.

Flags: needinfo?(mavduevskiy)

found the issue, a test missing a 'isPrivateScreenLocked' mock. relaunching tests to check that it's gone and landing it

interesting detail, the test would only fail if all tests were launched. the test individually, as a class and even as a suite did work correctly. but after adding a, seemingly unrelated, mock, but now './gradlew :app:testDebugUnitTest' passes locally.

Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/17926335c037 https://hg.mozilla.org/integration/autoland/rev/a1e3aa558021 Part 1: Make PBM lock verification logic reusable and available outside of tabstray r=android-reviewers,twhite,gmalekpour https://github.com/mozilla-firefox/firefox/commit/d1313798e771 https://hg.mozilla.org/integration/autoland/rev/23c2188ecc87 Part 2: Require auth for private tabs on history screen r=android-reviewers,twhite,gmalekpour https://github.com/mozilla-firefox/firefox/commit/cc26c90dcb9a https://hg.mozilla.org/integration/autoland/rev/46aed06c9fdd Part 3: Require auth for private tabs on bookmarks screen r=android-reviewers,gmalekpour,matt-tighe
Flags: qe-verify+

We need to use exactly the same logic on history and bookmarks fragments before opening tabstray, refactoring to avoid code duplication.

Original Revision: https://phabricator.services.mozilla.com/D251978

Attachment #9493629 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Private tabs thumbnails would be visible when opening a bookmark/history/search group item in a private tab even though user has locked private tabs.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Listed in ticket 1967708
  • Risk associated with taking this patch: Low
  • Explanation of risk level: In this patch we are only refactoring existing logic that is specific to private browsing
  • String changes made/needed: N/A
  • Is Android affected?: yes

We need to use exactly the same logic on history and bookmarks fragments before opening tabstray, refactoring to avoid code duplication.

Original Revision: https://phabricator.services.mozilla.com/D251978

Attachment #9493630 - Flags: approval-mozilla-beta?
Attachment #9493631 - Flags: approval-mozilla-beta?
Attachment #9493632 - Flags: approval-mozilla-beta?

We need to use exactly the same logic on history and bookmarks fragments before opening tabstray, refactoring to avoid code duplication.

Original Revision: https://phabricator.services.mozilla.com/D251978

Attachment #9493633 - Flags: approval-mozilla-beta?
Attachment #9493634 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Private tabs thumbnails would be visible when opening a bookmark/history/search group item in a private tab even though user has locked private tabs.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Listed in ticket 1967708
  • Risk associated with taking this patch: Low
  • Explanation of risk level: This doesn't change the existing behavior for history fragment unless user has enabled locking private tabs. If that's the case then user needs to authenticate first before viewing private tabs from the history fragment
  • String changes made/needed: n/a
  • Is Android affected?: yes

firefox-beta Uplift Approval Request

  • User impact if declined: Private tabs thumbnails would be visible when opening a bookmark/history/search group item in a private tab even though user has locked private tabs.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Listed in ticket 1967708
  • Risk associated with taking this patch: Moderate
  • Explanation of risk level: We now require authentication to access bookmarks and open them in private tabs if user has enabled locking private tabs. This is moderate in risk because it's changing code in bookmarks but we have included tests to ensure everything works as intended and looped in engineers from the squad that works on bookmarks to ensure the changes do not introduce any regressions.
  • String changes made/needed: n/a
  • Is Android affected?: yes
Attachment #9493629 - Attachment is obsolete: true
Attachment #9493629 - Flags: approval-mozilla-beta?
Attachment #9493634 - Attachment is obsolete: true
Attachment #9493634 - Flags: approval-mozilla-beta?
Attachment #9493633 - Attachment is obsolete: true
Attachment #9493633 - Flags: approval-mozilla-beta?
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Attachment #9493630 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9493631 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9493632 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9493632 - Flags: approval-mozilla-beta+ → approval-mozilla-beta?
Attachment #9493632 - Attachment is obsolete: true
Attachment #9493632 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9493631 - Attachment is obsolete: true
Attachment #9493631 - Flags: approval-mozilla-beta+ → approval-mozilla-beta-
Attachment #9493630 - Attachment is obsolete: true
Attachment #9493630 - Flags: approval-mozilla-beta+ → approval-mozilla-beta-
Attachment #9491886 - Flags: approval-mozilla-beta+
Attachment #9491965 - Flags: approval-mozilla-beta+
Attachment #9492293 - Flags: approval-mozilla-beta+
See Also: → 1971723
Attached video Bookmarks:History.mp4

This issue is verified as fixed for bookmarks and history but it still reproduces for search groups - issue tracked in a separate bug 1971723. The testing was performed on Firefox for Android Nightly 141 (2025-06-11) and Firefox 140 beta 8 on Samsung S24 Ultra (Android 15), Google Pixel 8 (Android 15), Poco M4 Pro (Android 12).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1973834
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: