Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Blazor] Provide access to the underlying SignalR HttpConnectionDispatcherOptions in AddInteractiveServerRenderMode
[Blazor] Provide access to HttpConnectionDispatcherOptions in AddInteractiveServerRenderMode
Sep 25, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR provides a clean API for configuring SignalR HttpConnectionDispatcherOptions when using AddInteractiveServerRenderMode, addressing a gap where users previously had to use fragile metadata inspection workarounds.
Changes:
- Added
ConfigureConnectionproperty toServerComponentsEndpointOptionsthat accepts anAction<HttpConnectionDispatcherOptions> - Updated
CircuitEndpointProviderto conditionally invoke the configuration action when mapping the Blazor hub - Added unit test coverage for the new property
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Components/Server/src/Builder/ServerComponentsEndpointOptions.cs | Adds ConfigureConnection property with XML documentation |
| src/Components/Server/src/DependencyInjection/ServerRazorComponentsBuilderExtensions.cs | Implements conditional logic to pass ConfigureConnection to MapBlazorHub |
| src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs | Adds basic unit test for ConfigureConnection property |
| src/Components/Server/src/PublicAPI.Unshipped.txt | Documents new public API surface |
src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs
Outdated
Show resolved
Hide resolved
javiercn
reviewed
Jan 22, 2026
…a test Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
pavelsavara
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses the limitation where users of
AddInteractiveServerRenderModehad no clean way to configure the underlying SignalRHttpConnectionDispatcherOptions. Previously, users had to resort to workarounds using metadata inspection to access properties likeCloseOnAuthenticationExpiration.Description
Problem
Before this change, configuring SignalR connection options required this workaround:
This approach was:
MapBlazorHubSolution
Added a new
ConfigureConnectionproperty toServerComponentsEndpointOptionsthat accepts anAction<HttpConnectionDispatcherOptions>, enabling direct configuration of the SignalR connection dispatcher options.Now users can configure connection options cleanly:
Implementation Details
ConfigureConnectionproperty with comprehensive XML documentationMapBlazorHubConfigureConnectionis null, the original behavior is preservedMapBlazorHuboverloads that accept dispatcher options configurationOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.