Closed ajsarkar28 closed 5 months ago
Most of the work for this has been completed in the linked branch. The remainder of the work (refreshing the appointments and unread messages count) can't be finished until the React Query migration for those features are merged into develop.
Since it seems unlikely that the React Query secure messaging migration will be merged any time soon, I went ahead and implemented the refresh logic for secure messages in Redux. I didn't do the same for appointments because the appointments React Query migration PR will likely be merged soon, and we'd need to update it to use the new React Query implementation anyway
Actions, in-app:
Outside of app actions (after logging into app/during the 'not refreshed' 5 minute window):
Cases considered, but not tested after I learned about the mobile backend cache:
This is impacted by #8056 (which was not fixed with the SM RQ migration, unfortunately). Pinging a few folks to figure out who would fix/when it might get fixed.
The "thread-related" message tests above all therefore fail.
We currently don't reset the refresh timer at logout.
So - log in as veteran A. Log out. Log in as veteran B and see veteran A's home screen activity.
Sending back for changes.
@TKDickson I fixed the issue where the cache wasn't being reset on logout. Should be good now to take another look
We cache appointments and claims/appeals for 30 minutes on the mobile backend; we also cache messages for 20 minutes. Prescriptions is not cached.
This simplifies/removes a number of cases I had previously considered (and I will go update the relevant comment accordingly). It also is information we didn't know when we made the decision to "go get new information and show the loading UI" every 5 minutes for home screen stuff, and so we need to figure out if that information makes us want to do something different. Brought up at an 11th minute today - unfortunately key folks weren't there - so @dumathane is going to make sure to bring it up with @htcollier even if I'm out for parts/all of this week.
Blocked from testing prescriptions because karsyn is out of refillable meds (MHV team is working on it; some other team appears to be using karsyn's credentials - maybe even for automated testing - because 30 refills is typically disappearing in ~1-2 weeks, at this point)
Karsyn has meds now, confirmed that Rx counts change (category and home) and this ticket is closeable.
AC:
During dev/QA, should test that the loading behavior previously on the home screen when returning from "Contact VA" does not demonstrate the jumpiness in this [video] (https://drive.google.com/file/d/1fe415bCgN77R-LqtPtZfGyzse04t7RbW/view?usp=sharing).