next.js
937a3246 - Resolve request ID confusion (#85809)

Commit
56 days ago
Resolve request ID confusion (#85809) Setting the cache status for a page in dev mode is a sequential operation that only requires the HTML request ID to identify WebSocket clients across different browser tabs/windows. This is different from connecting the React debug channel (after which the cache status handling was modeled), which requires both the HTML request ID as well as the request ID to correctly associate debug chunks for a given client with the matching request, which might be for the HTML document, a client-side navigation, or a server function call. With this PR, we're removing the unused `requestId` parameter from the `setCacheStatus` function. We're also renaming the WebSocket client's request ID to `htmlRequestId`, as well as renaming the associated maps and variables accordingly. This avoids confusion and better reflects the purpose of these IDs. One of those confusions was apparent in the `setReactDebugChannel` methods, which is now cleared up as well.
Author
Parents
Loading