HomePhabricator
Diffusion Comm 4817b7a5eb07

[lib] Introduce fetchPendingUpdates action

Description

[lib] Introduce fetchPendingUpdates action

Summary:
Most of the work here was in the reducers. Flow had very peculiar behavior, where it sometimes struggled to narrow types correctly. Where possible I avoided needed to factor things out by adding the new action types to the same top-level conditionals. If that wasn't possible, I would either factor out the logic into a function (if sufficiently complex) or copy-paste if it was really simple. When factoring out into a function, I sometimes opted for simpler parameters that would require a bit more copy-paste at the callsite.

Depends on D12365

Test Plan:
In combination with later diffs, I tested as follows:

  1. I created a socket crash loop on a physical iOS device using @inka's create-many-threads-to-trigger-crash-loop.js script (see ENG-8090
  2. I confirmed that the socket was unable to connect prior to my diff stack
  3. I confirmed that after applying my diff stack, the SUCCESS action was dispatched, and the socket was able to connect afterwards

Reviewers: tomek

Reviewed By: tomek

Subscribers: inka

Differential Revision: https://phab.comm.dev/D12366

Details

Provenance
ashoatAuthored on Jun 7 2024, 8:23 AM
Reviewer
tomek
Differential Revision
D12366: [lib] Introduce fetchPendingUpdates action
Parents
rCOMM60bbd89f4882: [lib] Simplify param to generateOpsForThreadUpdates
Branches
Unknown
Tags
Unknown