Files
deepdrft/product-notes/blazorblocks-modelview-di-registration-brief.md
T
daniel-c-harvey 4bec507aab docs: split ModelView DI brief into per-team BlazorBlocks and AuthBlocks briefs
Two self-contained team briefs with explicit ship-ordering; original trimmed to an index pointing to both.
2026-06-19 23:26:56 -04:00

2.2 KiB

Index — EditModalSaveContextHolder Missing DI Registration (BlazorBlocks / AuthBlocks)

Status: scoped, not yet started. Confirmed against Cerebellum.BlazorBlocks.Web 10.3.32 / Cerebellum.AuthBlocks.Web 10.3.33. Author: product-designer. Date: 2026-06-19.

The defect

BlazorBlocks' ModelView / EditModelModal components have a required [Inject] dependency on Web.Maintenance.Entities.EditModalSaveContextHolder (a per-circuit save bridge), but the BlazorBlocks Web package ships no registration extension for it and AuthBlocks' ConfigureAuthServices never registers it either. Any consumer of a ModelView-based page (e.g. AuthBlocks' Users.razor / Registrations.razor) crashes the Blazor circuit on navigation with an unregistered-service InvalidOperationException. Two independent downstream products have each hand-registered the internal service as a stopgap — the tell that this is a leaked library registration.

The two-team layered fix (ordered — do not reorder)

  1. BlazorBlocks ships first. Add a Web-side AddBlazorBlocksWeb() extension that registers the holder via TryAddScoped (scoped is required). Bump Cerebellum.BlazorBlocks.Web from 10.3.32; report the new version.
  2. AuthBlocks ships second. Bump its Cerebellum.BlazorBlocks.Web reference to that new version, call AddBlazorBlocksWeb() from ConfigureAuthServices, bump Cerebellum.AuthBlocks.Web from 10.3.33.

AuthBlocks is blocked until BlazorBlocks' new version is published. Registration lives with its owner (BlazorBlocks); AuthBlocks stays self-contained by composing it. MudBlazor (AddMudServices) stays a caller-owned prerequisite throughout.

The detail lives in the two team briefs

Each is fully self-contained for an orchestrator working in only that one repo: