Page MenuHomePhabricator

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

Authored by atul on Mar 14 2024, 11:53 AM.
Tags
None
Referenced Files
F3181743: D11333.diff
Fri, Nov 8, 6:46 AM
Unknown Object (File)
Tue, Oct 15, 8:18 PM
Unknown Object (File)
Tue, Oct 15, 8:17 PM
Unknown Object (File)
Tue, Oct 15, 8:17 PM
Unknown Object (File)
Sep 22 2024, 7:07 PM
Unknown Object (File)
Sep 4 2024, 2:26 PM
Unknown Object (File)
Sep 4 2024, 2:26 PM
Unknown Object (File)
Sep 4 2024, 2:26 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

We ended up going with a very different approach from this stack. Abandoning to tidy things up.