App: LHN does not update properly when calling ReconnectApp
Coming from https://github.com/Expensify/App/issues/33372
Problem
Left hand nav is outdated (in focus mode?) when calling ReconnectApp, which should never happen since after calling ReconnectApp everything should be up to date.
You can see logs from the App here and the call to ReconnectApp here and see that it failed to use the updates and instead called auth’s OpenApp
My very wild guess is that for focus mode, it is never clearing the existing data in onyx, so a chat that was showing (since it was unread) would not get explicitly removed when OpenApp does not send it back.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01ea2b6c10b081507e
- Upwork Job ID: 1742324658321010688
- Last Price Increase: 2024-01-02
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 39 (29 by maintainers)
@sonialiap possibly - but doesn’t seem related to me. That one seems to imply something went wrong with marking chats as read.
Bit of a stretch but I wonder if this is related to this: https://github.com/Expensify/App/issues/34273 (“Message didn’t show up as unread in LHN, but I got the email notification”)
@sakluger looks a bit different than this issue
Can’t say with certainty but it seems like maybe:
No I just did this:
Ok, on a first pass - I cannot reproduce this problem and it does not seem like the current theory is the whole story.
If you look at the code for
ReconnectAppwe do not ever call it with the priority mode.api.php
https://github.com/Expensify/Web-Expensify/blob/bff668e4e707766249cddb1117b0a4caf89e1621/api.php#L3280
AppInit.php (defaults to false)
https://github.com/Expensify/Web-Expensify/blob/7938771c948ff4a3c7e16a101cdbe0a9e00dbf70/lib/AppInit.php#L368
Which means we should be syncing with the full list when GetOnyxUpdates throws the 423 jsonCode.
And when I test locally I see everything sync up fine 🤔
This makes sense to me. An alternative I can think of is to send the reportIDs from the client, like we did with policyIds, but I like that less and I guess it scales worse.