Page MenuHomePhabricator

[web] Persist web sessions
ClosedPublic

Authored by michal on Mar 14 2024, 4:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 1:50 AM
Unknown Object (File)
Tue, Apr 23, 1:49 AM
Unknown Object (File)
Tue, Apr 23, 1:47 AM
Unknown Object (File)
Sat, Apr 6, 7:43 AM
Unknown Object (File)
Fri, Apr 5, 7:32 AM
Unknown Object (File)
Wed, Apr 3, 2:11 AM
Unknown Object (File)
Wed, Apr 3, 2:11 AM
Unknown Object (File)
Wed, Apr 3, 2:11 AM
Subscribers

Details

Summary

Required for ENG-6657 : Migrate session creation code to shared worker

We need to start persisting web sessions. Notification sessions are going to be persisted in indexedDB as they currently are.

Depends on D11299

Test Plan

Create a dummy session during initalization. Reload web page. Check that the session (runtime object) is no longer there. Initialize the crypto account (rehydrate). Check that the session exists.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

web/shared-worker/types/sqlite-query-executor.js
36 ↗(On Diff #38059)

If I understand correctly this needs to be changed to targetDeviceID right? Is there a task for this?

From a quick look the sqlite table column also is named target_user_id so this would probably need a migration. But I don't think we depend on this column name anywhere in code (we just treat the values in the table as pairs).

kamil added inline comments.
web/shared-worker/types/sqlite-query-executor.js
36 ↗(On Diff #38059)

Yes, it should be targetDeviceID - could you create a followup task?

web/shared-worker/worker/worker-crypto.js
7–10 ↗(On Diff #38059)

why this change?

130 ↗(On Diff #38059)

Can this error be less generic?

This revision is now accepted and ready to land.Mar 18 2024, 5:26 AM