Repository navigation
Corrupted pr 62755 20260125 8069 - #1
atakanserifoglu wants to merge 3 commits into
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
|
❌ Sorry @atakanserifoglu, you do not have a seat in the organization Deeployed-Peer or the organization has no active subscription. Please contact your organization admin. |
WalkthroughThe PR cleans up the framework by deleting a wide range of obsolete APIs across Web, Forms, WebAssembly, and authentication modules, removing unused classes, properties, and methods, and updating related tests and DI registrations to shrink the public surface and simplify the codebase.Changes
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Repo as Repository
participant Build as Build System
participant Tests as Test Suite
Dev->>Repo: Remove obsolete members (Web, Routing, Forms, WA, Auth, InputFile)
Repo-->>Dev: Files updated/deleted
Dev->>Repo: Update DI registrations & exception logic
Repo-->>Dev: Code changes committed
Dev->>Tests: Delete/adjust related tests
Tests-->>Dev: Test files removed
Dev->>Build: Trigger CI build
Build->>Repo: Compile without obsolete APIs
Build-->>Dev: Build succeeds, no regressions
|
There was a problem hiding this comment.
Commits
Files that changed from the base of the PR and between Base and fec6351 commits: 20Files Selected For Review: 15
- src/Components/Components/src/Routing/Router.cs with diff length 657.
- src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs with diff length 1410.
- src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs with diff length 523.
- src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs with diff length 1460.
- src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs with diff length 17357.
- src/Components/Web/src/WebRenderer.cs with diff length 263.
- src/Components/WebAssembly/JSInterop/src/InternalCalls.cs with diff length 1105.
- src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs with diff length 1805.
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs with diff length 709.
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs with diff length 1647.
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs with diff length 1543.
- src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs with diff length 3808.
- src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs with diff length 681.
- src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs with diff length 2905.
- src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs with diff length 596.
Files excluded from review due to unsupported file extensions: 5
- src/Components/Components/src/PublicAPI.Unshipped.txt
- src/Components/Forms/src/PublicAPI.Unshipped.txt
- src/Components/Web/src/PublicAPI.Unshipped.txt
- src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt
- src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt
Review comments generated: (12)
- Review: 3
- LGTM: 9
- Identified issue already discussed: 0
Tips
Chat with Deeployed Bot (@deeployed-peer)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@deeployed-peerin a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@deeployed-peer: ignoreanywhere in the PR description to pause further reviews from the bot.
| /// </summary> | ||
| public void Redirect() | ||
| { | ||
| if (_tokenResult.InteractionOptions != null && _tokenResult.InteractiveRequestUrl != null) | ||
| if (_tokenResult.InteractionOptions != null) | ||
| { | ||
| _navigation.NavigateToLogin(_tokenResult.InteractiveRequestUrl, _tokenResult.InteractionOptions); | ||
| } | ||
| else | ||
| { | ||
| #pragma warning disable CS0618 // Type or member is obsolete | ||
| _navigation.NavigateTo(_tokenResult.RedirectUrl!); | ||
| #pragma warning restore CS0618 // Type or member is obsolete | ||
| _navigation.NavigateTo(_tokenResult.InteractiveRequestUrl!); | ||
| } | ||
| } |
There was a problem hiding this comment.
🟠 High: The updated Redirect method no longer checks that InteractiveRequestUrl is non‑null before passing it to navigation methods. This can cause a NullReferenceException at runtime when InteractionOptions is non‑null but InteractiveRequestUrl is null, or when both are null. Add a combined null check and handle the case where no URL is available (e.g., throw an informative exception).
| /// </summary> | |
| public void Redirect() | |
| { | |
| if (_tokenResult.InteractionOptions != null && _tokenResult.InteractiveRequestUrl != null) | |
| if (_tokenResult.InteractionOptions != null) | |
| { | |
| _navigation.NavigateToLogin(_tokenResult.InteractiveRequestUrl, _tokenResult.InteractionOptions); | |
| } | |
| else | |
| { | |
| #pragma warning disable CS0618 // Type or member is obsolete | |
| _navigation.NavigateTo(_tokenResult.RedirectUrl!); | |
| #pragma warning restore CS0618 // Type or member is obsolete | |
| _navigation.NavigateTo(_tokenResult.InteractiveRequestUrl!); | |
| } | |
| } | |
| /// </summary> | |
| public void Redirect() | |
| { | |
| if (_tokenResult.InteractionOptions != null && _tokenResult.InteractiveRequestUrl != null) | |
| { | |
| _navigation.NavigateToLogin(_tokenResult.InteractiveRequestUrl, _tokenResult.InteractionOptions); | |
| } | |
| else if (_tokenResult.InteractiveRequestUrl != null) | |
| { | |
| _navigation.NavigateTo(_tokenResult.InteractiveRequestUrl); | |
| } | |
| else | |
| { | |
| throw new InvalidOperationException("Unable to redirect because no interactive request URL is available."); | |
| } | |
| } |
| [Obsolete("This property is obsolete and configuring it has no effect.")] | ||
| [Parameter] public bool PreferExactMatches { get; set; } | ||
|
|
||
| private RouteTable Routes { get; set; } |
There was a problem hiding this comment.
🔴 Critical: The PreferExactMatches property has been removed, but there are still references to it elsewhere in Router.cs (e.g., in parameter handling or routing logic). Those references must also be removed or updated, otherwise the project will fail to compile with a missing member error.
|
|
||
| #pragma warning disable CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility | ||
| [Inject] internal SignOutSessionStateManager SignOutManager { get; set; } = default!; | ||
| #pragma warning restore CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility | ||
|
|
||
| [Inject] internal ILogger<RemoteAuthenticatorViewCore<TAuthenticationState>> Logger { get; set; } = default!; | ||
|
|
||
| /// <inheritdoc /> |
There was a problem hiding this comment.
🟠 High: The SignOutSessionStateManager injection and its associated field SignOutManager have been removed, but any remaining references to SignOutManager in this class (e.g., calls to SignOutManager.ValidateSignOutState() or other members) will cause a compile‑time error because the type no longer exists. Ensure all such usages are deleted or replaced with the new history‑state based validation logic.
Code Review Bench PR dotnet#62755
Original PR Title: [Blazor] Remove obsolete APIs from Components
Original PR Description: This PR removes obsolete APIs from the Blazor Components library that were marked as obsolete, as per the project's obsolete API removal policy.
Description
Components (Microsoft.AspNetCore.Components)
PreferExactMatchesproperty from Router which was marked obsolete and had no effect on routing behaviorResourceAssetconstructor overloadForms (Microsoft.AspNetCore.Components.Forms)
AddDataAnnotationsValidationmethod (replaced byEnableDataAnnotationsValidation)EnableDataAnnotationsValidation(EditContext)overload without IServiceProvider parameterWeb (Microsoft.AspNetCore.Components.Web)
RemoteBrowserFileStreamOptionsclassWebEventCallbackFactoryEventArgsExtensionsclass and all its methodsRendererId.initaccessor fromWebRendererWebAssembly (Microsoft.AspNetCore.Components.WebAssembly)
NotifyLocationChanged(string, bool)method fromJSInteropMethodsWebAssembly.Authentication (Microsoft.AspNetCore.Components.WebAssembly.Authentication)
SignOutSessionStateManagerclass and all referencesRemoteAuthenticationServiceconstructor without logger parameterAccessTokenResultconstructor andRedirectUrlpropertyAccessTokenNotAvailableExceptionto useInteractiveRequestUrlinstead of removedRedirectUrlRemoteAuthenticatorViewCoresign-out validation logic to properly handle nullHistoryEntryState(only fail validation when state exists but is invalid)API Surface
PublicAPI.Shipped.txtfiles remain unchanged per API baseline policy*REMOVED*entries to correspondingPublicAPI.Unshipped.txtfiles for all removed APIsTests
SignOutSessionStateManager,AddDataAnnotationsValidation)Validation
💡 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.
Original PR URL: dotnet#62755