mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.26k stars 2.95k forks source link

Investigate whether we should fire a redux update when tabs become inactive #22520

Open data-sync-user opened 1 month ago

data-sync-user commented 1 month ago

Current situation: When we have inactive tabs enabled in the app, we do not update the UI/fire a redux action while the tab tray is showing when a tab moves from active → inactive. Therefore it’s possible to tap on a tab cell that has gone to inactive while the tab tray is open and cause a crash because of the index not exist anymore.

This crash would be rare in production, but it’s very easy to repro with the debug menu set to inactive tabs timeout 10s.

!Screenshot 2024-10-11 at 11.02.21 AM.png|width=4568,height=2662,alt="Screenshot 2024-10-11 at 11.02.21 AM.png"!

┆Issue is synchronized with this Jira Task

data-sync-user commented 1 month ago

➤ Sophie Amin commented:

Discussed with Orla Mitchell and ih-codes today:

Orla proposed changing the inactive tab timing logic. Currently the tabs transition from active to inactive on a runtime calculation of the tab expiry date, which causes issues when the UI is not updated after a tab has transitioned from active to inactive. To avoid this problem with the active tabs transitioning to inactive before the UI can update, we want to change the functionality so that the active vs inactive tab timing is only evaluated on app launch. This should avoid timing based crashes which will simplify dev and UI QA testing.

Users won’t likely see much a of a change if we do this because the inactive tab timeout is so long, but it will still avoid a crash in production if the user is in the unlikely scenario where the tab tray is up and they go to move or tap on a tab that has now been moved to inactive.

Action Items:

  1. Follow up with Norberto Andres Furlan to see if this is an okay change to make
  2. Make change
  3. Notify QA and QA test teams so they can update their tests and manual testing process
data-sync-user commented 1 month ago

➤ Norberto Andres Furlan commented:

I am ok with doing this change. Can we make it for 133?