Incorrect revalidation when multiple request made via `useFetcher.Form` are inflight
Reproduction
https://stackblitz.com/edit/remix-run-remix-cqanhj?file=app%2Froutes%2F_index.tsx
System Info
System:
OS: Linux 5.0 undefined
CPU: (6) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.14.0 - /usr/local/bin/pnpm
npmPackages:
@remix-run/css-bundle: * => 2.6.0
@remix-run/dev: * => 2.6.0
@remix-run/node: * => 2.6.0
@remix-run/react: * => 2.6.0
@remix-run/serve: * => 2.6.0
Used Package Manager
npm
Expected Behavior
The routes should be revalidated as expected when the fetchers resolve, and a manual refresh to sync the data from the server should not be required.
Actual Behavior
I have attached the behaviour, which seems to have some bug with the revalidation when multiple mutation fetchers are in flight; the revalidation happens only once and not for every mutation, resulting in an out-of-sync UI and requiring a manual refresh of the page to sync the state of the UI with the server.
https://github.com/remix-run/react-router/assets/25246765/11575a43-c821-45fc-a059-6d119a833e0b
RR repro https://stackblitz.com/edit/remix-run-remix-hbb2l4fy