0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

test(compiler-test-utils): settlePage also waits for what the page's invalidate() asked of the server

An accept callback that calls import.meta.hot.invalidate() (React Refresh on a
route module it cannot refresh) sends vite:invalidate back to the server, which
answers with an update or a full reload. The sync token could reach the page
before that answer, so settlePage resolved before the reload: shown with a
400 ms client->server delay on the addHmr: false React row (reload after
settle) and by a new control that fails on the previous helper.

The page now answers each sync token over the same WebSocket
(import.meta.hot.send); Vite handles a page's messages in order and an
invalidation synchronously, so a page counts as settled once its answer came
back with nothing else sent to the client since the token went out;
otherwise another token follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-10-22 07:47:45 +02:00
commit 3bb5f4876f
No known key found for this signature in database
2 changed files with 147 additions and 33 deletions