HomePhabricator
Diffusion Comm 3a0792a28867

[web] Restore compaction

Description

[web] Restore compaction

Summary:
Restore compaction on web. Because web keeps redux persist storage in the database, and native doesn't, we must also:

  • save redux persist date before restoration
  • put it back after it's restored

We can do that before applying logs, before we can be sure that they won't touch this table.

Moved a few persist constants to a new file because otherwise webworker imported something that used window, which isn't available there.

Depends on D11042

Test Plan:

  • Add logging to the native client so that it logs backupID and encryption keys for compaction
  • Upload a new compaction from native with a draft
  • Send restore message
  • Reload web app
  • Check that the draft from native exists now on web. Check that the enabled apps are the same as before restore (redux persist didn't change)

Reviewers: marcin, bartek, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

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

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Feb 9 2024, 6:34 AM
Reviewer
kamil
Differential Revision
D11043: [web] Restore compaction
Parents
rCOMM43658727a042: [web] Import backup client
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM3a0792a28867: [web] Restore compaction (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Mar 6 2024, 6:12 AM