[CLEAN] Synthetic Benchmark PR #64732 - Improve Blazor reconnection experience after the server is restarted #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Benchmark PR dotnet#64732
Type: Clean (correct implementation)
Original PR Title: Improve Blazor reconnection experience after the server is restarted
Original PR Description: ## Background
In .NET 10, resuming a Blazor circuit fails when the server has been restarted (and an out-of-process persistent storage is not used). Currently, this is handled on the client side by displaying a "reconnection failed" UI which requires the user to manually reload the page. Previously, in .NET 9 the page would reload automatically once the server has restarted.
Changes
ReconnectModalcomponent used in the Blazor project templateDefaultReconnectDisplayimplementation used in the framework as the fallback when no reconnection UI is found in the user codeComponentHubon the server to not send a client error whenResumeCircuitfails because of unavailable circuit state.ComponentHub.ResumeCircuitto only return a falsy result in the case of unavailable state (similarly to howConnectCircuitindicates rejection), allowing the client-side reconnection logic to react to the rejection by the server properly.DefaultReconnectionHandler.attemptPeriodicReconnectionso that the display does not switch between "reconnect" and "pause" states.ReconnectionModaltemplate. Now the page is reloaded only after server rejection, while normal failure (e.g. network issue) does not reload the page. This brings parity with the default UI.Fixes dotnet#64228
Original PR URL: dotnet#64732