Skip to content

Clarify Blazor debugger, cache, and circuit behavior - #70348

Merged
kotlarmilos merged 3 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos-blazor-behavior-comments
Nov 9, 2026
Merged

kotlarmilos merged 3 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos-blazor-behavior-comments

Conversation

@kotlarmilos

Copy link
Copy Markdown
Member

Description

Clarifies how debugging requests select and reuse browser endpoints, how CacheView reuses output, and how circuit restoration handles the current user.

@kotlarmilos
kotlarmilos requested a review from a team as a code owner November 6, 2026 11:29
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:29
@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Nov 6, 2026
@kotlarmilos kotlarmilos self-assigned this Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two comments remain inaccurate: live cached components still execute lifecycle logic and checks, while later debug-proxy requests reuse the initial endpoint rather than reconfigure it.

2 open issues
What changed in this PR

This documentation-only PR clarifies existing Blazor debugger, cache, and circuit behavior without changing runtime logic.

Changes:

  • Explains browser debugger endpoints and .NET debug proxy reuse.
  • Expands guidance on cached content and output-dependent cache keys.
  • Documents current-user handling during circuit restoration and authentication-state updates.
File Description
src/​Components/​WebAssembly/​Server/​src/​WebAssemblyNetDebugProxyAppBuilderExtensions.cs Adds comments on browser endpoints and proxy startup.
src/​Components/​Server/​src/​ComponentHub.cs Clarifies which user is used when restoring a circuit.
src/​Components/​Server/​src/​Circuits/​CircuitHost.cs Documents authentication-state updates and retained component data.
src/​Components/​Endpoints/​src/​CacheView/​CacheViewService.cs Explains cached content replacing the original child content.
src/​Components/​Endpoints/​src/​CacheView/​CacheView.cs Expands cache-key guidance for claims and tenant-dependent output.

Review effort: Balanced

@ilonatommy ilonatommy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Debugger and circuit comments approved.

@PureWeen

PureWeen commented Nov 6, 2026

Copy link
Copy Markdown
Member

/review

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The local G/S/O panel found one new P3 documentation issue at this commit (G and O agree; both native candidate verifiers returned KEEP). Existing cache-hit and debug-proxy feedback was deduplicated. This is a documentation accuracy finding, not a runtime regression.

Human-directed and GitHub Copilot-generated.

/// If cached content depends on claims such as roles or access levels, set <see cref="VaryBy"/>
/// to a value derived from those claims. When the user has a nonempty name identifier,
/// <see cref="VaryByUser"/> does not include other claims in the cache key.
/// When a name identifier is present, <see cref="VaryByUser"/> does not include

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P3] Preserve the nonempty name-identifier condition

Please restore the previous nonempty name identifier qualification and its description of excluding other claims. A principal can contain new Claim(ClaimTypes.NameIdentifier, ""): AppendUserIdentity then fails !string.IsNullOrEmpty(nameIdClaim.Value) and falls back to hashing all claims, including roles (CacheViewKeyResolver.cs:205-220). With VaryByUser=true, changing a role therefore changes the key even though a name-identifier claim is present. The new public XML remark says roles are excluded in that case, unlike the previous wording.

@PureWeen

PureWeen commented Nov 6, 2026

Copy link
Copy Markdown
Member

/review

@kotlarmilos
kotlarmilos requested a review from PureWeen November 9, 2026 10:06
@kotlarmilos
kotlarmilos merged commit e3b6953 into dotnet:main Nov 9, 2026
32 checks passed
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 10%

No docs needed: the PR is a comment/XML-doc clarification with no observable behavior change.

Documentation surfaces considered

  • Conceptual article: Not required — Only code and XML doc comments changed in 5 files; no API, default, or behavior change.
  • Migration guidance: Not required — No behavior change that upgrading users must act on.
  • Breaking change: Not required — No compatibility impact; comment-only diff.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 97b3c7cc Deployed Nov 9, 2026 by kotlarmilos via conclusion #249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-reviewed-needs-changes area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants