Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 22, 2026

Benchmark PR from qodo-benchmark#88

Summary by CodeRabbit

  • Refactor
    • Removed obsolete authentication configuration methods, router properties, data validation extensions, and file handling options from the public API.
    • Streamlined the framework by consolidating deprecated APIs to recommended modern alternatives.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

This pull request removes obsolete and deprecated public APIs across the ASP.NET Core Components library, including obsolete component properties, extension methods, entire classes, and type signatures. Changes span Router, EditContext, RemoteBrowserFileStreamOptions, WebEventCallbackFactory, WebRenderer, JSInterop, and WebAssembly authentication modules.

Changes

Cohort / File(s) Summary
Router & ResourceAsset Component Cleanup
src/Components/Components/src/Routing/Router.cs, src/Components/Components/src/PublicAPI.Unshipped.txt
Removed obsolete PreferExactMatches property from Router component and its constructor variant from ResourceAsset
Forms Validation Extensions
src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs, src/Components/Forms/src/PublicAPI.Unshipped.txt, src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs
Removed two obsolete extension methods (AddDataAnnotationsValidation, EnableDataAnnotationsValidation overload) and their corresponding test
RemoteBrowserFileStreamOptions Removal
src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs, src/Components/Web/src/PublicAPI.Unshipped.txt
Deleted entire obsolete class with three properties (MaxSegmentSize, MaxBufferSize, SegmentFetchTimeout)
WebEventCallbackFactory Extensions Removal
src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs, src/Components/Web/src/PublicAPI.Unshipped.txt
Deleted entire file containing 20+ obsolete Create overloads for various EventArgs types
WebRenderer Property Cleanup
src/Components/Web/src/WebRenderer.cs, src/Components/Web/src/PublicAPI.Unshipped.txt
Removed obsolete init-only setter from RendererId property
WebAssembly JSInterop Cleanup
src/Components/WebAssembly/JSInterop/src/InternalCalls.cs, src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs, src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt
Removed obsolete generic InvokeJS<T0,T1,T2,TRes> method; replaced obsolete NotifyLocationChanged overload with new signature including state parameter
WebAssembly Authentication Type & Method Removals
src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs, src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs, src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs, src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt
Removed obsolete constructor from AccessTokenResult (with RedirectUrl property); removed obsolete constructor from RemoteAuthenticationService; deleted entire SignOutSessionStateManager class
WebAssembly Authentication Integration Updates
src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs, src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs, src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs
Removed SignOutManager dependency injection and simplified sign-out validation logic; updated redirect logic to use InteractiveRequestUrl; removed SignOutSessionStateManager registration
Authentication Tests Cleanup
src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs
Removed obsolete test method and TestSignOutSessionStateManager helper class

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hop, hop! Obsolete code takes its final bow,
Deprecated APIs fade away right now,
Old redirects and handlers bid farewell,
Cleaner surfaces cast a brighter spell,
The components library hops forward free!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is minimal and does not follow the template structure. It lacks a detailed description, summary section, checklist items, and issue references required by the template. Expand the description to include: a summary of changes (under 80 chars), detailed description section, reference to the related issue (#88), and completion of the contributor checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and directly summarizes the main change: removing obsolete APIs from Blazor Components. It is concise, specific, and accurately reflects the primary purpose of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/Components/Forms/src/PublicAPI.Unshipped.txt`:
- Around line 2-3: Add the *REMOVED* markers to the already-shipped API
declarations for the two removed extension methods and delete their entries from
the unshipped list: prefix the existing shipped declarations of static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
Microsoft.AspNetCore.Components.Forms.EditContext! and static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
System.IDisposable! with *REMOVED*, and remove the duplicate *REMOVED* lines
from the unshipped file so only the shipped file records these removals.
🧹 Nitpick comments (1)
src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs (1)

281-292: Consider adding a regression test for externally initiated logout.
This behavior change (no interaction state ⇒ LogOutFailed) is meaningful; a test would lock in the intended outcome.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51b3187 and 6833005.

📒 Files selected for processing (20)
  • src/Components/Components/src/PublicAPI.Unshipped.txt
  • src/Components/Components/src/Routing/Router.cs
  • src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs
  • src/Components/Forms/src/PublicAPI.Unshipped.txt
  • src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs
  • src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs
  • src/Components/Web/src/PublicAPI.Unshipped.txt
  • src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs
  • src/Components/Web/src/WebRenderer.cs
  • src/Components/WebAssembly/JSInterop/src/InternalCalls.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt
  • src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs
  • src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs
  • src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt
💤 Files with no reviewable changes (13)
  • src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs
  • src/Components/Web/src/WebRenderer.cs
  • src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs
  • src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs
  • src/Components/Components/src/Routing/Router.cs
  • src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs
  • src/Components/WebAssembly/JSInterop/src/InternalCalls.cs
  • src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs
  • src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs
  • src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs
🧰 Additional context used
🪛 LanguageTool
src/Components/Forms/src/PublicAPI.Unshipped.txt

[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 475 characters long)
Context: ...text! editContext) -> System.IDisposable!

(EN_EXCESSIVE_EXCLAMATION)

🔇 Additional comments (5)
src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt (1)

2-3: LGTM — unshipped API list updated for JSInteropMethods removals.

src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs (1)

38-45: LGTM — redirect now consistently uses InteractiveRequestUrl.
This aligns the exception flow with the updated interactive-request API shape.

src/Components/Components/src/PublicAPI.Unshipped.txt (1)

2-4: LGTM — component API surface pruning reflected correctly.

src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt (1)

2-8: LGTM — authentication API removals captured in unshipped list.

src/Components/Web/src/PublicAPI.Unshipped.txt (1)

2-31: LGTM — Web API surface removals reflected cleanly.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +2 to +3
*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> Microsoft.AspNetCore.Components.Forms.EditContext!
*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> System.IDisposable!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify PublicAPI file placement and check for remaining usages of removed methods

# Check if these APIs exist in PublicAPI.Shipped.txt
echo "=== Checking PublicAPI.Shipped.txt for these APIs ==="
find . -name 'PublicAPI.Shipped.txt' -type f -exec grep -l 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' {} \;

echo ""
echo "=== Checking PublicAPI.Unshipped.txt for these APIs ==="
find . -name 'PublicAPI.Unshipped.txt' -type f -exec grep -n 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' {} +

echo ""
echo "=== Searching for remaining usages of removed parameterless methods ==="
rg -n 'AddDataAnnotationsValidation\s*\(' --type cs --type csproj -g '!PublicAPI' || echo "No matches found"

echo ""
rg -n '\.EnableDataAnnotationsValidation\s*\(' --type cs --type csproj -g '!PublicAPI' || echo "No matches found"

echo ""
echo "=== Verifying parameterized variant exists in code ==="
rg -n 'EnableDataAnnotationsValidation.*IServiceProvider' --type cs || echo "No matches found"

Repository: qodo-benchmark/aspnetcore-combined-coderabbit

Length of output: 1249


🏁 Script executed:

#!/bin/bash
# Check both PublicAPI files to understand the state of these APIs

echo "=== PublicAPI.Shipped.txt (first 30 lines) ==="
head -30 ./src/Components/Forms/src/PublicAPI.Shipped.txt

echo ""
echo "=== Searching for these specific APIs in PublicAPI.Shipped.txt ==="
grep -n 'AddDataAnnotationsValidation\|EnableDataAnnotationsValidation' ./src/Components/Forms/src/PublicAPI.Shipped.txt | head -10

echo ""
echo "=== Full PublicAPI.Unshipped.txt ==="
cat ./src/Components/Forms/src/PublicAPI.Unshipped.txt

Repository: qodo-benchmark/aspnetcore-combined-coderabbit

Length of output: 4712


Move REMOVED entries to PublicAPI.Shipped.txt.

The two removed APIs are already declared in PublicAPI.Shipped.txt (lines 62 and 64) without *REMOVED* markers. In .NET's PublicAPI tracking convention, when removing previously shipped APIs, the *REMOVED* markers should be in PublicAPI.Shipped.txt where the APIs are currently declared, not in PublicAPI.Unshipped.txt.

Add *REMOVED* prefixes to lines 62 and 64 in PublicAPI.Shipped.txt:

*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> Microsoft.AspNetCore.Components.Forms.EditContext!
*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> System.IDisposable!

Then remove lines 2-3 from PublicAPI.Unshipped.txt.

Migration to the parameterized variant EnableDataAnnotationsValidation(this EditContext editContext, IServiceProvider serviceProvider) is complete—no remaining usages of the parameterless methods exist in the codebase.

🧰 Tools
🪛 LanguageTool

[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 475 characters long)
Context: ...text! editContext) -> System.IDisposable!

(EN_EXCESSIVE_EXCLAMATION)

🤖 Prompt for AI Agents
In `@src/Components/Forms/src/PublicAPI.Unshipped.txt` around lines 2 - 3, Add the
*REMOVED* markers to the already-shipped API declarations for the two removed
extension methods and delete their entries from the unshipped list: prefix the
existing shipped declarations of static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
Microsoft.AspNetCore.Components.Forms.EditContext! and static
Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this
Microsoft.AspNetCore.Components.Forms.EditContext! editContext) ->
System.IDisposable! with *REMOVED*, and remove the duplicate *REMOVED* lines
from the unshipped file so only the shipped file records these removals.

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.

3 participants