HomePhabricator
Diffusion Comm 493a05d77625

[lib] Replace merging entries with an ops approach

Description

[lib] Replace merging entries with an ops approach

Summary:
Merging the entries now returns the ops which are later processed

Depends on D12156

https://linear.app/comm/issue/ENG-3486/move-entrystore-to-sqlite

Test Plan:
Be on the latest diff if this stack to ensure there is no mechanism from the keyserver that would aid entry persistence. After testing each actions kill the app and reopen it to ensure that changes are correctly persisted.

  1. To test fetchEntriesActionTypes.success: click history on a day in calendar on Web
  2. To test updateCalendarQueryActionTypes.success: create entry on web in a distant month in the past and then scrolling calendar in native to that date. Ensure that new entry appeared in the DB after scrolling close to the date.
  3. To test saveEntryActionTypes.success: edit and save entry on web.
  4. To test deleteEntryActionTypes: delete entry and check in SQLite that deleted property is marked as true and entry is not visible across app restarts.
  5. To test restoreEntryActionTypes.success: Delete and restore on web. Reopen the app between steps, and ensure that changes are persisted.
  6. To test legacyLogInActionTypes.success, legacySiweAuthActionTypes.success, keyserverAuthActionTypes.success: log in and log out and seeing that entries are in db after logging in back.
  7. To test incrementalStateSyncActionType: background mobile app, do something in calendar on web and foreground the app again.
  8. To test processUpdatesActionType, joinThreadActionTypes.success, newThreadActionTypes.success: modify entry on web and see immediate update (UI and DB) on native.
  9. To test fullStateSyncActionType by a hack: Go to socket.js  in keyserver, change condition in line 515 to be true, kill the native app, modify calendar on web an open the native app.
  10. To test processServerRequestsActionType: This actions is dispatched a short while after creating entry when it transitions from local to remote.

Reviewers: kamil, marcin

Reviewed By: marcin

Subscribers: ashoat

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

Details

Provenance
tomekAuthored on May 21 2024, 12:23 PM
Reviewer
marcin
Differential Revision
D12162: [lib] Replace merging entries with an ops approach
Parents
rCOMMd5051a94745d: [lib] Update delete keyserver, delete thread, leave thread and set new session…
Branches
Unknown
Tags
Unknown