Page MenuHomePhabricator

[sqlite] Implement processing thread activity on web worker
ClosedPublic

Authored by will on Tue, Apr 9, 10:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 11:08 AM
Unknown Object (File)
Fri, Apr 26, 9:37 AM
Unknown Object (File)
Mon, Apr 22, 9:29 AM
Unknown Object (File)
Sun, Apr 21, 3:41 AM
Unknown Object (File)
Mon, Apr 15, 7:51 PM
Unknown Object (File)
Sun, Apr 14, 12:03 PM
Unknown Object (File)
Sat, Apr 13, 9:21 AM
Unknown Object (File)
Thu, Apr 11, 12:46 PM
Subscribers

Details

Summary

This code introduces the thread activity store sqlite ops to web worker

Depends on D11614

Test Plan

Ran the following code on web and confirmed the results:

await sharedWorker.schedule({
  type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS,
  storeOperations: {
    threadActivityStoreOperations: [
      {
        type: 'replace_thread_activity_entry',
        payload: {
          id: 'worker_test_A_id',
          threadActivityStoreEntry: JSON.stringify({
            lastNavigatedTo: 1,
            lastPruned: 2,
          }),
        },
      },
      {
        type: 'replace_thread_activity_entry',
        payload: {
          id: 'worker_test_B_id',
          threadActivityStoreEntry: JSON.stringify({
            lastNavigatedTo: 3,
            lastPruned: 4,
          }),
        },
      },
      {
        type: 'remove_thread_activity_entries',
        payload: {
          ids: ['worker_test_B_id'],
        },
      },
    ],
  },
});

Screenshot 2024-04-09 at 4.09.11 PM.png (1×1 px, 263 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable