Page MenuHomePhabricator

[web] Start persisting keyserverStore
ClosedPublic

Authored by inka on Sep 1 2023, 5:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 3, 3:05 PM
Unknown Object (File)
Thu, Jun 27, 12:19 PM
Unknown Object (File)
Tue, Jun 25, 5:49 PM
Unknown Object (File)
Fri, Jun 21, 3:57 PM
Unknown Object (File)
Wed, Jun 19, 5:44 PM
Unknown Object (File)
Tue, Jun 18, 9:15 PM
Unknown Object (File)
Fri, Jun 14, 12:09 AM
Unknown Object (File)
Wed, Jun 12, 6:34 PM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-4794/start-persisting-the-keyserverstore
We want to persist the keyserverStore on web, apart from connection and updatesCurrentAsOf fields. updatesCurrentAsOf doesn't have a straightforward defult value - the keyserver returns
the current time or 0 depending on whether the user has accepted the policies. That's why we are using value passed from the keyserver, stored in preloadedState.

Test Plan

Checked that keyserverStore is persisted - logged the action.payload of rehydrateActionType in redux-setpu.js. Checked that the connceciotn and updatesCurrentAsOf are set to the
values defined in out function of the Transform object. Chekced that is the user has to accept the policies, the value set to updatesCurrentAsOf is 0, and the current time otherwise.
Checked that the application gets populated with data when the user accpest the policies (it doen't happen if the value of updatesCurrentAsOf is set to the current time right away).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Sep 1 2023, 5:52 AM

LGTM

web/redux/persist.js
105 ↗(On Diff #30696)

Are we meant to stop persisting lastCommunicatedPlatformDetails in this diff?

kamil requested changes to this revision.Sep 4 2023, 3:56 AM

LGTM, requesting changes to address https://phab.comm.dev/D9062#inline-57824

web/redux/persist.js
21–22 ↗(On Diff #30696)

can be merged

This revision now requires changes to proceed.Sep 4 2023, 3:56 AM
michal requested changes to this revision.Sep 4 2023, 4:10 AM
michal added inline comments.
web/redux/persist.js
142–145 ↗(On Diff #30696)

Actually I don't think we want to persist the sessionID. Each time we reload a web page we want a new sessionID, so persisting it doesn't make sense

This revision is now accepted and ready to land.Sep 5 2023, 5:49 AM
This revision was automatically updated to reflect the committed changes.