Page MenuHomePhabricator

[lib] Update entry reducer so thick entry infos are properly stored
ClosedPublic

Authored by will on Sep 16 2024, 1:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 9:12 AM
Unknown Object (File)
Wed, Oct 23, 9:12 AM
Unknown Object (File)
Fri, Oct 18, 10:23 PM
Unknown Object (File)
Fri, Oct 18, 1:58 PM
Unknown Object (File)
Tue, Oct 15, 1:33 AM
Unknown Object (File)
Oct 8 2024, 3:32 PM
Unknown Object (File)
Oct 1 2024, 2:23 AM
Unknown Object (File)
Sep 28 2024, 2:58 PM
Subscribers
None

Details

Summary

Discovered that thick raw entry infos weren't being stored as thick and this was because the reducer wasn't accounting for their fields. This diff allows thick raw entry infos to be stringified properly

Depends on D13315

Test Plan

Tested later in stack by being able to access thick field from entry info

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Sep 16 2024, 1:32 AM
tomek added inline comments.
lib/reducers/entry-reducer.js
117–137 ↗(On Diff #44192)

Can we merge these two branches? Or is Flow complaining about it?

Additionally, serverID is confusing for thick entries.

This revision is now accepted and ready to land.Sep 16 2024, 3:31 AM
lib/reducers/entry-reducer.js
117–137 ↗(On Diff #44192)

I'm not sure I understand the feedback here... aren't the branches distinct? Curious for more details from Tomek on why he thinks the branches should be merged

lib/reducers/entry-reducer.js
117–137 ↗(On Diff #44192)

We didn't end up addressing this. Created a follow up for further discussion: https://linear.app/comm/issue/ENG-9305/consider-merging-branches-in-logic-for-adding-thick-thread-fields

lib/reducers/entry-reducer.js
117–137 ↗(On Diff #44192)

In the else branch, we're taking properties from rawEntryInfo. Then, in if (rawEntryInfo.thick) we're adding some more properties thick-entry specific. My guess was that we could merge the logic by simply spreading the rawEntryInfo, which should cover both thin and thick entry branches.