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, Nov 6, 7:08 AM
Unknown Object (File)
Thu, Oct 17, 12:07 PM
Unknown Object (File)
Thu, Oct 17, 12:07 PM
Unknown Object (File)
Thu, Oct 17, 12:07 PM
Unknown Object (File)
Thu, Oct 17, 12:07 PM
Unknown Object (File)
Thu, Oct 17, 12:05 PM
Unknown Object (File)
Oct 4 2024, 5:30 PM
Unknown Object (File)
Oct 4 2024, 5:25 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
No Lint Coverage
Unit
No Test Coverage

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.