Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@unstubbable
Copy link
Contributor

@unstubbable unstubbable commented Nov 5, 2025

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.

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.
@ijjk
Copy link
Member

ijjk commented Nov 5, 2025

Tests Passed

@unstubbable unstubbable marked this pull request as ready for review November 5, 2025 14:45
@unstubbable unstubbable requested a review from eps1lon November 5, 2025 14:45
@unstubbable unstubbable merged commit 937a324 into canary Nov 5, 2025
789 of 809 checks passed
@unstubbable unstubbable deleted the hl/resolve-request-id-confusion branch November 5, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants