-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LHN Mismatch] Move client-only keys from report_ to reportMetadata_ #51867
Comments
Current assignee @puneetlath is eligible for the NewFeature assigner, not assigning anyone new. |
|
Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify ( |
I'll be taking this part since it requires looking at the back-end also. |
Hey, Tomasz from Callstack here, I can help with this issue |
@TMisiukiewicz I need to confirm the full list that we're working with. To start, can you look into:
|
@puneetlath I checked this list and seems like majority of these properties are generated in the runtime and describe the options for LHN, not reports directly. Seems like they are not stored in Onyx at all, might the So, I'd say both properties are replaceable by referring to |
Oh wow, ok that's great to know.
This makes sense to me. Want to do this as a first step? Basically, raise a PR to update the type with only the things that are actually used by the client. Also, if the back-end attempts to merge something into Onyx that isn't in the type, do we log that? |
yeah sure, I'll start exploring it tomorrow 👍 |
So i verified all the properties and looks like there is 15 of them that should be possible to remove:
I’ll remove each unused property along with its references, one at a time, committing after each change to ensure stability. |
Nice! Sounds good. Perhaps we should break it up into a few different PRs so that it's easier to revert if one of them causes a problem, without needing to revert it all. |
Sure, i'll start with a PR with those that are not used anywhere as it's the easiest one |
Opened first PR #52182, now I'll move to work on the properties that have some references in the codebase but do not seem to be a part of |
Opened another PR to remove |
Opened last PR with unused properties. The two remaining on the list are:
Is it possible that |
Ah interesting. Let me see if I can find any place where they get set from the back-end. |
I don't see Also, @TMisiukiewicz do we log if someone tries to set an Onyx field that isn't part of the report Onyx type? And if not, could we? |
@TMisiukiewicz |
@shubham1206agra yeah they are used to calulate the display name for LHN, but they are not stored in Onyx |
I think we have only static checks (Typescript). Do you have anything particular in your mind? If yes, how do you think it should work? |
Hey |
Opened #52395. I removed |
We are going to be changing the behavior of OpenApp/ReconnectApp when it does a full reconnect to replace the full reports list that the client has stored instead of merging with it. This means that any client-only data that we have about reports can potentially get wiped when the back-end reconnects.
We already have a reportMetadata_ object in Onyx that is meant to store such data. Let's move any keys that are currently client-only that are stored in the report_ object to the reportMetadata_ object. These are some likely keys that we will need to migrate:
To do this we will need to:
a. Updating any code that sets the data to set it in reportMetadata_ instead
b. Updating any code that gets the data to get it from reportMetadata_ instead
c. Create migration to migrate any existing data in these keys from report_ to reportMetadata_
Issue Owner
Current Issue Owner: @puneetlathThe text was updated successfully, but these errors were encountered: