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)
Apr 7 2024, 4:13 AM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Mar 5 2024, 6:31 PM
Unknown Object (File)
Feb 8 2024, 11:43 PM
Subscribers
None

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/types/minimally-encoded-thread-permissions-types.js
189 ↗(On Diff #35843)
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 ↗(On Diff #35843)

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 ↗(On Diff #35843)

Can you revert import ordering changes before landing?

58 ↗(On Diff #35843)

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 ↗(On Diff #35843)

Thanks for noting this

web/types/nav-types.js
49 ↗(On Diff #35843)

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 ↗(On Diff #35843)

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 ↗(On Diff #35843)

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.