Slack thread
In this PR:
we introduced for read requests to happen only after any write request has completed. An example for that is this use case:
- You are offline and create a workspace
- then you come online
- You created the workspace optimistically, but because you had some other write requests queued, your READ to get workspace list goes to the server before the WRITE to create the workspace
- The READ to get workspace list uses an Onyx.set, and your optimistic workspace is not included, so it disappears
- A few moments later, your request to create a workspace goes through, and it shows back up
however, due to that change we stopped applying optimistic READ updates immediately. Instead, now, the optimistic updates are only applied once all write requests has finished.
This can cause bugs. One bug for example is here, where we open a new component which fires a READ request on mount. It sets a loading state, and that one is expected to immediately become visible in the UI:

But as the read requests optimistic update is delayed we just see a blank page:


Slack thread
In this PR:
API.readwait on all requests on the SequentialQueue to respond #12219we introduced for read requests to happen only after any write request has completed. An example for that is this use case:
however, due to that change we stopped applying optimistic READ updates immediately. Instead, now, the optimistic updates are only applied once all write requests has finished.
This can cause bugs. One bug for example is here, where we open a new component which fires a READ request on mount. It sets a loading state, and that one is expected to immediately become visible in the UI:
But as the read requests optimistic update is delayed we just see a blank page: