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)
Sat, Dec 21, 9:49 AM
Unknown Object (File)
Tue, Dec 17, 4:09 AM
Unknown Object (File)
Tue, Dec 10, 11:45 PM
Unknown Object (File)
Tue, Nov 26, 8:10 PM
Unknown Object (File)
Tue, Nov 26, 7:28 PM
Unknown Object (File)
Tue, Nov 26, 5:23 PM
Unknown Object (File)
Sun, Nov 24, 3:13 PM
Unknown Object (File)
Nov 23 2024, 7:40 AM
Subscribers
None

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

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.