Page MenuHomePhabricator

[web/lib] move reading and populating data to state gate
ClosedPublic

Authored by kamil on Nov 22 2023, 6:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 29, 2:08 PM
Unknown Object (File)
Sat, Sep 28, 9:30 PM
Unknown Object (File)
Sat, Sep 28, 9:30 PM
Unknown Object (File)
Sat, Sep 28, 9:30 PM
Unknown Object (File)
Sat, Sep 28, 9:25 PM
Unknown Object (File)
Aug 28 2024, 5:17 AM
Unknown Object (File)
Aug 28 2024, 5:16 AM
Unknown Object (File)
Aug 26 2024, 3:25 PM
Subscribers

Details

Summary

We need to:

  1. See what's in DB before calling callGetInitialReduxState() - based on this we can add params to fetch/skip some store parts.
  2. Wait with rendering app until data from DB is read - similar thing as on native.
  3. Migrate data if needed - we don't have data in redux-persist like on native, if there is no data in DB we need to get it from keyserver and put into DB.

Depends on D9949

Test Plan

Check if app still loads after refresh, and if persistence (drafts) works.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 22 2023, 6:51 AM
tomek added inline comments.
web/redux/initial-state-gate.js
53–58 ↗(On Diff #33485)

Can we await these in parallel?

This revision is now accepted and ready to land.Nov 23 2023, 2:21 AM
web/redux/initial-state-gate.js
53–58 ↗(On Diff #33485)

No because in D9959 callGetInitialReduxState depends on the result of getClientStore - sorry for not commenting on this earlier