Skip to content

[Blazor] Document Components design invariants - #68704

Draft
PureWeen wants to merge 2 commits into
dotnet:mainfrom
PureWeen:pureween-ground-blazor-invariants
Draft

[Blazor] Document Components design invariants#68704
PureWeen wants to merge 2 commits into
dotnet:mainfrom
PureWeen:pureween-ground-blazor-invariants

Conversation

@PureWeen

Copy link
Copy Markdown
Member

Summary

Adds source-grounded design invariants to src/Components/AGENTS.md, with legitimate exceptions documented alongside each rule so the guidance does not create false review findings.

The guidance covers:

  • render-mode agnosticism and the narrow render-mode-specific assembly exceptions
  • HttpContext access and cross-render-mode service registration
  • StateHasChanged, InvokeAsync, and IHandleEvent behavior
  • trimming/AOT annotations and dependency expectations
  • deterministic async test coordination
  • Selenium as the Components E2E framework versus Playwright MCP for manual validation

Each rule was checked against the current source tree before inclusion. Stale, withdrawn, out-of-repo, or unverifiable claims from #66964 were deliberately excluded. The original maintainer review that motivated this grounding pass is Javier's review on #66964.

Validation

  • Verified every cited source path and reference pattern exists in the current tree
  • Confirmed IHttpContextAccessor has no shipping Components source usages
  • Grounded StateHasChanged guidance in analyzer BL0012 and its explicit lambda/local-function exclusions
  • Confirmed the Components E2E project references Selenium and not Playwright
  • Confirmed the current src/Components/AGENTS.md blob on upstream main was unchanged before applying the edit
  • git diff --check

Documentation only; no runtime behavior changes.

Copilot AI added 2 commits August 21, 2026 15:24
Adds a Design invariants section to src/Components/AGENTS.md covering render
mode agnosticism, HttpContext access, cross-render-mode service registration,
rendering and the synchronization context, IHandleEvent, trim/AOT annotations,
dependencies, and async coordination in tests.

Each rule was checked against current source, and the legitimate exceptions are
recorded alongside it so the guidance does not produce false review findings.
Also clarifies that Selenium is the E2E framework for this area and that the
Playwright references are the Playwright MCP browser tool used for manual
validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the source-grounded rules while removing implementation inventories, file-path walkthroughs, and duplicated analyzer scope from the nearest-wins guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants