mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.2k stars 2.92k forks source link

[Tab tray refactor] [Inactive tabs] - Incorrect behavior when closing the homepage tab after a specific scenario #21859

Open DianaABarladeanu opened 1 month ago

DianaABarladeanu commented 1 month ago

Prerequisites Set inactive tab timeout to 10 sec from secret settings.

Steps to reproduce

  1. Have several inactive tabs
  2. In active tab tray, have at least one random webpage and one homepage as a second active tab.
  3. Close all inactive tabs by tapping on the close all inactive tabs button.
  4. Tap on the "x" button from the homepage tab.
  5. Observe.

Expected behavior The homepage tab is correctly closed.

Actual behavior The other tab closes together with the homepage.

Device & build information

Notes !This issue is reproducible only if homepage is the second active tab.

Attachments:

https://github.com/user-attachments/assets/fc75ba88-8388-4167-81c0-f9b45d229582

┆Issue is synchronized with this Jira Task

data-sync-user commented 1 month ago

➤ Diana Andreea Barladeanu commented:

Verified as fixed on v9000 (45230), with iPhone 15 (17.5).

data-sync-user commented 3 weeks ago

➤ Alina Moldovan commented:

This issue still reproduces using v9000 (45624) using iPhone 14+ (16.0.2) and iPhone 15 (17.5)

data-sync-user commented 3 weeks ago

➤ Alina Moldovan commented:

This issue still reproduces using v9000 (45732) using iPhone 15+ (18.0) iPhone 15 Pro (17.5)

ih-codes commented 3 weeks ago

Next time this issue is tested, can you please share a recording where you open the tab tray again after the 2 tabs appear to close together?

I think maybe you close one tab and the other becomes inactive, so I would like to check. Thanks!

data-sync-user commented 1 week ago

➤ Diana Andreea Barladeanu commented:

Hi ih-codes and Sophie Amin In the initial uploaded video you can see that the tab tray icon shows 1, that means that we only have a single existent tab, the homepage one. But I’ve retested this scenario with v132 (46208) build and indeed sometimes the first tab is moved to the inactive tabs sections.

I’m also noticing a new behavior, once you close the inactive tabs, the first active tabs from tab tray is also closed (maybe it becomes inactive just before closing the other inactive tabs?). Please see the attached video.

!RPReplay_Final1728548620.mp4|width=590,height=1280,alt="RPReplay_Final1728548620.mp4"!

data-sync-user commented 1 week ago

➤ ih-codes commented:

Thank you for attaching the new video Diana Andreea Barladeanu , that’s really helpful!!

Sophie Amin I can’t be 100% sure but I think what is happening is the 10s debug time is moving the previously “active” Google tab to inactive tabs, and it’s being closed with the others. Right now we don’t have any way to refresh the tab tray when this happens (only a Tab knows when it becomes inactive)… In practice it won’t be that often since the timeout is 14 days not 10 seconds from debugging. Anyway, if I’m right though, I’d still expect to see “6” inactive tabs closed, not “5”. So there’s probably still something not quite updated on the redux side when the toast is being shown… 🤔 Just give me a heads up if you want to sync on this later.