Page MenuHomePhabricator

[lib] Split implementations of `[client/server]ThreadInfoFromRawThreadInfo`
AcceptedPublic

Authored by atul on Mar 14 2024, 11:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 1:59 PM
Unknown Object (File)
Sun, Apr 14, 1:58 PM
Unknown Object (File)
Sun, Apr 14, 1:57 PM
Unknown Object (File)
Sat, Mar 30, 8:43 PM
Unknown Object (File)
Fri, Mar 29, 1:37 AM
Unknown Object (File)
Mar 22 2024, 2:42 AM
Unknown Object (File)
Mar 20 2024, 6:53 PM
Unknown Object (File)
Mar 19 2024, 9:17 PM
Subscribers

Details

Summary

We compute currentUser with CHANGE_ROLE approximation on server (for now), and will computer currentUser using communityThreadInfo on client.

Where are usages of clientThreadInfoFromRawThreadInfo??

Each of the callsites that will need to have serverThreadInfoFromRawThreadInfo -> clientThreadInfoFromRawThread require a good amount of work. I think it makes sense to split implementations of *ThreadInfoFromRawThreadInfo in one diff and handle the callsites separately. Especially because for some callsites we need to recursively update their own callsites.

The callsites that will be updated are:

  • threadInfoSelector
  • createPendingThread

Depends on D11318

Test Plan

Updated callsites to use both server* and client* variants of the function naively and set breakpoint to ensure things worked as expected.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Mar 14 2024, 12:09 PM
tomek added inline comments.
lib/selectors/thread-selectors.js
73

It doesn't sound right to use server function in a client selector. Maybe we can find a better name?

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