Skip to content

Apply API changes for RequestCircuitPauseAsync#67045

Open
ilonatommy wants to merge 3 commits into
dotnet:mainfrom
ilonatommy:server-pause-api-review
Open

Apply API changes for RequestCircuitPauseAsync#67045
ilonatommy wants to merge 3 commits into
dotnet:mainfrom
ilonatommy:server-pause-api-review

Conversation

@ilonatommy
Copy link
Copy Markdown
Member

Suggestions: #66798 (comment)

Fixes #65062

@ilonatommy ilonatommy self-assigned this Jun 5, 2026
Copilot AI review requested due to automatic review settings June 5, 2026 12:58
@ilonatommy ilonatommy requested a review from a team as a code owner June 5, 2026 12:58
@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the server-side Blazor circuit pause API shape and aligns the JS client hook to support cancellation when the circuit is torn down, based on the API feedback in the linked issue.

Changes:

  • Changed Circuit.RequestCircuitPauseAsync (and internal CircuitHost.RequestPauseAsync) from ValueTask<bool> to Task<bool> and updated call sites/tests accordingly.
  • Updated the JS CircuitStartOptions.onPauseRequested callback signature to accept an AbortSignal and allow synchronous (void) or async (Promise<void>) completion.
  • Added client-side aborting of the pause-deferral work during CircuitManager.dispose().

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts Updates onPauseRequested typing to accept AbortSignal and allow sync/async completion.
src/Components/Web.JS/src/Platform/Circuits/CircuitManager.ts Creates/aborts an AbortController for pause deferral and passes the signal into onPauseRequested.
src/Components/Server/test/Circuits/CircuitHostTest.cs Updates tests to match the new Task<bool> return type.
src/Components/Server/src/PublicAPI.Unshipped.txt Updates the declared public API signature to Task<bool>.
src/Components/Server/src/Circuits/CircuitHost.cs Changes internal pause request method to Task<bool> and returns the dispatcher task directly.
src/Components/Server/src/Circuits/Circuit.cs Updates public API to return Task<bool> and delegates to CircuitHost.

Comment thread src/Components/Web.JS/src/Platform/Circuits/CircuitManager.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API proposal for Label support for DisplayName

2 participants