Page MenuHomePhabricator

[lib] Remove `LegacyThreadInfo` and `legacyThreadInfoValidator`
ClosedPublic

Authored by atul on Jan 18 2024, 11:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 7:29 PM
Unknown Object (File)
Thu, Nov 7, 4:33 AM
Unknown Object (File)
Mon, Oct 28, 7:39 PM
Unknown Object (File)
Oct 23 2024, 2:41 AM
Unknown Object (File)
Oct 21 2024, 10:36 AM
Unknown Object (File)
Oct 19 2024, 2:55 PM
Unknown Object (File)
Oct 18 2024, 1:37 PM
Unknown Object (File)
Oct 18 2024, 11:26 AM
Subscribers
None

Diff Detail

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

Event Timeline

lib/types/minimally-encoded-thread-permissions-types.js
189
NOTE: It definitely doesn't make sense for ThreadInfo to live in minimally-encoded-permissions-types instead of lib/types-thread-types. I will move these over at the end of the stack.
lib/types/thread-types.js
66

Snuck in removal of this as well. It was unused after removing legacyThreadInfoValidator and it made sense to remove instead of adding to exports imo.

atul requested review of this revision.Jan 18 2024, 12:22 PM
ashoat added inline comments.
lib/permissions/minimally-encoded-thread-permissions-validators.js
15–16

Can you revert import ordering changes before landing?

58

Should this be renamed to threadInfoValidator for consistency with the ThreadInfo type? Or is that done in a later diff?

lib/types/minimally-encoded-thread-permissions-types.js
189

Thanks for noting this

web/types/nav-types.js
49

A bit confused that this wasn't a union before... wouldn't it be causing issues if it only worked with LegacyThreadInfos?

This revision is now accepted and ready to land.Jan 21 2024, 9:39 PM
web/types/nav-types.js
49

Did a little digging and it looks like navInfoValidator is only used as part of initialReduxStateValidator which is only used to validate response from getInitialReduxStateResponder.

pendingThread is set based for the following condition:

44fbca.png (306×1 px, 75 KB)

and it would be set to a ThreadInfo (minimallyEncoded):

461d24.png (346×2 px, 100 KB)

and so in that scenario I do think there would be issues. This is something I should've caught earlier.

atul attached a referenced file: F1092352: 44fbca.png. (Show Details)
atul added inline comments.
lib/permissions/minimally-encoded-thread-permissions-validators.js
58

Handled in later diff.

Double checked that import ordering issues were resolved before landing.

This revision was landed with ongoing or failed builds.Jan 26 2024, 11:13 PM
This revision was automatically updated to reflect the committed changes.