Onboarding guide
21. ADC Conference - UI
What this chapter covers. This is the consumer half of the "write-once UI, render everywhere" story (primer §2): the Blazor pages, page-local collaborators, and per-entity HTTP services that turn the Conference REST surface (G20) into the screens an organizer, a speaker, a sponsor, or an anonymous attendee actually touches. Everything here lives in the per-module Razor Class Library MMCA.ADC.Conference.UI (under MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/, the path every File:line citation below is relative to), which, like every consumer UI, assembles the reusable primitives taught in G15 (Common UI Framework) into concrete pages. There is very little new infrastructure here: the value is in seeing how a fourteen-area feature surface (events, sessions, speakers, conference categories and their items, questions, rooms, sponsors, partners, activities, session materials, feedback moderation, public browsing, session selection, and the conference landing page) is composed from the framework's list-page base, typed HTTP service base, validation bridge, device-capability abstractions, and module system. The headline lens is [Rubric §18, UI Architecture & Component Design], which assesses component reuse, separation of presentation from data access, and a coherent composition model. Because the same Razor components compile into the Blazor Server, WebAssembly, and .NET MAUI hybrid heads, this one library renders the conference across web, Android, iOS, macOS, and Windows with no per-platform reimplementation. [Rubric §22, Responsive & Cross-Browser/Device].
Folders follow the workspace's feature-by-folder rule with a technical root: pages live under Pages/<Aggregate>/ (Pages/Events/, Pages/Sessions/, Pages/Partners/, with the anonymous family nested one level deeper as Pages/Public/<Aggregate>/) and services under Services/<Aggregate>/, so a citation's folder names the feature area it belongs to.
The layering inside the UI: a page never touches HttpClient
Each page is a .razor + .razor.cs code-behind pair that depends on a UI service interface, never on HttpClient and never on the API's internals. The ten CRUD-shaped entities (events, sessions, speakers, conference categories, category items, questions, rooms, sponsors, partners, activities) each get a service deriving from Common's EntityServiceBase<TEntityDTO, TIdentifierType> and exposing the IEntityService<TEntityDTO, TIdentifierType> contract: EventService, SessionService, SpeakerService, ConferenceCategoryService, CategoryItemService, QuestionService, RoomService, SponsorService, PartnerService, and ActivityService (Services/Events/EventService.cs:34, Services/Sessions/SessionService.cs:10, Services/Speakers/SpeakerService.cs:18, Services/Categories/ConferenceCategoryService.cs:15, Services/Categories/CategoryItemService.cs:15, Services/Questions/QuestionService.cs:10, Services/Rooms/RoomService.cs:13, Services/Sponsors/SponsorService.cs:10, Services/Partners/PartnerService.cs:10, Services/Activities/ActivityService.cs:10). They inherit GetAllAsync/GetPagedAsync/GetByIdAsync/AddAsync/UpdateAsync/DeleteAsync and only add the handful of bespoke verbs the conference needs. Five add nothing at all: ActivityService, SponsorService, PartnerService, SessionService, and QuestionService are fourteen-line files whose entire job is to bind an endpoint name to a DTO and an identifier alias (Services/Partners/PartnerService.cs:11 to :12 is the whole of one), and their interfaces (IActivityUIService at Services/Activities/IActivityUIService.cs:9, ISponsorUIService at Services/Sponsors/ISponsorUIService.cs:9, IPartnerUIService at Services/Partners/IPartnerUIService.cs:9, and siblings) are equally empty extensions of the generic contract.
Three services show where extension goes. EventService layers PublishAsync, UnpublishAsync, RefreshFromSessionizeAsync, and RefreshFromSessionizeWithCodeAsync onto the inherited CRUD (Services/Events/EventService.cs:61, :74, :87, :109). The first two are POSTs to [Idempotent] endpoints, so each sends an Idempotency-Key minted once per call (the argument is evaluated before the retry pipeline runs, so every attempt states the same key and a retry after a lost response replays the stored answer), and each carries the loaded row version as an If-Match header built by ConcurrencyETag (Services/Events/EventService.cs:71 to :72, :84 to :85, rationale at :22 to :25), so a publish races against a concurrent edit at the API rather than in the browser. The Sessionize refresh deliberately sends no key, so one click is exactly one POST: the server never stores a failed answer for replay and stamps its refresh throttle before calling Sessionize, so a keyed retry after a 503 would run the handler again, hit that throttle, and replace the real failure with "throttled" (:28 to :31, keyless call at :91 to :96). The fourth is a small orchestration worth reading: an edited Sessionize code has to be persisted before the import runs (the import reads the code off the stored event), and the import rewrites the event's children and refresh stamp, so the method persists, imports, reloads, and hands back both halves as one SessionizeRefreshOutcome (Services/Events/EventService.cs:109 to :138, persist at :117 to :124, reload at :135, record at Services/Events/SessionizeRefreshOutcome.cs:14). The import has already committed by the time the reload runs, so a failed reload travels inside a successful outcome rather than failing it (Services/Events/EventService.cs:132 to :134). That is the recurring shape: one call, one Result, one failure branch for the page. RoomService overrides AddAsync to reshape the POST body, because the API's AddRoomRequest contract names the key RoomId while the DTO calls it Id, and it sends a default id as null so the handler allocates one rather than reading an explicit 0 as a client-chosen id (Services/Rooms/RoomService.cs:17 to :43, null id at :29 to :31). The override keeps the base's Idempotency-Key, because the endpoint is [Idempotent] and the server allocates the id: without a key the create is never retried after a lost response, and a manual retry lands a second room (:21 to :23, key at :42). It adds a two-argument DeleteAsync that passes the owning event on the query string (:45), and the two room check-in code verbs, a read and a keyed rotate that names the event the same way (:51, :56, key at :63). SpeakerService adds LinkUserAsync/UnlinkUserAsync for binding a speaker record to an identity account (Services/Speakers/SpeakerService.cs:43, :54). EventService and SpeakerService also override the inherited AddAsync/UpdateAsync/DeleteAsync, and only to drop this scope's memoized lookup once a write succeeds (Services/Events/EventService.cs:44, :50, :56, helper at :140; Services/Speakers/SpeakerService.cs:26, :32, :38, helper at :63): the organizers who write bypass the server's output cache, so the client memo was the only staleness they could see (Services/Events/EventService.cs:17 to :20). CategoryItemService and ConferenceCategoryService make the same three overrides for the category-item lookup, the second because that lookup carries each item's category title and a deleted category takes its items with it (Services/Categories/CategoryItemService.cs:23, :29, :35, helper at :40; Services/Categories/ConferenceCategoryService.cs:13, helper at :40). Publish and unpublish invalidate the event lookup the same way, and a Sessionize refresh drops the speaker and category-item lookups as well, because the import rewrites speakers and categories (Services/Events/EventService.cs:65, :78, :101 to :103).
Nothing in this layer throws for a server answer. Every call funnels through the framework's HttpResultExecutor and ProblemDetailsResultReader, so a transport fault and a ProblemDetails body both arrive as a failed Result with a typed error the page can branch on (Services/Speakers/SpeakerLookupService.cs:58 and :67, Services/Sessions/Selection/SessionSelectionService.cs:32 and :58, Services/Events/EventLookupService.cs:59 and :68). [Rubric §3, Clean Architecture] and [Rubric §9, API & Contract Design]: the page binds to a DTO contract (EventDTO, SessionDTO, SpeakerDTO, SponsorDTO, ActivityDTO) plus an interface, and the wire envelope is the uniform PagedCollectionResult<T> / CollectionResult<T> the API returns for every entity.
The list pages: two bases, one recipe
Twelve list screens hang off DataGridListPageBase<TDto>, which supplies server-side paging against MudDataGrid<T>, cancellation lifecycle, loading and load-failed state, filter and sort extraction from MudBlazor's GridState<T>, toast error surfacing, saved page/rows-per-page/scroll restoration, and viewport-driven mobile rendering that swaps the grid for a MobileInfiniteScrollList<TItem>. Five derive from it directly (the public session list resolves its event scope through its own collaborators, described below): EventList, QuestionList, ConferenceCategoryList, PublicEventList, and PublicSessionList (Pages/Events/EventList.razor.cs:16, Pages/Questions/QuestionList.razor.cs:11, Pages/Categories/ConferenceCategoryList.razor.cs:11, Pages/Public/Events/PublicEventList.razor.cs:29, Pages/Public/Sessions/PublicSessionList.razor.cs:25). A concrete page reduces to overriding Title, GridRef, SaveFilters/RestoreFilters, and a LoadServerData delegate that calls its service's GetPagedAsync, with delete-and-confirm delegated to the shared ListPageActions helper.
The other seven list pages scope their rows to one conference event, and that repetition earned its own ADC-local base: EventFilteredListPageBase<TDto> (Pages/Common/EventFilteredListPageBase.cs:25), used by SessionList, RoomList, SpeakerList, SponsorList, PartnerList, ActivityList, and PublicSpeakerList (Pages/Sessions/SessionList.razor.cs:26, Pages/Rooms/RoomList.razor.cs:12, Pages/Speakers/SpeakerList.razor.cs:18, Pages/Sponsors/SponsorList.razor.cs:18, Pages/Partners/PartnerList.razor.cs:18, Pages/Activities/ActivityList.razor.cs:19, Pages/Public/Speakers/PublicSpeakerList.razor.cs:33). It injects IEventLookupService and a TimeProvider (Pages/Common/EventFilteredListPageBase.cs:27, :28), starts the event load before the first await of OnInitializedAsync and exposes it as EventsLoadTask (:58, armed at :144 through BeginEventsLoad at :152) because the grid's first ServerData call can race ahead of initialization, and closes that race in one place: it overrides Common's OnBeforeFetchAsync hook so every fetch the base runs, each grid loader and each mobile page fetcher, awaits WaitForEventsAsync before its filter callback reads the selected event (:213, :204), which leaves a derived page only ApplyEventFilter to add the selection to its outgoing filter set (:216). The load itself, LoadEventsAndResolveDefaultAsync, is callable again on retry, so re-running it heals a transient lookup failure (:158, note at :155 to :156). It seals SaveFilters/RestoreFilters and hands pages SavePageFilters/RestorePageFilters instead (:106, :118, :94, :97), so the eventId half of the saved state is written once, with the explicit "all" sentinel that distinguishes a deliberate clear from no saved state at all (:113, read back at :127). Default resolution is one method: a restored id that still exists wins, a dangling one falls back to the live-or-next event computed by CurrentEventSelector against the clock read through the injected TimeProvider, and a page whose scope is locked is always pinned to that computed default (:181 to :201, clock at :199, opt-out property EventFilterIsUserControlled at :65, overridden by PublicSpeakerList to "only privileged readers choose" at Pages/Public/Speakers/PublicSpeakerList.razor.cs:53). Three details are worth internalizing. The event picker renders only once the component is interactive and there is more than one event to choose (Pages/Common/EventFilteredListPageBase.cs:80): an SSR prerender would paint a fully formed picker into static HTML whose clicks are silently swallowed until the interactive runtime attaches, which under InteractiveAuto's WebAssembly leg is a whole runtime boot later. A failed lookup is remembered rather than swallowed, together with its errors, so a page that must fail closed can branch instead of falling through to an unscoped query, and can answer its fetch with that failure so the grid words the mapped HTTP text rather than a generic load error (:43, :50, recorded at :174 to :175). And the prerender does not wait out an outage: the lookup runs through PrerenderLookupBudget (:165, class at Pages/Common/PrerenderLookupBudget.cs:14), which bounds it only while the component is not yet interactive. Unbounded, the read is limited only by the API client's 90-second HttpClient.Timeout and the shared read retry, so during a Conference outage a first visit could wait a minute or more for the server to answer the page (PrerenderLookupBudget.cs:6 to :13). The budget is five seconds on the injected clock (:17, :49); the lookup is also wrapped in WaitAsync, because a lookup that shares an in-flight memoized fetch may not observe the token itself (:52 to :53); and an expiry answers a failure carrying the client timeout's own error code (HttpResultExecutor.TimeoutErrorCode), so the grid words it like any other timeout while the interactive render looks the events up again (:25 to :29, caught at :55 to :57). The public session list's event catalog runs its events read through the same budget (Pages/Public/Sessions/PublicSessionEventCatalog.cs:75). [Rubric §19, State Management & Data Flow] and [Rubric §23, Front-End Performance & Rendering].
Whether that event filter needs any translation at all depends on the entity. PartnerList is the simplest case in the family: EventId is a real Partner column, so the filter goes straight through the generic filter pipeline with no virtual-key resolution, and the page reduces to a title, a grid reference, a search box saved through SavePageFilters/RestorePageFilters, and a localized type column (Pages/Partners/PartnerList.razor.cs:19, rationale at :14 to :17, filters at :39 to :43, type label at :37). ActivityList is the same shape (Pages/Activities/ActivityList.razor.cs:20). The speaker lists are the hard case: a speaker's event association travels through join tables, so their event filter is a virtual key resolved server-side (Pages/Public/Speakers/PublicSpeakerList.razor.cs:18 to :19).
Two public lists deliberately opt out of the grid entirely. PublicSponsorList and PublicActivityList are plain ComponentBase pages (Pages/Public/Sponsors/PublicSponsorList.razor.cs:21, Pages/Public/Activities/PublicActivityList.razor.cs:22), because a sponsor roster and a social programme are bounded (both cap the fetch at 200 rows, Pages/Public/Sponsors/PublicSponsorList.razor.cs:24, Pages/Public/Activities/PublicActivityList.razor.cs:25) and render as tier-grouped logo cards and a chronological programme rather than a sortable table, so each fetches one page and orders it in memory (Pages/Public/Sponsors/PublicSponsorList.razor.cs:106 to :116, Pages/Public/Activities/PublicActivityList.razor.cs:112 to :114). PublicSpeakerList splits the difference: it keeps the base class's page-based mobile fetch path but appends each page to an accumulating list and hangs Common's InfiniteScrollSentinel below its card grid, twelve cards per chunk so a full chunk fills whole rows (Pages/Public/Speakers/PublicSpeakerList.razor.cs:24, :35).
Detail pages, form models, and one declaration of the rules
The organizer detail pages have no ADC-local base: all nine inherit Common's DetailPageBase (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:28) from markup, and it owns what every one of them would otherwise repeat verbatim: the page-scoped CancellationTokenSource with its dispose pattern (DetailPageBase.cs:30, :52), a LatestLoadGuard for route-driven reloads (documented at :9 to :11), and the inline edit-mode lifecycle, IsEditing/IsDirty plus the BeginEdit/EndEdit transitions that keep the dirty flag from being left set behind a closed editor (:46, :49, :68, :75). The nine are EventDetail, SessionDetail, SpeakerDetail, ConferenceCategoryDetail, RoomDetail, QuestionDetail, SponsorDetail, PartnerDetail, and ActivityDetail (@inherits at Pages/Events/EventDetail.razor:12, Pages/Sessions/SessionDetail.razor:12, Pages/Speakers/SpeakerDetail.razor:12, Pages/Categories/ConferenceCategoryDetail.razor:3, Pages/Rooms/RoomDetail.razor:7, Pages/Questions/QuestionDetail.razor:7, Pages/Sponsors/SponsorDetail.razor:8, Pages/Partners/PartnerDetail.razor:7, Pages/Activities/ActivityDetail.razor:7), and the dirty flag feeds Common's UnsavedChangesGuard directly. [Rubric §24, Forms, Validation & UX Safety].
Six of those pages share one more ADC-local collaborator for the moment after a write: CommittedWriteReload (Pages/Common/CommittedWriteReload.cs:16), held as a _writeReload field by EventDetail, ConferenceCategoryDetail, QuestionDetail, SponsorDetail, PartnerDetail, and ActivityDetail (Pages/Events/EventDetail.razor.cs:79, Pages/Categories/ConferenceCategoryDetail.razor.cs:55, Pages/Questions/QuestionDetail.razor.cs:64, Pages/Sponsors/SponsorDetail.razor.cs:66, Pages/Partners/PartnerDetail.razor.cs:66, Pages/Activities/ActivityDetail.razor.cs:74). It covers a write the server committed whose follow-up reload then fails (a timeout, an open circuit, a transient 5xx): the write is done, so the page leaves edit mode and says it saved, but it still holds the record and row version from before the write (Pages/Common/CommittedWriteReload.cs:9 to :15). TryAdopt takes the reload's Result, adopting the refreshed record on success and otherwise marking the page stale and raising the page's localized "saved, but not refreshed" warning instead of reporting the write as failed (:31, stale at :39 to :40, called with Snackbar.SavedRefreshFailed at Pages/Sponsors/SponsorDetail.razor.cs:169). EnsureCurrentAsync runs before the next edit or write: a page that is not stale gets its held record back unchanged, while a stale page re-reads the record so the form shows, and the write posts, what the server holds, rather than a row version the API refuses with 409 or 412 until a manual page reload; a failed re-read is reported through the page's toast and localizer and the page stays stale (:55, re-read at :67, failure at :74, called at Pages/Sponsors/SponsorDetail.razor.cs:126). EventDetail adopts through it on three write paths: a save, a publish-state change with a caller-supplied stale message, and the Sessionize refresh, whose reload arrives inside the SessionizeRefreshOutcome (Pages/Events/EventDetail.razor.cs:200, :259, :337). [Rubric §29, Resilience].
Editable fields are not loose page state. Each entity declares an abstract form model carrying its DataAnnotations, and the create page and the detail page's inline editor each bind a sealed subclass of it: EventFormModel with EventCreateModel and EventEditModel (Pages/Events/EventFormModel.cs:27, Pages/Events/EventCreateModel.cs:11, Pages/Events/EventEditModel.cs:11), and the same triad for sessions, speakers, rooms, questions, sponsors, partners, activities, and conference categories (SessionFormModel Pages/Sessions/SessionFormModel.cs:24, SpeakerFormModel Pages/Speakers/SpeakerFormModel.cs:25, RoomFormModel Pages/Rooms/RoomFormModel.cs:24, QuestionFormModel Pages/Questions/QuestionFormModel.cs:24, SponsorFormModel Pages/Sponsors/SponsorFormModel.cs:25, PartnerFormModel Pages/Partners/PartnerFormModel.cs:18 with PartnerCreateModel Pages/Partners/PartnerCreateModel.cs:10 and PartnerEditModel Pages/Partners/PartnerEditModel.cs:10, ActivityFormModel Pages/Activities/ActivityFormModel.cs:26, ConferenceCategoryFormModel Pages/Categories/ConferenceCategoryFormModel.cs:24). The speaker's own profile editor on the dashboard gets a model of its own, SpeakerProfileEditModel, carrying the six fields a speaker may edit under the same caps and absolute-URL rule the organizer form applies to them, so a malformed link is refused on the client instead of only by the API (Pages/Speakers/SpeakerProfileEditModel.cs:18, rationale at :7 to :17, held at Pages/Speakers/SpeakerDashboard.razor.cs:69). The rules live once: the MudForm fields bridge to the annotations through Common's ModelValidation rather than repeating Required/RequiredError per field, the length caps come from the DTO's own constants, and every ErrorMessage is a resource key resolved by the localizing DataAnnotationsModelValidator (ADR-027). PartnerFormModel is the compact worked example: its four text rules take their caps from PartnerDTO.NameMaxLength, DescriptionMaxLength, LogoUrlMaxLength, and WebsiteUrlMaxLength (Pages/Partners/PartnerFormModel.cs:28, :32, :37, :42), the missing-value key is a single const shared by the model's [Required] and the field's RequiredError affordance so the two can never drift (:24, :27), the two URL fields carry Common's AbsoluteUrl rule (:36, :41), and the one enum field defaults to PartnerType.Community on the stated rationale that, unlike a sponsorship tier, a partner type carries no commercial weight (:45 to :49). The subclasses own only the direction of travel: EventCreateModel.ToNew() builds the posted DTO and always as an unpublished draft, because publishing is a separate gesture on the detail page (Pages/Events/EventCreateModel.cs:25 to :42), while EventEditModel.LoadFrom(source) copies the loaded event into the editor in one call and ToUpdated(source) writes the edited values over the identity, row version, and published state that were loaded (Pages/Events/EventEditModel.cs:18, :48). Because both pages bind the same EventFormFields.razor component to an instance of the same base, a value the create page accepts is a value the detail page accepts. [Rubric §1, SOLID] and [Rubric §15, Best Practices & Code Quality]. The one model with no create page to mirror follows the same discipline anyway: ConferenceCategoryItemEditModel declares the inline item form's rules against CategoryItemDTO's own length constant (Pages/Categories/ConferenceCategoryItemEditModel.cs:19 to :31).
Two of the event form's fields cannot be checked by a length cap, and each gets a client rule that mirrors the server's so the form gives the verdict the API would rather than sending the user on a round trip to be refused. IanaTimeZoneAttribute resolves the typed identifier with the non-throwing TimeZoneInfo.TryFindSystemTimeZoneById (Pages/Events/IanaTimeZoneAttribute.cs:30, check at :48), which .NET answers from the same IANA set on the Blazor Server host, the WebAssembly head, and the MAUI heads (:23 to :27); a typo such as America/New York used to pass every client rule, and the time zone is the one field on that form where the refusal is not obvious from the value (:6 to :10). SessionizeCodeAttribute calls the shared SessionizeCodeFormat.IsValid from the module's Shared project rather than restating the charset (Pages/Events/SessionizeCodeAttribute.cs:23, call at :41), because that charset is a security control and not a cosmetic one: the import resolves a relative URI from the stored code, so a value carrying a slash or a colon could redirect the import to a foreign host, and a client copy that drifted from the server's would be worse than no client rule at all (:10 to :16). Both rules pass on null, empty, and whitespace, leaving presence to [Required] so a blank required field shows one message instead of two (IanaTimeZoneAttribute.cs:43 to :46, SessionizeCodeAttribute.cs:36 to :39), and both emit ErrorMessage unchanged rather than formatting it, which is exactly what lets a model declare a resource key there and have the localizing validator resolve it (IanaTimeZoneAttribute.cs:15 to :21). [Rubric §24, Forms, Validation & UX Safety].
Container and presentational split, and page-local collaborators
The behaviour-heavy screens do not keep everything in one code-behind: the page stays the container (data fetching, filter and paging state, service calls) and hands rendering to presentational children that receive parameters and raise callbacks. PublicSessionList is the fullest example, splitting into PublicSessionListFilterBar (privileged event picker or locked chip, debounced title search, room picker, All Sessions / My Schedule toggle, share action, Pages/Public/Sessions/PublicSessionListFilterBar.razor.cs:16) and PublicSessionListView (the mobile card list, the desktop grid, and the inline bookmark stars, Pages/Public/Sessions/PublicSessionListView.razor.cs:24), which exposes Grid and ReloadAsync back to the page so the base class's grid plumbing keeps working unchanged. The same split shows up on the category detail page via ConferenceCategoryItemsPanel, which owns the item table and its inline add/edit rows and hands the reloaded aggregate back through CategoryChanged (Pages/Categories/ConferenceCategoryItemsPanel.razor.cs:23, :33), on the speaker detail page via SpeakerCategoryItemsPanel (Pages/Speakers/SpeakerCategoryItemsPanel.razor.cs:18), and on the selection dashboard via SessionSelectionSpeakerOverlap and SessionSelectionAiScores (Pages/Sessions/Selection/SessionSelectionSpeakerOverlap.razor.cs:11, Pages/Sessions/Selection/SessionSelectionAiScores.razor.cs:12).
A second, quieter move keeps the code-behinds small: pure logic is lifted out into page-local collaborators, plain classes beside the page rather than registered services, each explicitly extracted to keep the component within the [Rubric §18] line budget. SessionSelectionDisplay holds the score colors and filter predicates the dashboard and its two children share (Pages/Sessions/Selection/SessionSelectionDisplay.cs:13, score color at :20); SessionStatusDisplay is the one status-to-color map for session status chips, shared by the organizer session list and the selection dashboard's children so a status reads the same color on every page (Pages/Sessions/SessionStatusDisplay.cs:11, map at :13, read at Pages/Sessions/SessionList.razor:87, Pages/Sessions/Selection/SessionSelectionAiScores.razor:79, Pages/Sessions/Selection/SessionSelectionSpeakerOverlap.razor:68); SessionSelectionFilters holds the five bound filter values and the option lists derived from the loaded board (Pages/Sessions/Selection/SessionSelectionFilters.cs:13, projection in SessionSelectionFilterOptions at Pages/Sessions/Selection/SessionSelectionFilterOptions.cs:12); PublicSessionListFilterState translates that page's filters to and from the persisted string map (Pages/Public/PublicSessionListFilterState.cs:12), and four more classes beside that page hold its event catalog, its bookmark state, its event-scope retry, and its overlapping grid loads (the public rendering section below walks them); PublicScheduleRoomOptions builds the room picker out of events the page already loaded, so narrowing by room costs no extra fetch, and re-validates the active room against the newly scoped list rather than leaving a filter that matches nothing (Pages/Public/PublicScheduleRoomOptions.cs:13); SessionLookups caches the session detail page's dictionaries per page instance, re-fetching rooms when the session's event changes (Pages/Sessions/SessionLookups.cs:32); SpeakerUserSearch fans three parallel IUserUIService lookups out and unions them, because GetPagedAsync ANDs its filters server-side and one call with all three set would return the empty intersection (Pages/Speakers/SpeakerUserSearch.cs:12, :47 to :51); and ADCHomeContent holds the landing page's editorial data (Pages/Home/ADCHomeContent.cs:15). All of them are testable without rendering anything. [Rubric §28, Front-End Testing] and [Rubric §14, Testability].
Child-and-join entities: a thin POST/DELETE base
Sessions and speakers own join relationships (a speaker added to a session, a category item to a session or a speaker) that the generic CRUD base cannot model, because the write carries a parent id. These get three near-identical services (SessionSpeakerService, SessionCategoryItemService, SpeakerCategoryItemService) over the shared ChildEntityServiceBase from MMCA.Common.UI, which every consumer module reuses. Each Conference join service reduces to supplying its endpoint and adding typed AddAsync/DeleteAsync wrappers over the base's two verbs (Services/Common/ChildEntityServices.cs:21, :34, :47), and their three interfaces live together in one file (Services/Common/IChildEntityUIService.cs:13, :25, :37). Note the hard-won detail, now enforced by a helper rather than by discipline: the add payload always names the parent explicitly (new { SessionId = sessionId, SpeakerId = speakerId }, Services/Common/ChildEntityServices.cs:25), and every removal appends its owning aggregate's id through ChildEntityDeletePath, which builds the {childId}?{parent}={parentId} suffix with the parent id escaped (Services/Common/ChildEntityServices.cs:62, built at :64 to :72, called at :28, :41, :54). The join controllers remove a row by loading the parent aggregate and asking it to drop the child, and they bind the parent id as a required query value, so a DELETE sent without it is refused with 400 before any handler runs while the UI reports a generic failure (Services/Common/ChildEntityServices.cs:13 to :20).
Display-enrichment lookups: the GetAll-vs-GetById populator gap, worked around in the UI
Because the API's list endpoints do not always populate every cross-entity navigation, several pages need a cheap id-to-name map to render speaker names beside a session or an event name beside a room, a sponsor, a partner, or an activity. Three lookup services fill that role, SpeakerLookupService, EventLookupService, and CategoryItemLookupService (behind ISpeakerLookupService, IEventLookupService, and ICategoryItemLookupService). Each reads its whole entity set through Common's PagedReadAll, which pages the /paged endpoint in stable id order with children and foreign keys suppressed until the server's reported total is reached, because a single read truncates silently at the API's 500-row page-size clamp (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:18, page size at :22, URL at :43, rationale at :13 to :17); each page is a GET through IdempotentReadRetry, and the rows fold into a Dictionary of lightweight projection records, SpeakerInfo, EventInfo, CategoryItemInfo (Services/Speakers/SpeakerLookupService.cs:29, read at :57 to :67, fold at :76 to :86; Services/Events/EventLookupService.cs:30; Services/Categories/CategoryItemLookupService.cs:21; records at Services/Speakers/ISpeakerLookupService.cs:9, Services/Events/IEventLookupService.cs:14, Services/Categories/ICategoryItemLookupService.cs:9). All three memoize their read per scope (one server circuit, or one WebAssembly app instance) for five minutes, the event and speaker TTLs matched to the server-side output-cache policies, through Common's ScopedMemo<T>: concurrent callers within one scope share one in-flight fetch, so the overlapping loads EventFilteredListPageBase starts cost one round trip and an attendee moving between the public session list and a session page pays one speaker read rather than one per navigation, and only a successful read is kept, so a failed one is retried on the next call rather than cached (Services/Events/EventLookupService.cs:14 to :21, TTL at :40, memo at :42 to :43; Services/Speakers/SpeakerLookupService.cs:14 to :20, TTL at :39; Services/Categories/CategoryItemLookupService.cs:13 to :19, TTL at :25). The sibling event reads (ADCHome among them) deliberately keep their own URLs and caching, because they ask narrower questions of the same controller (Services/Events/EventLookupService.cs:24 to :27). The speaker memo is per scope rather than per process because its payload is role-dependent (BR-239: a privileged caller sees speakers the public projection hides), so it must never be shared across users (Services/Speakers/SpeakerLookupService.cs:23 to :25). Each interface exposes an Invalidate that the write services call (Services/Events/IEventLookupService.cs:35, Services/Speakers/ISpeakerLookupService.cs:26, Services/Categories/ICategoryItemLookupService.cs:28), and organizers who write bypass the server's output cache, so that drop is what keeps their own edits visible. EventInfo is the one projection that grew a feature-specific field: SponsorshipPacketUrl is an optional trailing parameter defaulting to null precisely so the many call sites that need only identity and dates stayed unchanged, and only the public sponsor page reads it (Services/Events/IEventLookupService.cs:10 to :21, read at Pages/Public/Sponsors/PublicSponsorList.razor.cs:88). The organizer detail pages use the same map for a plain display concern: PartnerDetail shows the owning event's name and falls back to the raw id when the lookup is unavailable, rather than failing the page over a label (Pages/Partners/PartnerDetail.razor.cs:25, :39 to :42). This is a deliberate client-side join over the navigation-populator (ADR-002) gap between the API's list and by-id read shapes.
One page needed three of these together, and got a composite rather than three nullable caches and three failure branches: SpeakerDetailLookupService gathers the category items, their owning category titles, and the question texts into a single SpeakerDetailLookups record answered as one Result, short-circuiting on the first failure (Services/Speakers/SpeakerDetailLookupService.cs:13, record at Services/Speakers/ISpeakerDetailLookupService.cs:14, interface at :25). The same "one call, one failure branch" instinct produced SessionizeRefreshOutcome above and SessionLookups beside the session detail page.
Three feature areas that go beyond CRUD
First, the speaker self-service dashboard. SpeakerDashboard sits behind a plain [Authorize] attribute and is gated on the speaker_id JWT claim, showing the linked speaker's profile, sessions, and per-session bookmark counts (Pages/Speakers/SpeakerDashboard.razor.cs:27, summary at :20 to :25). The sessions are narrowed to the current or next event, resolved through IEventLookupService and CurrentEventSelector, falling back to all of the speaker's sessions when no event resolves (Pages/Speakers/SpeakerDashboard.razor.cs:21 to :22, narrowed at :204, resolver at :228). A speaker is not a privileged reader, so a submission still under review does not appear there, which the empty-state copy names (:23 to :25). The page also hosts the speaker's own profile editor over SpeakerProfileEditModel, validated through Common's ModelValidation and the localizing validator, with the dirty check comparing the edited model against the loaded speaker (:69, validator at :95, dirty check at :271). It leans on SpeakerDashboardService (behind ISpeakerDashboardUIService at Services/Speakers/ISpeakerDashboardUIService.cs:10), whose session read pushes the speaker filter server-side onto the virtual SpeakerId key, caps the page at 100 rows, and appends a per-call cache-bust parameter so this one read is a guaranteed miss against the shared sessions output cache and a just-made assignment shows immediately, while public list reads keep their cache (Services/Speakers/SpeakerDashboardService.cs:14, :19, :35, :38). Its bookmark counts come back from one batched endpoint rather than one hop per session (Services/Speakers/SpeakerDashboardService.cs:45), and it derives from Common's AuthenticatedServiceBase so its calls carry the bearer token and run through the shared retry policy. [Rubric §12, Performance & Scalability].
Second, organizer feedback moderation (BR-53). OrganizerEventFeedback and OrganizerSessionFeedback let organizers review and delete answers through OrganizerEventFeedbackService and OrganizerSessionFeedbackService (Pages/Feedback/OrganizerEventFeedback.razor.cs:18, Pages/Feedback/OrganizerSessionFeedback.razor.cs:18, services at Services/Feedback/OrganizerFeedbackService.cs:14, :56, behind IOrganizerEventFeedbackUIService and IOrganizerSessionFeedbackUIService at Services/Feedback/IOrganizerFeedbackUIService.cs:11, :27). The read is every answer for the one event or session, paged through PagedReadAll until the reported total, so the report never aggregates a truncated answer set (Services/Feedback/OrganizerFeedbackService.cs:24 to :26), and each delete passes the parent id explicitly on the query string to satisfy the controller's binding (Services/Feedback/OrganizerFeedbackService.cs:45, :87). The questions the report groups by come through the same pager: QuestionUIServiceExtensions adds GetAllForEntityAsync to IQuestionUIService, which reads every question of an owning entity type ordered by Sort and fails with PagedReadAll.TruncatedCode rather than answering a partial list when the pager's runaway guard stops the read (Services/Questions/QuestionUIServiceExtensions.cs:8, method at :20, pager at :32, rationale at :11 to :14, called at Pages/Feedback/OrganizerEventFeedback.razor.cs:88 and Pages/Feedback/OrganizerSessionFeedback.razor.cs:85). [Rubric §11, Security]: the scoping is server-side and the pages carry [Authorize(Roles = "Organizer")], not a client-side hide.
Third, QR self-service. SpeakerQr renders a full-screen code a speaker can hold up at the podium, and the code itself needs no backend call: the speaker comes from the speaker_id claim and the payload is built locally, so the code renders on the prerender pass as readily as on the interactive one (Pages/Speakers/SpeakerQr.razor.cs:24, rationale at :15 to :17, claim read at :56). The one read is the name printed beside the code, so whoever scans can see whose profile they are about to open: the linked speaker's full name through ISpeakerUIService, whose self-read carve-out serves a speaker their own profile even while it is not public, with the account name standing in when that read fails (:17 to :19, fallback at :54, read at :66). The payload is always the absolute public URL from Common's IPublicLinkBuilder (Pages/Speakers/SpeakerQr.razor.cs:26, :62), never the WebView-internal origin, or a code scanned off the MAUI head would open for nobody else. The framework's QrCodeButton puts the same capability on five organizer and public print surfaces: public event detail (Pages/Public/Events/PublicEventDetail.razor:31), public session detail (Pages/Public/Sessions/PublicSessionDetail.razor:51), public speaker detail (Pages/Public/Speakers/PublicSpeakerDetail.razor:47), room detail (Pages/Rooms/RoomDetail.razor:64), and sponsor detail (Pages/Sponsors/SponsorDetail.razor:73).
Session materials, a resource deliberately not shaped as CRUD
Speakers publish the decks, handouts, and links that go with their own sessions, and anyone downloads them from the public session page (ADR-123, speaker session assets). This is the one area here that does not get an IEntityService<,>. ISessionAssetUIService declares exactly the five operations the API offers, GetBySessionAsync, AddLinkAsync, UploadFileAsync, UpdateAsync, and DeleteAsync (Services/SessionAssets/ISessionAssetUIService.cs:32, :41, :55, :72, :82), with the rationale recorded on the interface itself (:11 to :16): the endpoint has no paged list, no lookup, and no by-id read (an asset is only ever fetched as part of its session's list), and its two creates are different verbs on different routes. Declaring only what exists keeps a page from reaching for a CRUD method with no endpoint behind it. The two write bodies sit beside the service as SessionAssetLinkRequest and SessionAssetUpdateRequest (Services/SessionAssets/SessionAssetRequests.cs:14, :35) rather than being reused from the Application layer, because the UI RCL references the module's Shared project only (SessionAssetRequests.cs:7 to :13); neither carries the caller's identity, which the API stamps from the token, so a request body can never claim to be a speaker it is not. [Rubric §9, API & Contract Design].
SessionAssetService derives from Common's AuthenticatedServiceBase (Services/SessionAssets/SessionAssetService.cs:26) and is the clearest worked example in this library of per-verb transport policy. Adding a link appends a row, so that POST carries an Idempotency-Key and keeps the shared retry policy (:61, :74). The file POST carries the key but has no retry at all: a picked file's stream is single-shot (neither a browser file input nor a native picker rewinds), so a second attempt would post an exhausted body, while a repeated key replays the stored response instead of re-uploading 50 MB over venue wifi (:86 to :91, :108, :135). The upload streams straight from the browser file into the multipart body with the cap stated to OpenReadStream, because Blazor's 512 KB default would otherwise truncate every real deck (:112, note at :110 to :111), and the four part names match the controller's IFormFile parameter and its [FromForm] arguments exactly (:128 to :133). The update is conditional (the ADR-035 rule): the edited row version travels as If-Match through ConcurrencyETag, and a DTO carrying no token sends no header, so the API refuses with 428 rather than overwriting another editor's change (:154 to :156, header applied at :209 to :212). Both the key and the precondition are default headers on a client built once per logical operation, so every retry attempt states the same pair (:200, reasoning at :193 to :199). [Rubric §29, Resilience].
Three components consume that service. SessionAssetsPanel is the management half (Pages/SessionAssets/SessionAssetsPanel.razor.cs:31), a component rather than a page, so the organizer session detail page and a speaker's own dashboard host it by saying only which session and whether the viewer may manage it (parameters at :36, :42). CanManage decides only what the panel offers: the right itself is re-checked by the API on every write (a privileged role, or a speaker whose speaker_id claim is on the session), so a viewer who reaches a hidden control still gets SessionAsset.Forbidden (:20 to :22). [Rubric §11, Security]. The panel enforces the two limits client-side as courtesy rather than as the rule: the per-session cap closes the add controls and short-circuits both writes (:69, :110, :144, the constant SessionAssetLimits.MaxAssetsPerSession = 10 at MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/SessionAssets/SessionAssetLimits.cs:27), and the size check runs before the post so a speaker does not wait out a whole 50 MB upload on venue wifi to be told no (:151, cap at SessionAssetLimits.cs:11). Every refusal is worded from the API's machine-readable error code through a resource-key table, so SessionAsset.UnsupportedFormat, SessionAsset.LimitReached, and SessionAsset.StorageNotConfigured each read in the selected language instead of echoing the server's English sentence (ADR-027); Http.413 is the one transport status in that table, because Kestrel refuses an over-cap body before the friendly check ever runs (:252, entry at :279). And every write funnels through one MutateAsync shape: run it, report the refusal or the success, run the caller's own reset, reload the list (:214, value-returning adapter at :245).
SessionAssetComposer is the "add a material" half, split out of that panel so the panel keeps the list, the writes, and the status region while the composer owns only the draft the speaker is typing (Pages/SessionAssets/SessionAssetComposer.razor.cs:24, rationale at :6 to :9). It performs no write of its own: a well-formed link is raised on OnAddLink with its address already normalized, a refused address is raised on OnInvalidLinkAddress so the panel words the refusal in its own single aria-live region rather than growing a second one, and a picked file is raised untouched on OnFileSelected before any size or format check (:33 to :40, remarks at :12 to :17). The draft is cleared by the panel through ClearDraft rather than optimistically here, because only the panel knows whether the write actually succeeded and an EventCallback cannot report an outcome back to its raiser (:52 to :57, remarks at :18 to :22, called at SessionAssetsPanel.razor.cs:128 with the reference held at :67). One small detail earns its comment: the file input's id is per-instance rather than fixed, because a page can render one panel per session and a duplicated id would point the label at the wrong picker (:42 to :44). [Rubric §18, UI Architecture & Component Design].
SessionAssetsDownloadList is the public read-only half, embedded in the public session page (Pages/SessionAssets/SessionAssetsDownloadList.razor.cs:18, hosted at Pages/Public/Sessions/PublicSessionDetail.razor:121). It is anonymous because the list endpoint is, and a reader who cannot see the session gets an empty list rather than a refusal. A load failure here is deliberately silent: the materials are supplementary to the session page, so the section simply does not render rather than raising an alert for something the reader never asked for (:13 to :17, :48). Both components reload only when the session id actually changes (:36 to :43, panel at SessionAssetsPanel.razor.cs:71 to :78), and both swallow OperationCanceledException from disposal or the InteractiveAuto render-mode transition (SessionAssetsDownloadList.razor.cs:50). The presentation decisions they would otherwise duplicate live once in SessionAssetDisplay (Pages/SessionAssets/SessionAssetDisplay.cs:13): the icon that names an asset by kind and by format so a reader can tell a deck from an archive before clicking (:27), and a byte count split into an amount plus the resource key naming its unit, which the caller composes through its own localizer so a Spanish reader reads "1,4 MB" (:56). The extension is read off the stored blob name first, because a blob URL can carry a signature query string and taking the extension from that would yield the query rather than the format (SessionAssetDisplay.cs:79 to :86). [Rubric §18, UI Architecture & Component Design] and [Rubric §27, Internationalization & Localization].
Session-selection decision support, the asynchronous edge
The most behaviour-rich page is the organizer-only SessionSelectionDashboard (Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:16), which renders category distribution, speaker overlap, locality breakdown, and AI content-similarity scoring over an event's session pool via SessionSelectionService (Services/Sessions/Selection/SessionSelectionService.cs:14, behind ISessionSelectionUIService). Every load is stamped with a monotonic generation rather than an event id, so switching away from an event and back still discards the first response even though both carry the same id: the generation is snapshotted before the fetch, re-checked before the board is replaced or an error banner is painted, and re-checked again before the spinner is cleared. Filter options are recomputed from the returned SessionSelectionDashboardDTO itself. [Rubric §19, State Management & Data Flow].
Scoring is the asynchronous edge. ScoreSessionsAsync POSTs to the scoring endpoint with no retry pipeline, because starting a run is not idempotent and a retried POST could queue a second run behind the first (Services/Sessions/Selection/SessionSelectionService.cs:46 to :48). Because AI scoring of every eligible session can take minutes, the API does not run the pass inline: SessionSelectionController schedules a ScoreEventSessionsInternalCommand through the durable IInternalCommandScheduler and answers 202 Accepted with no body once it is queued (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Sessions/SessionSelectionController.cs:98 to :144, command at MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Sessions/UseCases/DecisionSupport/ScoreEventSessions/ScoreEventSessionsInternalCommand.cs:36), so the service reads the status before the body reader (which treats a body-less 2xx as a failure) and maps it to a sentinel ScoreEventSessionsResultDTO with SessionsScored = -1 (Services/Sessions/Selection/SessionSelectionService.cs:54 to :57). The page turns that sentinel, and only that sentinel, into a fire-and-forget polling session, leaving its scoring flag set for the poll loop to clear while every other branch clears it inline.
The loop itself is factored into three pieces, which is the part worth studying. ScorePollSession runs the polling (Pages/Sessions/Selection/ScorePollSession.cs:36, RunAsync at :51), re-reading the cadence through the host on every tick so a bUnit test can shrink it (:69) and abandoning the session the moment the page's generation moves (:70, :76). ScorePollHost is the record of callbacks through which that loop raises its UI side effects, so no rendering decision lives in the loop and none of the loop lives on the component (Pages/Sessions/Selection/ScorePollSession.cs:19). And ScorePollTracker is the pure state machine that turns each observation into a ScorePollSignal: keep polling, apply-and-continue, all sessions scored, counts stable long enough, or no scores at all within the zero-progress budget (Pages/Sessions/Selection/ScorePollTracker.cs:33, signal enum at :8). Its budgets are explicit constants, each with its sizing reason beside it: 225 polls for a 30-minute cap at the 8-second cadence (:36), 5 consecutive fetch failures (:43), 15 zero-progress polls, which must outlast the internal-command poll that picks the run up (60 seconds in production) plus the first scoring call (:51, reason at :45 to :50), and 6 stable polls before completion, long enough to outlast one 30-second scoring call and its save so a single slow call mid-pass does not read as the end of the run (:58, reason at :53 to :57). Progress counts only scores this run wrote: the session receives each already-scored session's ScoredOn as a baseline when the run starts and counts against it on every tick (Pages/Sessions/Selection/ScorePollSession.cs:48, :99). Because the service answers a server error with a failed Result rather than an exception, the consecutive-failure budget is fed from the result branch, or a persistently failing endpoint would poll silently to the cap without ever reporting (Pages/Sessions/Selection/ScorePollSession.cs:86, success read at :93). [Rubric §6, CQRS & Event-Driven] and [Rubric §29, Resilience].
Public versus authenticated rendering, and the offline-first path
A recurring [Rubric §11, Security] pattern: the same conference entity is exposed through two page families. No page under Pages/Public/ carries an @attribute [Authorize] at all, and those reads are output-cached at the API; the organizer family gates on the Organizer role in markup (Pages/Events/EventList.razor:2). PublicSessionList shows the nuance well. It is read-only for anonymous users (BR-43), but an authenticated user gets inline bookmark stars and a My Schedule toggle wired through the optional ISessionBookmarkUIService; because Blazor's [Inject] has no optional mode (an unregistered service throws at render), the page declares that dependency as a nullable property and resolves it via IServiceProvider.GetService, so it stays null when the Engagement module is disabled (Pages/Public/Sessions/PublicSessionList.razor.cs:35 to :37, resolved at :156). [Rubric §7, Microservices Readiness]. Who counts as privileged is one shared call: PublicReadAudience awaits the cascaded authentication state and tests it against the privileged-reader list ConferenceReadAudience, degrading a faulted state to the public (least-privileged) audience while letting a cancellation propagate, so an unreadable auth state never breaks a public page (Pages/Public/PublicReadAudience.cs:10, IsPrivilegedReaderAsync at :18, role test at :28, fault filter at :31), and the public session, speaker, and event pages all ask it rather than repeating the check (Pages/Public/Sessions/PublicSessionEventCatalog.cs:63 on the session list's behalf, Pages/Public/Speakers/PublicSpeakerList.razor.cs:121, Pages/Public/Events/PublicEventList.razor.cs:72, Pages/Public/Events/PublicEventDetail.razor.cs:67). Non-privileged readers are always locked to the computed current or next event via CurrentEventDefaults, so a shared privileged URL cannot pin an attendee to a different or unpublished event (Pages/Public/Sessions/PublicSessionEventCatalog.cs:146 to :161); when the events fetch failed and no scope resolved, a public reader's session query fails closed instead of running unscoped (PublicSessionEventCatalog.cs:72, :96, refused at Pages/Public/Sessions/PublicSessionList.razor.cs:325 to :328, :360), and only a privileged reader's resolved event choice is persisted at all (PublicSessionList.razor.cs:124, Pages/Public/PublicSessionListFilterState.cs:12).
PublicSessionList itself stays a container by handing its state to four page-local collaborators beside it, each kept out of the page for the code-behind size convention (Pages/Public/Sessions/PublicSessionList.razor.cs:43 to :50). PublicSessionEventCatalog loads the reader's audience, the events with their rooms, and the speaker lookup, resolves the default event, rescopes the room picker, and adds the title, event, and room filters to every query, while the page keeps only the toasts (Pages/Public/Sessions/PublicSessionEventCatalog.cs:17, load at :57, filters at :122, toasts at PublicSessionList.razor.cs:208 to :223). PublicSessionBookmarkState owns who the reader is and which sessions they starred; it starts eagerly from initialization because the grid's first ServerData call can race ahead of it, and a failed bookmark read in My Schedule mode is re-issued once and then surfaced as an error rather than as an empty schedule (Pages/Public/Sessions/PublicSessionBookmarkState.cs:14, StartLoad at :38, EnsureAsync at :51, started at PublicSessionList.razor.cs:176 to :177). PublicSessionEventScope holds the events lookup the grid loads wait on: each load re-issues a failed lookup at most once, loads that waited on the same failed lookup share one retry, and its Pending flag holds the load-failed state (and its Retry button) back while a lookup may still succeed (Pages/Public/Sessions/PublicSessionEventScope.cs:14, Pending at :23, EnsureAsync at :36, read at PublicSessionList.razor.cs:227 to :233). And NewestLoadTracker<T> answers overlapping grid loads with the newest load's result, because MudDataGrid applies whichever ServerData call completes last rather than the newest one, and a load superseded while it waited on the event scope would otherwise paint its own empty page (Pages/Public/Sessions/NewestLoadTracker.cs:14, rationale at :7 to :12, Track at :24, wired at PublicSessionList.razor.cs:279 to :280). The page also refuses to show a signed-out reader the full programme under a "My Schedule" title: on the interactive pass the ?mine=true deep link sends them to sign in first, and a restored My Schedule state is cleared once the reader is known to be anonymous (PublicSessionList.razor.cs:159 to :171, redirect at :198 to :202, cleared at :146 to :152, called at :140 and :188 to :189); while that redirect is in flight the grid fetch answers an empty page rather than querying (:308 to :311). The same shortcut can also arrive on a list that is already open: the page rewrites its URL without mine after its first load, so a later tap turns the value from unset to true with no fresh initialization. A fifth small collaborator, MyScheduleArrival, tells that case apart by remembering the last value and whether a first parameter set has been seen, so it reports an arrival only for a later mine=true and leaves the fresh load to OnInitializedAsync (Pages/Public/Sessions/MyScheduleArrival.cs:9, Arrived at :17, test at :19, rationale at :3 to :8). The page holds one instance and asks it from OnParametersSetAsync, sending a signed-out reader to sign in exactly as a fresh load would, while a signed-in reader is already switched by the filter restore (PublicSessionList.razor.cs:59, :105 to :112, remarks at :103 to :104). [Rubric §19, State Management & Data Flow] and [Rubric §18, UI Architecture & Component Design].
The single write on the public session detail page is extracted into its own component rather than growing the page: SessionBookmarkButton is the add-to / remove-from My Schedule toggle for one session, given only a session id and resolving everything else itself, so the page holds no bookmark state at all (Pages/Public/Sessions/SessionBookmarkButton.razor.cs:27, parameter at :38, hosted at Pages/Public/Sessions/PublicSessionDetail.razor:157). It repeats the optional-dependency move verbatim, resolving the Engagement-owned service through IServiceProvider.GetService and no-opping on every action when it is absent, so a deployment without Engagement renders exactly the same inert button it always did (:29, :33, resolved at :56, no-op guards at :75 and :109, reasoning at :18 to :25). It also skips its read during SSR prerender for the same reason the hosting pages skip theirs: under InteractiveAuto the interactive instance re-runs OnParametersSetAsync, so every visit would fetch the reader's bookmarks twice, and the prerender pass renders the unset star (:59 to :64). [Rubric §23, Front-End Performance & Rendering].
The public event page carries the one piece of third-party embedding in this library, and it is classified rather than trusted. VenueMapLinks decides whether a stored venue map URL is a Google Maps embed link, which Google serves only inside an iframe and which answers "The Google Maps Embed API must be used in an iframe" when opened as a top-level page (Pages/Public/Events/VenueMapLinks.cs:10, doc note at :3 to :9). The test is deliberately narrow: https only, one of three Google hosts, and either a /maps/embed path or a /maps path carrying output=embed (:16, :23 to :41); anything else keeps opening as an ordinary external link (Pages/Public/Events/PublicEventDetail.razor:73, :93, external link at :104). The host allow-list is not cosmetic: the page CSP's frame-src has to permit exactly those origins, a coupling recorded next to the array (VenueMapLinks.cs:14 to :15). The companion BuildSearchUrl escapes the venue street address into a regular (non-embed) Maps search link, and answers null when there is no address to search for, so the affordance is absent rather than dead (:48 to :51, used at PublicEventDetail.razor:86). PublicEventDetail is Pages/Public/Events/PublicEventDetail.razor.cs:18. [Rubric §11, Security].
The offline-first behaviour that used to sit in the page now lives behind an interface. IPublicSessionScheduleService / PublicSessionScheduleService run the live paged query and compose it with the framework's OfflineFirstPageSnapshot<TItem>, keeping the last successful first page in the device-local cache so a dead venue network still shows a programme (ADR-042 Wave 3, Services/Public/IPublicSessionScheduleService.cs:34, Services/Public/PublicSessionScheduleService.cs:20). The live path is never altered: the snapshot is consulted only when a fetch fails, a failure with nothing cached travels on to the grid's own handling unchanged, and the page owns only the "showing cached data" banner it raises through a callback (Pages/Public/Sessions/PublicSessionList.razor.cs:337, :366 to :377). The request is built once, so the fallback judges exactly the request a live fetch would send and never answers a My Schedule or narrowed request with the cached programme (:315 to :323). The one other door to the snapshot is a page whose query cannot run at all (a failed bookmark read, or an unresolved public scope): offline, the cached programme answers before either gate fails the page, since a dead venue network fails both reads alike, while online the snapshot never answers (:325 to :328, :340 to :361). One page request is one SessionSchedulePageRequest (Services/Public/IPublicSessionScheduleService.cs:20), and My Schedule rides it as a set of bookmarked ids that scope the query server-side with an Id IN (...) filter rather than over-fetching and filtering in memory; an empty schedule short-circuits before the service is reached, so it can never overwrite the cached programme with nothing (Pages/Public/Sessions/PublicSessionList.razor.cs:330 to :335, live fetch at :337).
The rest of the device-capability layer (G26) shows up as injected interfaces that no-op on the web heads: the star toggle fires IHapticFeedbackService (Pages/Public/Sessions/PublicSessionListView.razor.cs:27, and again on the extracted toggle at Pages/Public/Sessions/SessionBookmarkButton.razor.cs:31), the filter bar shares a schedule screenshot through IScreenshotService and IShareService (Pages/Public/Sessions/PublicSessionListFilterBar.razor.cs:16), the public activity page opens directions through IMapNavigationService (Pages/Public/Activities/PublicActivityList.razor.cs:31), and /conference/sessions?mine=true is a deep link the MAUI head's home-screen quick action targets, which beats the saved page state when present, and is honoured on a list that is already open through MyScheduleArrival (Pages/Public/Sessions/PublicSessionList.razor.cs:70 to :71, applied at :159, restore override at :135 to :138, later arrival at :108). [Rubric §29, Resilience] and [Rubric §22, Responsive & Cross-Browser/Device].
Sponsors, partners, and activities, three feature areas in miniature
The sponsor surface is a compact tour of every pattern above. Organizers manage the roster through SponsorList / SponsorCreate / SponsorDetail: the list is an EventFilteredListPageBase<SponsorDTO> that inherits the default-event resolution and persistence wholesale (Pages/Sponsors/SponsorList.razor.cs:19), and the detail page edits every field except the owning event, on the stated rationale that moving a sponsorship between events is a create plus a delete (Pages/Sponsors/SponsorDetail.razor.cs:16 to :18). Attendees see the same data twice. PublicSponsorList resolves the featured event, filters the roster to it, and groups by SponsorTier ascending (package order) then by Sort and name, so the render order is deterministic rather than insertion-dependent (Pages/Public/Sponsors/PublicSponsorList.razor.cs:106 to :116); the featured event is chosen among published events only, because the events read is unscoped for privileged callers and could otherwise feature a draft (:79 to :80), and when the event publishes no packet URL the sponsorship call to action is hidden entirely rather than offering a dead link (Pages/Public/Sponsors/PublicSponsorList.razor.cs:88). ADCHome renders the same roster as a logo strip under the same tier-then-sort-then-name rule, reading it through the typed ISponsorUIService with a server-side filter to the featured event, so a second published edition's sponsors cannot bleed onto the landing page (Pages/Home/ADCHome.razor.cs:245, paged read at :254, filter built at :328 to :332, grouping at :269 to :273), and any failure leaves the strip empty and the call to action standing. The read passes an explicit 200-row roster cap because the paged endpoints default to 10 rows (Pages/Home/ADCHome.razor.cs:41, rationale at :38 to :39).
Partners are the sponsor shape run a second time, and they are the cheapest available proof that the composition actually is open for extension. The organizer trio is PartnerList / PartnerCreate / PartnerDetail (Pages/Partners/PartnerList.razor.cs:19, Pages/Partners/PartnerCreate.razor.cs:15, Pages/Partners/PartnerDetail.razor.cs:20) over PartnerService behind IPartnerUIService, an empty extension of the generic CRUD contract (Services/Partners/PartnerService.cs:10, Services/Partners/IPartnerUIService.cs:9). Where sponsors carry a commercial tier, partners carry a PartnerType, and the two pages differ from their sponsor counterparts only in that one field and its localized label (Pages/Partners/PartnerList.razor.cs:37, Pages/Partners/PartnerDetail.razor.cs:36). The create page makes the owning event a required field, precisely because the detail page refuses to move a partner afterwards, and pre-selects the current or next event so the common case is one click (Pages/Partners/PartnerCreate.razor.cs:12 to :13, default at :55, Pages/Partners/PartnerDetail.razor.cs:16 to :18). That default goes through EventInfoDefaults, the one SelectCurrentOrNextId over CurrentEventSelector written against the UI-only EventInfo lookup shape (the Shared project's CurrentEventDefaults serves EventDTO and cannot see EventInfo), so every organizer create page picks its default event the same way (Services/Events/EventInfoDefaults.cs:11, method at :20, rationale at :6 to :9; called by the partner, activity, sponsor, room, and session create pages, for example Pages/Sponsors/SponsorCreate.razor.cs:55 and Pages/Sessions/SessionCreate.razor.cs:74). On the attendee side, ADCHome renders an announced-partners band grouped by type with Community first and each group ordered by Sort then name, read through the typed IPartnerUIService with the same server-side event filter, and any failure hides the whole band (Pages/Home/ADCHome.razor.cs:86, loaded at :158, fetched at :300, grouped at :314 to :318, remarks at :286 to :290). The whole area cost one nav entry, one route triple, and no edit at all to the module's service registration, for the reason the last section gives.
The activities area (the social programme: pre-conference party, coffee connect, after-party, closing ceremony) repeats the shape with two twists. ActivityCreate, ActivityDetail, and ActivityList are the organizer trio, with the create page defaulting the owning event to the current or next one through EventInfoDefaults (Pages/Activities/ActivityCreate.razor.cs:16, default at :56, Pages/Activities/ActivityDetail.razor.cs:21, Pages/Activities/ActivityList.razor.cs:20). Because EventId is a real Activity column, the list's event filter needs no virtual-key resolution and goes straight through the base class's ApplyEventFilter, unlike the speaker list, whose event filter travels as a virtual key resolved server-side through the join tables (Pages/Public/Speakers/PublicSpeakerList.razor.cs:18 to :19). PublicActivityList renders the same programme chronologically for attendees, ordering by start time, then sort order, then name, so ties are deterministic (Pages/Public/Activities/PublicActivityList.razor.cs:112 to :114), and offers the directions affordance for an activity that carries its own off-site venue (:31).
The landing page
ADCHome is the conference front door, shared by the Blazor Server, WebAssembly, and MAUI heads through one adapter beside it: ADCHomePageContent implements Common's IHomePageContent, naming ADCHome as the component the shared Home.razor shell renders plus the page title, and each head registers it as a singleton (Pages/Home/ADCHomePageContent.cs:11, component at :14, title at :17; registered at MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/Program.cs:79, MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web.Client/Program.cs:42, MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:133). The page's editorial image ships once, as a static web asset of this library under _content/MMCA.ADC.Conference.UI, the same root the heads already load adc-ui.css from, so no head carries its own copy (Pages/Home/ADCHome.razor.cs:18 to :19, path at :48, rationale at :44 to :46). It reads the events list through the typed IEventUIService, the same contract the organizer pages use, and features the live-or-next published event via CurrentEventSelector, while a failed read leaves the page without a featured event; drafts are filtered out client-side, because the endpoint scopes only non-privileged callers to published events and an organizer's read would otherwise feature an unpublished edition (Pages/Home/ADCHome.razor.cs:51, read at :210, selection at :216 to :221, reason at :212 to :215). With the sponsor and partner reads going through their typed services as well, the page declares no wire shapes of its own: its dependencies are the three injected UI services plus the TimeProvider every clock read goes through (Pages/Home/ADCHome.razor.cs:50 to :60). Three rendering decisions are worth internalizing. First, during SSR prerender it skips the backend fetches and the timer entirely and renders the static fallback (brand name, no date, no countdown digits), because an untimed server-side call to a cold backend would block the prerender and therefore the post-login navigation (Pages/Home/ADCHome.razor.cs:147, rationale at :142 to :146); on the interactive pass it loads the event, then the sponsor and partner rosters side by side, one round trip instead of two (:154 to :158). Second, the per-second countdown ticking lives in a child component behind a render fence, so this page arms only a single one-shot timer for the Live-to-Ended flip (Pages/Home/ADCHome.razor.cs:160 to :162, :177, timer at :191), classifying the moment into the EventPhase enum through CurrentEventSelector.GetLiveWindowUtc, the one live window every surface and the server live gate share, with the spring-forward-gap guard applied (Pages/Home/ADCHome.razor.cs:334 to :354, window at :345, enum at :90). Third, there is no fallback date at all: until a featured event is known the phase is Unknown and the hero shows no date and no countdown digits, rather than a guessed date that would visibly jump once the real event arrives (Pages/Home/ADCHome.razor.cs:92 to :97, date line at :364), and the ticketing calls to action show only while the featured event is still ahead (:108). [Rubric §23, Front-End Performance & Rendering]. The editorial content it renders (the keynote, the track catalog, and the pre-conference workshops) is held as static records in ADCHomeContent: KeynoteSpeakerInfo, ConferenceTrackInfo, and PreConferenceWorkshopInfo (Pages/Home/ADCHomeContent.cs:81, :90, :98, data at :18, :34, and :60); the workshop record carries only proper nouns plus a resource-key stem, so its audience and description lines stay localized (Pages/Home/ADCHomeContent.cs:92 to :97). The separate ticketing page for that workshop day is a fixed product fact rather than an event field, and says so where it sits (Pages/Home/ADCHome.razor.cs:33, rationale at :24 to :28).
Routes, navigation, and localized strings
All paths are centralized in ConferenceRoutePaths, a static catalogue of literal routes and id-parameterized builder methods (EventDetails(id), PublicSessionDetails(id), SponsorDetails(id), PartnerDetails(id), ActivityDetails(id), EventFeedbackOrganizer(id), and so on) typed against the module's identifier aliases and, except for the two speaker-detail builders, formatted culture-invariantly, so a route change happens in one file (ConferenceRoutePaths.cs:8 to :87, speaker builders at :20 and :52; the partner triple at :38 to :40 is what a new area adds here). Three entries in that file are deliberate duplicates of routes owned by Engagement.UI, SponsorVisitLink, RoomCheckInLink, and SessionLive (ConferenceRoutePaths.cs:65, :68, :76), because Conference.UI must not reference Engagement.UI: the organizer print surfaces need the first two to encode into a QR, and the speaker dashboard links each session to its live page so a speaker can prepare draft polls ahead of the session; the reasons are recorded inline at ConferenceRoutePaths.cs:61 to :64 and :73 to :75. The room link carries the room's check-in code, escaped, when it has one (proof of presence), while a room with no code keeps the bare link its earlier prints used (:66 to :71). [Rubric §25, Navigation, Routing & Information Architecture]. The newest public route, /conference/ai-assistant (ConferenceRoutePaths.cs:55), is PublicAiAssistant (Pages/Public/AiAssistant/PublicAiAssistant.razor.cs:20, route and [AllowAnonymous] at Pages/Public/AiAssistant/PublicAiAssistant.razor:1 to :3), which tells an attendee how to use the schedule from an AI assistant (ADR-138): the Conference MCP server's URL with a copy button, the setup steps for Claude Desktop, Claude Code, and ChatGPT connectors, the server's six read-only tools in plain words, and the privacy line, anonymous because the MCP endpoint itself is anonymous and serves public schedule data only (PublicAiAssistant.razor.cs:9 to :14). The tools are listed as resource keys in the order the server declares them (:28 to :36). The URL is configuration (Mcp:ServerUrl), never a literal: the Web head forwards it to the WebAssembly client through /client-config and the MAUI head embeds the production value, so each environment shows its own gateway's /mcp (:23, read at :66, remarks at :15 to :19), and the Claude Code command is composed from it with a <url> placeholder when it is unset (:53 to :54). The copy goes through the device-capability IClipboardService with a token tied to the page's lifetime, so a copy that resumes after the reader navigated away sees a cancelled token rather than a disposed source, and a cancelled copy reports nothing (:46, :56 to :58, :84 to :102). User-facing strings are not inline English: every page injects an IStringLocalizer<TPage> in its markup (Pages/Events/EventList.razor:6) and resolves labels and snackbar messages through L["..."] over co-located .resx resource pairs, including enum labels composed as keys (Pages/Partners/PartnerList.razor.cs:37). Where a string is deliberately left untranslated (the conference brand name, a postal address, a ticketing URL, the English-only editorial content) the code carries an explicit // i18n: allow marker with a reason (Pages/Home/ADCHome.razor.cs:34, :110, :114, Pages/Home/ADCHomePageContent.cs:17), and the editorial data holder states the same exemption in its remarks (Pages/Home/ADCHomeContent.cs:10 to :14). [Rubric §27, Internationalization & Localization] assesses externalized strings and culture-aware formatting; this area embodies it under ADR-027, which superseded the single-locale ADR-011 (primer §6).
How it all plugs into the shell
Two registration types wire the area in. ConferenceUIModule implements Common's IUIModule (the front-end counterpart of the IModule back-end contract): it declares the module's twenty NavItem entries, whose labels are resource keys (Nav.Schedule, Nav.Events, and so on) resolved by the shared NavMenu at render time against the co-located ConferenceUIModule.resx pair (ConferenceUIModule.cs:31, :51 to :53). Those twenty split three ways. Six public entries come in the order an attendee uses them: Schedule, Speakers, Activities, Sponsors, Event Info (named for what it opens, because a non-privileged reader is redirected to the current event's page), and AI Assistant (ConferenceUIModule.cs:56 to :67). Three sit in the signed-in user section: My Schedule, which is the public programme behind the ?mine=true deep link, plus the two speaker_id-claim-gated entries, the dashboard and the speaker's own QR (:71, :74, :75). And eleven are Administration entries: Events, Sessions, Speakers, Session Selection, Sponsors, Partners, Activities, Rooms, Categories, Questions, and Feature Flags (:79 to :92). The management entries gate on a ConferencePermissions capability rather than a role, the same capability their pages require through [HasPagePermission], so a ContentEditor sees exactly the catalog entries its grant covers and an Organizer sees them all, with NavItemGuardContractTests keeping the two in step (:26 to :28); the Feature Flags entry names the Organizer role as well as the AdministrationPermissions.ManageFeatures capability its endpoints check (:92). The module also describes every Administration group of the ADC menu, Conference Day, Program, Attendees and Access, Partners, Setup, and the framework's Notifications last, with the first two expanded, so the whole organizer layout is declared in one place even for the groups other modules fill (:97 to :105, group keys at :34 to :49, summary at :12 to :16). ADC's own General and My Account entries carry negative orders so they sort ahead of the framework's entries at the default order 0 (:20 to :23). It then exposes its assembly so the host can discover the Razor routes (ConferenceUIModule.cs:107).
The companion DependencyInjection extension AddConferenceUI() (a C# extension(IServiceCollection) member, primer §4) is the one call a host makes (MMCA.ADC.Conference.UI/DependencyInjection.cs:18, extension block at :20, method at :26). It delegates the prologue to Common's AddUIModule<ConferenceUIModule>(), which scans the module assembly for every IEntityService<,> implementation as scoped and registers the descriptor as a singleton IUIModule (MMCA.ADC.Conference.UI/DependencyInjection.cs:30), then explicitly registers what a scan cannot infer: the three child-entity services (:33 to :35), the speaker dashboard (:38), the two organizer feedback services (:41, :42), session selection (:45), the session-materials service, which is outside the scan for exactly the reason its interface records (:50, note at :47 to :49), the framework's feature-flag administration client over the two flag-owning services' endpoints, in display order, so the shared FeatureFlagAdmin component on the Feature Flags page lists them as one table and the Web, WebAssembly, and MAUI clients all get it without a per-head registration (:56 to :58, note at :52 to :55), the offline-first schedule service (:61), the three lookup services (:64 to :66), and the composite speaker-detail lookup (:70), and returns. Two things the pages depend on are not registered here. The TimeProvider that the current-event selection, the home countdown, and the lookup memos read comes from the framework's AddUIShared, which TryAdds TimeProvider.System so a host that already registered a clock, or a test substituting a fake one, keeps its own (MMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:44, clock at :80). Public share links come from the same method's IPublicLinkBuilder registration (MMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:245), which the MAUI head overrides after every module registration so shared links use the browser origin rather than the WebView's (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:78 to :80). Because the scan covers the entity services, the partner area arrived with no edit to this file at all, and because the module contributes its own nav and assembly, the shell folds it in with no edit to the shell either. [Rubric §1, SOLID] (Open/Closed) and [Rubric §18, UI Architecture]. Read the per-type sections that follow for the mechanics of each page, model, and service; the bUnit and Playwright tests that exercise this library live in the testing chapter (G28).
ConferenceRoutePaths
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI·MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:8· Level 0 · class (static)
- What it is: one static class holding every Conference UI route, as
public static readonly stringconstants for fixed paths and small factory methods for id-bearing paths. It covers the organizer management routes, the public attendee routes, the speaker surfaces, the two QR landing links, and the feature-flag administration page, so no@pagedirective orNavigateTocall has to hard-code a URL. - Depends on: no first-party types. It uses the module's identifier aliases (
EventIdentifierType,SessionIdentifierType,SpeakerIdentifierType,ConferenceCategoryIdentifierType,QuestionIdentifierType,RoomIdentifierType,SponsorIdentifierType,PartnerIdentifierType,ActivityIdentifierType) that the Conference Shared project declares asglobal using(see the primer on identifier-type aliases, and ADR-048), plusSystem.Globalization.CultureInfo(:1). - Concept introduced: a centralized navigation vocabulary. [Rubric §25, Navigation and Information Architecture] assesses whether routes form a coherent, role-aware information architecture instead of scattered magic strings; this class is that story in miniature. The paths split into two deliberate namespaces mirroring the module's two audiences: organizers work under bare prefixes (
/events:10,/sessions:14,/speakers:18,/conferencecategories:22,/questions:26,/rooms:30,/sponsors:34,/partners:38,/activities:42) while attendees work under a/conference/...prefix (PublicSessions:47,PublicEvents:48,PublicSpeakers:51,PublicSponsors:53,PublicActivities:54,PublicAiAssistant:55). Detail routes are methods rather than constants because they interpolate a typed id:EventDetails(EventIdentifierType id)(:12) builds/events/{id}withstring.Create(CultureInfo.InvariantCulture, ...)so an integer id can never be formatted with a culture-specific group separator. [Rubric §27, Internationalization] shows up here as the negative case: URLs are the one place culture-aware formatting must be suppressed. - Walkthrough: the file is a flat list grouped by entity, each group contributing a list route, a create route, and a details factory: events (
:10-12), sessions (:14-16), speakers (:18-20), conference categories (:22-24), questions (:26-28), rooms (:30-32), sponsors (:34-36), partners (:38-40), activities (:42-44). The public attendee block follows (:46-55), and it carries two detail factories of its own,PublicEventDetails(:49) andPublicSessionDetails(:50), so an attendee-facing deep link never borrows an organizer route; it ends withPublicAiAssistant(:55), the page that explains how to reach the public schedule from an AI assistant. Then the speaker surfacesSpeakerDashboardandSpeakerQr(:58-59), the two QR self-service links, the session live link, the organizer feedback factories, the selection dashboard, and the feature-flag page.- The partners routes follow the same shape as every other organizer entity (
:38-40):Partners,PartnerCreate, andPartnerDetails(PartnerIdentifierType id), inserted between sponsors and activities so the entity list stays alphabetically adjacent to its neighbor in both the route file and ConferenceUIModule's nav list. - The two QR links are deliberate duplicates (
:65-71).SponsorVisitLink(:65) andRoomCheckInLink(:68-71) build/engage/sponsors/{id}and/engage/rooms/{id}, but those two pages are owned by Engagement.UI. The comment (:61-64) records the reason: Conference.UI must not reference Engagement.UI, yet the organizer print surfaces need the URL to encode into a QR code, and EngagementRoutePaths duplicates a Conference session route the same way. Both are consumed by aQrCodeButtonon the sponsor and room detail pages (MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorDetail.razor:73,MMCA.ADC.Conference.UI/Pages/Rooms/RoomDetail.razor:64). - The room link carries a proof-of-presence code (
:68-71, comment:66-67).RoomCheckInLink(RoomIdentifierType id, string? checkInCode = null)appends?code=with the value passed throughUri.EscapeDataStringwhen a check-in code is supplied, and returns the bare/engage/rooms/{id}link only when it is null or empty. The comment states why the bare form is now an edge case: every room is issued a code at creation, so the bare link remains only for a room row written outside the domain. The room detail page passes the room's code (RoomDetail.razor:64). - The session live link is a third deliberate duplicate (
:76, comment:73-75).SessionLive(SessionIdentifierType id)builds/conference/sessions/{id}/live, a page owned by Engagement.UI (EngagementRoutePaths.SessionLive). The comment records that the speaker dashboard links each session to it so a speaker can prepare draft polls ahead of the session, while attendees keep entering it from Happening Now. - Feedback routes nest under their parent entity:
EventFeedbackOrganizergives/events/{id}/feedbackandSessionFeedbackOrganizergives/sessions/{id}/feedback(:79-80), so the URL itself expresses the ownership hierarchy.SessionSelectionDashboardfollows (:83), andFeatureFlags(/feature-flags,:86) closes the file: the one organizer page that lists every service's flags in one table, per its comment (:85) and ADR-031. - Two factories differ from the rest:
SpeakerDetails(:20) andPublicSpeakerDetails(:52) use plain interpolation rather thanstring.Create(CultureInfo.InvariantCulture, ...), becauseSpeakerIdentifierTypeis aGuidwhoseToString()is already culture-invariant.
- The partners routes follow the same shape as every other organizer entity (
- Why it's built this way: if the admin prefix ever moves (say
/eventsbecomes/admin/events), editing the one constant propagates the change to every navigation call, with no grep-and-replace and no risk of a stale link. Keeping the parameterized routes as methods typed against the identifier aliases means a wrong-entity id is a compile error, not a 404. - Where it's used: every Conference UI Blazor page's
@pagedirective andNavigationManager.NavigateTocall, the "see all sponsors" link on the landing page (ADCHome.razor:369), theNavItemscollection in ConferenceUIModule (ConferenceUIModule.cs:53-93), and even one Engagement page, which links back toPublicSponsors(MMCA.ADC.Engagement.UI/Pages/CheckIns/Sponsors/SponsorVisit.razor:57).
IanaTimeZoneAttribute
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC.Conference.UI/Pages/Events/IanaTimeZoneAttribute.cs:30· Level 0 · sealed class (ValidationAttribute)
- What it is: a client-side DataAnnotations rule that a string is a valid IANA time zone identifier (for example
America/New_York), rather than any free-form text. An empty or whitespace value passes (:43-46), so it composes with[Required]rather than duplicating it. - Depends on:
System.ComponentModel.DataAnnotations(ValidationAttribute,ValidationResult,ValidationContext) andSystem.TimeZoneInfo(externals only, no first-party types). - Concept introduced: validating client-side against the same authority the runtime trusts.
IsValid(:39-55) does not maintain its own list of legal identifiers; it callsTimeZoneInfo.TryFindSystemTimeZoneById(:48), the same lookup the .NET runtime itself uses to resolve a zone. That keeps the client rule and the server's actual interpretation of the value in permanent agreement, at the cost of the rule depending on the OS's installed time zone database rather than a fixed, portable list.[Rubric §24, Forms, Validation and UX Safety]assesses whether a form rejects only truly illegal input; this does, because "illegal" is defined by the same authority that will later parse the value. - Walkthrough: the constructor (
:33-36) seeds a default English message.IsValid(:39-55) guards the nullValidationContextwithArgumentNullException.ThrowIfNull(:41), returns success on anything that is not a non-empty string (:43-46), returns success whenTryFindSystemTimeZoneByIdfinds the zone (:48-51), and otherwise builds aValidationResultcarryingErrorMessageagainst the failing member name (:53-54). - Why it's built this way: EventFormModel's
TimeZoneproperty already carries[Required]; layering this attribute on top rejects a syntactically present but meaningless value ("Nowhere") before the record ever reaches the server, where the same check would otherwise run for the first time. - Where it's used: EventFormModel
.TimeZone(MMCA.ADC.Conference.UI/Pages/Events/EventFormModel.cs:54), resolved at render time through the page'sIStringLocalizerper ADR-027.
SessionizeCodeAttribute
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC.Conference.UI/Pages/Events/SessionizeCodeAttribute.cs:23· Level 1 · sealed class (ValidationAttribute)
- What it is: a client-side DataAnnotations rule that an event's optional Sessionize import code contains only letters, digits, underscores, and hyphens. Like IanaTimeZoneAttribute, an empty or whitespace value passes, so it composes with the field being optional rather than required.
- Depends on:
System.ComponentModel.DataAnnotations(externals), plus the first-partySessionizeCodeFormathelper (:41) that owns the actual character-class check. - Concept introduced: the attribute as a thin DataAnnotations adapter over a plain format check. The attribute itself holds no regular expression or character-class logic; it delegates to
SessionizeCodeFormat.IsValid(code)(:41) and only translates the answer into aValidationResult. That keeps the format rule reusable outside DataAnnotations (for example from a non-Blazor caller) while still surfacing it as a normal form attribute here.[Rubric §15, Best Practices and Code Quality]: the format rule has exactly one implementation, which this attribute wraps rather than duplicates. - Walkthrough: the constructor (
:26-29) seeds the default message ("may contain only letters, digits, underscores and hyphens").IsValid(:32-48) guards the null context (:34), passes on anything that is not a non-empty string (:36-39), passes whenSessionizeCodeFormat.IsValidaccepts the code (:41-44), and otherwise returns aValidationResultagainst the failing member (:46-47). - Why it's built this way: the Sessionize import code is embedded in a URL the server builds when refreshing an event, so rejecting an unsafe character client-side avoids a round trip that the server would reject for the same reason.
- Where it's used: EventFormModel
.SessionizeCode(MMCA.ADC.Conference.UI/Pages/Events/EventFormModel.cs:59).
ConferenceUIModule
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI·MMCA.ADC.Conference.UI/ConferenceUIModule.cs:31· Level 3 · class (sealed)
- What it is: the Conference module's UI descriptor, and the one place the whole ADC organizer menu layout is declared. It contributes the public programme entries (Schedule, Speakers, Activities, Sponsors, Event info, AI assistant), the signed-in My Schedule entry, the claim-gated speaker Dashboard and QR page, and the management entries (Events, Sessions, Speakers, Session Selection, Sponsors, Partners, Activities, Rooms, Categories, Questions, Feature Flags); it describes every Administration group of the menu, including groups other modules fill; and it exposes its assembly so the host can discover the module's routable Blazor components.
- Depends on: IUIModule (the contract it implements), NavItem, NavGroup and NavSection (the nav vocabulary from
MMCA.Common.UI.Common), ConferencePermissions (the capability each management entry requires), AdministrationPermissions (ManageFeatures), RoleNames (theOrganizerrole string) and ClaimNames (SpeakerId), ConferenceRoutePaths (the URLs), plus MudBlazorIconsandSystem.Reflection.Assembly(externals) and the co-locatedConferenceUIModule.resx/ConferenceUIModule.es.resxpair. - Concept introduced: the modular-UI descriptor, the front-end analogue of
IModule. [Rubric §18, UI Architecture and Component Design] assesses whether UI is composed from cohesive, self-describing modules rather than a hard-coded master shell; a module declaring its own menu is exactly that, and it is the Open/Closed half of [Rubric §1, SOLID]: enabling a module adds its navigation with no edit to the shell. [Rubric §25, Navigation and Information Architecture] is served because the items are role- and claim-aware and grouped into sections. [Rubric §11, Security] applies with an important caveat: hiding a nav item is UX only. The services still enforce authorization server-side, so the claim, role and permission here are not the security boundary. What the class does guarantee is that each management entry gates on the sameConferencePermissionscapability its page requires through[HasPagePermission](for examplePages/Events/EventList.razor:2), so a ContentEditor sees exactly the catalog entries its grant covers and an Organizer sees them all; the class remarks nameNavItemGuardContractTestsas the test that keeps the two in step. Per ADR-027 theTitleandGroupstrings are resource keys, not literals:typeof(ConferenceUIModule)in theTitleResourceposition on every item tells the shared NavMenu to resolve them against the co-located.resxat render time, which the file's own comment records (:51-52). The record's own documentation adds the failure mode (MMCA.Common.UI/Common/NavItem.cs:14-18): a key the resource type does not declare renders as the raw string, so a not-yet-translated entry is legible rather than blank. - Walkthrough: the class opens with five public group-key constants,
GroupConferenceDay,GroupProgram,GroupAttendeesAccess,GroupPartnersandGroupSetup(:34-46), plus a privateGroupNotifications(:49) that repeats the framework's own key for its Push Notifications entry. The keys are public because the Engagement and Identity UI modules place their entries in these groups (EngagementUIModule.cs,IdentityUIModule.cs).NavItems(:53-93) is anIReadOnlyList<NavItem>initialized with a collection expression, twenty items in four tiers. Ordering follows the class remarks: ADC's own General and My Account entries carry negativeOrdervalues so they sort ahead of entries that keep the default 0 (the framework's Notification Inbox, the MAUI head's Device Settings), and inside Administration every entry sits in a group and is ordered within it.- Public (
:56-67): six items for everyone, anonymous included, in the order an attendee uses them:Nav.Schedule(PublicSessions,Order = -50), Speakers (-40), Activities (-30), Sponsors (-20),Nav.EventInfo(PublicEvents, -10, named for what it opens because a non-privileged reader is redirected to the current event's page, comment:61-62), andNav.AiAssistant(PublicAiAssistant, -5), the last General entry and still ahead of the framework's order-0 entries (comment:65-66). They carry no role, permission orSection, so they default toNavSection.General. - Signed-in user (
:71):Nav.MySchedulepoints atPublicSessions + "?mine=true", the public programme filtered to the caller's bookmarks (the same deep link the MAUI quick action opens), withSection: NavSection.UserandOrder = -80. - Speaker (
:74-75):Nav.SpeakerDashboardandNav.SpeakerQr, both carryingRequiredClaim: ClaimNames.SpeakerIdandSection: NavSection.User, so they appear only for a user whose token links them to a speaker record and they render in the user menu rather than the main list. - Administration (
:79-92): eleven items withSection: NavSection.Admin. The ten management entries each carryRequiredPermission:the matchingConferencePermissionscapability (EventsManage,SessionsManage, and so on) and a group with an in-group order: Program holds Events, Sessions, Speakers and Session Selection (:79-82), Partners holds Sponsors, Partners and Activities (:83-85), Setup holds Rooms, Categories and Questions (:86-88). Per the comment (:77-78) they use their own icons (EditCalendar,ViewAgenda,Mic,Storefront,LocalActivity), distinct from the public entries of the same name.Nav.FeatureFlags(:92) closes Setup at order 4: the page is Organizer-gated, so the item carriesRoleNames.Organizerand also states the capability its endpoints check,AdministrationPermissions.ManageFeatures(comment:90-91). NavGroups(:97-105) is the organizer layout as six NavGroup records, each with a key, an icon and an order: Conference Day (1) and Program (2) start expanded because they are the two an organizer opens most, Attendees and Access (3), Partners (4) and Setup (5) start collapsed, and the framework's Notifications group comes last (6), per the comment (:95-96).Assembly(:107) returnstypeof(ConferenceUIModule).Assemblyso the host's Blazor router can discover this library's routable components. "Speakers", "Sponsors" and "Activities" each appear twice in the list, once public and once in Administration, differing in route, icon and gating: the same label serves two audiences with two destinations.
- Public (
- Why it's built this way: mirroring the backend IModule pattern on the UI side keeps the app extensible. A host that boots without the Conference module simply has no conference nav and no conference routes, with no conditional code anywhere in the shell. The class also leaves
AppBarComponentTypesandLayoutComponentTypesat their interface defaults (MMCA.Common.UI/Common/Interfaces/IUIModule.cs:31-42): Conference contributes no app-bar badge and no root overlay. - Where it's used: registered as a singleton
IUIModuleby this module's DependencyInjection throughAddUIModule<ConferenceUIModule>()(DependencyInjection.cs:31, implemented atMMCA.Common.UI/DependencyInjection.cs:490-500) and aggregated by the shared UI navigation builder in group 15.
EventFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventFormModel.cs:27· Level 3 · abstract class (form model)
- What it is: the editable shape of a conference event, declared once and bound by two different screens: the organizer create page and the detail page's inline editor. It is a plain DataAnnotations-decorated class with no Blazor, no service, and no MudBlazor reference.
- Depends on:
EventDTOfor every length cap andQuestionModerationDefaultfor the moderation field (MMCA.ADC.Conference.Shared.Events, line 2), plusAbsoluteUrlAttributefromMMCA.Common.UI.Validation(line 4),OptionalEmailAttributefrom the same namespace, and the co-locatedIanaTimeZoneAttributeandSessionizeCodeAttribute. Externals:System.ComponentModel.DataAnnotations(Required,MaxLength). - Concept introduced, the shared form model as the single declaration of a form's rules. A Blazor
form can end up declaring its rules in three places at once: on the DTO, on each
MudTextField'sRequired/RequiredError/MaxLengthattributes, and again in a hand-written check inside the submit handler. This type collapses the first two, and it also owns the one cross-field rule the submit handlers would otherwise each re-type (DateRangeErrorKey, line 113). Each property carries its own[Required]/[MaxLength]/[OptionalEmail]/[AbsoluteUrl](lines 44-94), and two of the properties add a format rule of their own:IanaTimeZoneAttributeonTimeZone(line 54) andSessionizeCodeAttributeonSessionizeCode(line 59). The pages bridge MudBlazor to them throughModelValidation.Forrather than repeating a rule per field. The twoErrorMessageresource keys that name a missing value are hoisted to consts,NameRequiredKey(line 34) andTimeZoneRequiredKey(line 41), so the model's rule and the field's ownRequiredErroraffordance quote the same key instead of two string literals that can drift. Every otherErrorMessageis a bare resource key too, resolved at render time by the page'sDataAnnotationsModelValidatorwrapped around that page'sIStringLocalizer(ADR-027,Website/docs-src/adr/027-multi-locale-i18n.md).[Rubric §24, Forms, Validation & UX Safety]assesses whether a form can express only legal input and says why in place: the caps here are not invented, they areEventDTO.NameMaxLengthand its siblings (lines 45, 49, 55, 60, 70, 75, 79, 84, 89, 94), so the client rejects exactly what the server column would reject.[Rubric §15, Best Practices & Code Quality]assesses whether one change lands in one place: adding a field to the event form means one property here plus one control in the sharedEventFormFieldscomponent, and both screens get it.[Rubric §27, Internationalization]: no message is a literal, every one is a key (ADR-011,Website/docs-src/adr/011-single-locale-i18n.md, revisited by ADR-027). - Walkthrough
- Two resource-key consts (lines 34, 41) for the required-value messages.
- Ten annotated text properties (lines 44-95):
NameandTimeZoneare required and non-nullable withstring.Emptydefaults; the eight optional ones are nullable.TimeZonealso carries[IanaTimeZone](line 54) so a value that is present but not a real zone identifier is rejected before it reaches the server, and the optionalSessionizeCodecarries[SessionizeCode](line 59) for the same reason.OrganizerContactEmailadds[OptionalEmail](line 83), the framework attribute that validates the address only when one is entered, andVenueMapUrl,SponsorshipPacketUrl, andTicketingUrlall add[AbsoluteUrl](lines 74, 88, 93), the framework attribute that rejects a relative or scheme-less URL. - One protected helper,
SessionizeCodeOrNull(line 67): the code as a request sends it. A cleared field (which the text field reports as an empty string) or white space becomesnull, so any number of events can carry no code (the doc comment, lines 63-66, tags it O-09). Both concrete models post the code through it rather than through the raw property. - Three unannotated properties (lines 98, 101, 104):
StartDate,EndDate, andQuestionModerationDefault. The class doc (lines 20-25) is explicit that this is deliberate: DataAnnotations cannot express a date-range rule or a picker's required affordance, so the pickers keep their own required markup and the pages decide when to run the date-range check, but the values still live on the one model rather than as loose page fields. - One public method,
DateRangeErrorKey()(lines 113-121): the date-range refusal as a resource key, ornullwhen the range may be sent. A missing start or end day returns"Validation.DateRangeRequired"(lines 115-118), an end day before the start day returns"Validation.EndDateBeforeStart"(line 120). Its doc comment (lines 106-112) records that it mirrors the server rule inEventValidationRulesand that both the create page and the detail page's inline editor ask here, "so the two cannot drift". Returning a key rather than a message keeps the model free of any localizer; each page resolves the key through its ownL.
- Why it's built this way: the create page and the detail editor edit the same thing, so a value one
accepts must be a value the other accepts. Making the model abstract and letting the two concrete
models add only their save shape (see
EventCreateModelandEventEditModel) makes that guarantee structural instead of a convention someone has to remember. - Where it's used:
EventCreateModelandEventEditModelderive from it;EventCreateandEventDetailbind an instance to the sharedEventFormFieldscomponent (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventFormFields.razor), and both callDateRangeErrorKey()before posting. Tests:EventFormModelDateRangeTests,EventFormModelEmailTests(underMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Events/), andClientEventFormatValidationTests(one folder up, inPages/).
EventCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventCreateModel.cs:11· Level 4 · sealed class (form model)
- What it is: the create-side concrete of
EventFormModel. It adds exactly two things to the shared base: the time zone a new event opens on, and the method that turns the entered values into the DTO the create posts. - Depends on:
EventFormModelandEventDTO(line 1). No services, no Blazor. - Concept introduced, the model owns the save shape. The recurring alternative is a page handler that
news up a DTO inline from a dozen backing fields. Moving that into
ToNewmeans the "what a create posts" decision is one readable object initializer instead of a paragraph inside anasync Task, and it is unit-testable without a renderer.[Rubric §14, Testability]assesses whether behavior can be exercised without its host: this class has no Blazor surface at all.[Rubric §18, UI Architecture & Component Design]: the code-behind keeps orchestration (validate, post, navigate) and delegates shape. - Walkthrough
- The parameterless constructor (line 14) seeds
TimeZone = "America/New_York", the conference's home zone, so the common case needs no edit. That is the entire create-specific default. ToNew()(lines 25-42) builds anEventDTOwithId = default(line 28), converts the twoDateTime?pickers withDateOnly.FromDateTime(lines 31-32), copies nine text fields across as entered, sends the tenth, the Sessionize code, through the base'sSessionizeCodeOrNull(line 34) so a blank field posts no code rather than an empty string, and hard-codesIsPublished = false(line 41). The null-forgivingStartDate!.Valueis safe because the page runs its date guards first; the<remarks>(lines 21-24) says exactly that.- Note what
ToNewdoes not carry:QuestionModerationDefaultis on the base but is not written into the created DTO, so a new event takes whatever default the server applies. OnlyEventEditModelposts it.
- The parameterless constructor (line 14) seeds
- Why it's built this way:
Id = defaulthands identifier assignment to the server, and the unpublished default exists so an organizer can fill in venue details and refresh from Sessionize before anything is publicly visible. Publishing is a separate deliberate gesture onEventDetail. - Where it's used: instantiated as the
_modelfield ofEventCreate(.../Pages/Events/EventCreate.razor.cs:37) and consumed by itsCreateEventAsync(.../Pages/Events/EventCreate.razor.cs:60-61).
EventEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventEditModel.cs:11· Level 4 · sealed class (form model)
- What it is: the edit-side concrete of
EventFormModel, used byEventDetail's inline editor. It is a round trip in two methods:LoadFromfills the editor from the loaded event,ToUpdatedproduces the DTO the update posts. - Depends on:
EventFormModelandEventDTO(line 1). - Concept introduced, shadow editing through a model instead of shadow fields. The live loaded
EventDTOis never mutated: opening the editor copies it into this model, and only a validated save produces a new DTO. Because both directions are one method, a newly added property cannot be carried by one path and dropped by the other, which is exactly the failure mode a field-by-field transcription in the page invites (LoadFromdoc, lines 14-15).[Rubric §8, Data Architecture]assesses whether concurrency is handled deliberately:ToUpdatedre-sends the loadedRowVersion(line 55), the client half of the optimistic-concurrency token inWebsite/docs-src/adr/035-optimistic-concurrency.md, so a stale edit is rejected rather than silently overwriting a concurrent one.[Rubric §11, Security]assesses whether a client can move state through a path it should not:IsPublishedis copied straight off the source (line 68), never off the form, so the edit form structurally cannot publish or unpublish. - Walkthrough
LoadFrom(EventDTO source)(lines 18-35):ArgumentNullException.ThrowIfNull(line 20), then copies the ten text fields, converts the twoDateOnlyvalues back toDateTimeatTimeOnly.MinValuefor the pickers (lines 24-25), and copiesQuestionModerationDefault(line 34).ToUpdated(EventDTO source)(lines 48-71): builds a newEventDTOcarrying identity and concurrency from the source (Idline 54,RowVersionline 55,IsPublishedline 68), the edited text and dates from the model, and the editedQuestionModerationDefault(line 69). The Sessionize code goes out through the base'sSessionizeCodeOrNull(line 61), so clearing the field removes the code instead of posting an empty string;LoadFromcopies the stored code back unchanged (line 27). Same null-forgiving date access, same<remarks>justification (lines 44-47).- The class doc (lines 8-9) records the deliberate omission: no published flag on the form, because publishing and unpublishing are their own buttons.
- Why it's built this way: an update endpoint reads a full DTO, so something must write every property; doing it in one place is the only way to keep the read path and the write path in agreement as fields are added.
- Where it's used: the
_modelfield ofEventDetail(.../Pages/Events/EventDetail.razor.cs:75), driven by itsStartEditingAsync(.../Pages/Events/EventDetail.razor.cs:130,LoadFromat line 139) andSaveChangesAsync(.../Pages/Events/EventDetail.razor.cs:167,ToUpdatedat line 198).
EventCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventCreate.razor.cs:13· Level 7 · class (Blazor code-behind)
What it is: the organizer form that creates a conference event. It binds an
EventCreateModelto the sharedEventFormFieldsblock, runs a date-range pre-check, posts the record unpublished through the framework's create-page base, and redirects to the new event's detail page. It is the place where the Conference create-form shape is taught.Depends on:
CreatePageBase(@inherits,.../Pages/Events/EventCreate.razor:7) and itsCreateSubmitOptions(line 59);IEventUIService(line 15),EventCreateModel(line 37),ModelValidationplusDataAnnotationsModelValidator(line 33), andConferenceRoutePaths. The toast service, the form reference, and theIsSaving/IsDirty/SaveResultstate all come from the base (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:24-39). Externals: Blazor ([Inject],NavigationManager,OnInitialized), MudBlazor (MudForm,BreadcrumbItem,Icons.Material.Filled.Home), theUnsavedChangesGuard,EventFormFields, andErrorSummarycomponents wired in the template (.../Pages/Events/EventCreate.razor:11, 27, 42), and theIStringLocalizer<EventCreate>the template injects asL(.../Pages/Events/EventCreate.razor:6).Concept introduced, the create form over a shared create-page base. Every Conference page is a
.razortemplate plus a.razor.cspartial; on a create page the partial holds only what is specific to the entity, becauseCreatePageBaseowns the submit lifecycle every create page repeats. The page contributes four things:- Model-declared validation:
OnInitializedbuilds one delegate,ModelValidation.For(_model, new DataAnnotationsModelValidator(L))(line 33), and the template hands that single delegate to every field onEventFormFields(.../Pages/Events/EventCreate.razor:27). NoRequiredorMaxLengthis written in markup; the rules live onEventFormModeland theErrorMessagekeys are resolved throughL(ADR-027). - A pre-check for the rules DataAnnotations cannot express:
PreCheckDateRange(lines 47-48) is one expression over the model's own rule: it asksEventFormModel.DateRangeErrorKey()and, when that returns a key (Validation.DateRangeRequiredfor a missing date,Validation.EndDateBeforeStartfor an end before the start), resolves it throughL; otherwise it returnsnull. Its doc comment (lines 43-46) records that the rule is shared with the detail page's editor, so the organizer sees a refusal without a round trip and the two screens cannot disagree about it. - The save and the success step:
CreateEventAsync(lines 52-59) is one call to the base'sSubmitAsync, passing the save delegatect => EventService.AddAsync(_model.ToNew(), ct)(line 53), the success callback that toastsSnackbar.Createdand navigates toConferenceRoutePaths.EventDetails(created.Id)(lines 56-57), andnew CreateSubmitOptions { Localizer = L, PreCheck = PreCheckDateRange }(line 59). - Dirty tracking in markup: the template passes the base's
MarkDirtytoEventFormFieldsasOnFieldChanged(.../Pages/Events/EventCreate.razor:28) and feedsIsDirtyto theUnsavedChangesGuard(.../Pages/Events/EventCreate.razor:11).
The base's
SubmitAsync(.../Pages/Common/CreatePageBase.cs:53-110) is the sequence the page does not write: it returns early when there is no form or a save is already running (:61), clearsSaveResult(:67), validates the form and warns withErrorMessages.ValidationError(:68-72), toasts the pre-check message and stops when there is one (:75-80), then saves with the base'sPageToken(:85). On success it clearsSaveResultandIsDirtybefore invoking the callback (:86-91), so the guard does not block the page's own redirect. On failure it keeps the result inSaveResultfor the template'sErrorSummaryand, sinceToastOnFailuredefaults to true (.../Pages/Common/CreateSubmitOptions.cs:20), notifies throughNotifyOnFailure(Toast, Localizer)(:94-98); the page's comment (lines 50-51) gives the reason for the inline copy, the snackbar can time out while the reader is still reading the form.OperationCanceledExceptionreturnsfalse(:102-105) andIsSavingis cleared infinally(:106-109). Cancellation on disposal comes from the base's own parent,CancellablePageBase(.../Pages/Common/CreatePageBase.cs:21), so this page declares noCancellationTokenSourceand noDispose.[Rubric §24, Forms, Validation & UX Safety]assesses client validation, unsaved-change protection, and safe submits: this page validates before posting, tracks dirty state, and guards navigation away.[Rubric §18, UI Architecture & Component Design]: the code-behind holds the entity-specific parts, the base holds the submit lifecycle, the model holds rules and shape, the shared field component holds markup.[Rubric §11, Security]: the route requires theEventsManagecapability via@attribute [HasPagePermission(ConferencePermissions.EventsManage)](.../Pages/Events/EventCreate.razor:2).[Rubric §27, Internationalization]: every label, breadcrumb, and toast reads throughL(for exampleL["Snackbar.Created"], line 56), per ADR-011 and ADR-027.- Model-declared validation:
Walkthrough
OnInitialized(lines 22-34) builds the three-item breadcrumb trail (Home, the events list, a disabled "Create" leaf, lines 25-30) and wires the validation delegate (line 33)._model(line 37) is a singleEventCreateModel, whose constructor already seeded the time zone; the page keeps no per-field backing state of its own.CreateEventAsync(lines 52-59) hands the whole submit to the base, as described above; the navigation uses the id the server returned.NavigateToList(line 61) is the cancel path back to/events.- The template's
ErrorSummary(.../Pages/Events/EventCreate.razor:42) takes both the base'sSaveResultandForm?.Errorsand collapses duplicates: its own comment (from line 37) notes MudBlazor validates aFor-bound field through the model annotations as well as through the shared delegate, so one empty field can report the same rule twice, once localized and once as the bare key. Resolving every entry and de-duplicating leaves one wording per broken rule.
Why it's built this way: a new event starts unpublished so an organizer can complete venue details and refresh from Sessionize before anything is publicly visible; publishing is a separate deliberate action on
EventDetail. Binding the sameEventFormFieldsblock that the detail editor binds is what makes "a value the create page accepts is a value the detail page accepts" true by construction rather than by review, and leaving the submit lifecycle toCreatePageBasekeeps the validate, pre-check, save, notify, and cancel steps identical on every create page.Where it's used: the
/events/createroute (.../Pages/Events/EventCreate.razor:1), reached fromEventList's create button; on success it hands off toEventDetail. Tests:EventCreateTestsunderMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Events/.
EventList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventList.razor.cs:16· Level 6 · class (Blazor code-behind)
- What it is: the organizer browse page for events: a server-paged, server-sorted grid on desktop, an infinite-scroll card list on mobile, with a name search, a delete-with-confirmation action, and navigation into create and detail. It is the simplest inheritor of the shared list base and the place where the Conference list-page shape is taught.
- Depends on: extends
DataGridListPageBase<TDto>overEventDTO(line 16) and injectsIEventUIService(line 21). The template is oneListPageShell<TItem>(.../Pages/Events/EventList.razor:10-96), which hosts the grid, theMobileInfiniteScrollList<TItem>, and the delete dialog. It also usesListPageActions(line 67),ErrorMessages(line 73), andConferenceRoutePaths. The toast service, theIsMobileflag, and theReloadActiveLayoutAsyncandMobilePageFetcherhelpers come from the base. - Concept introduced, the two-layout list page over one shared base and one shell. A Conference list
page is short because everything hard lives in
DataGridListPageBase<TDto>and the layout lives inListPageShell<TItem>. The derived page supplies five things and nothing else:- A shell reference:
_shellcaptured via@ref(line 24), surfaced to the base through the overriddenGridRef(_shell?.Grid, line 25) andMobileListRef(_shell?.MobileList, line 26), which the base needs to restore rows-per-page and to reach the live layout. - Filter persistence:
SaveFilters/RestoreFilters(lines 30-34) write and read the page's own search string, and the base persists them so filters survive navigation, refresh, and a shared link.[Rubric §25, Navigation & Information Architecture]. - One fetch for both layouts:
FetchEventsAsync(lines 46-48) is the single call toEventService.GetPagedAsync, andApplyFilters(lines 53-57) appendsName contains <search>when the search is not blank.LoadServerData(lines 50-51) hands both to the base'sLoadServerDataAsync, which owns cancellation-token resetting, page-index conversion, sort extraction, theIsLoadingandLoadFailedflags, and uniform error reporting. - A mobile fetch from the same parts:
FetchMobilePage(lines 60-61) isMobilePageFetcher(FetchEventsAsync, ApplyFilters, "Name"), so the card list, which pages by "load more" instead of a pager and sorts byName, reuses the grid's fetch and filter rather than repeating them.[Rubric §22, Responsive & Cross-Browser]: the shell renders two genuinely different layouts off the base'sIsMobileflag rather than reflowing one grid (.../Pages/Events/EventList.razor:14). - Actions:
DeleteEventAsync(lines 66-74) delegates the confirm, delete, toast, and reload sequence toListPageActions.DeleteWithConfirmationAsyncagainst the shell'sDeleteDialog, andReloadActiveLayoutAsync(lines 36-37) passes the shell's mobile list to the base helper of the same name, which refreshes whichever layout is live. The failure path is worth noting: when a fetch fails the base setsLoadFailed, and the template hands it, withEmptyConfirmed, to the shell (.../Pages/Events/EventList.razor:16), so a failed load is reported as a failure rather than as an empty list that reads as "no events".[Rubric §19, State Management & Data Flow]. Data access followsWebsite/docs-src/adr/094-client-entity-data-access.md: the page never touchesHttpClient, only the typedI*UIServiceclient, and expresses filters as operator-plus-value pairs the server model binder understands.
- A shell reference:
- Walkthrough
EntityNameandTitle(lines 18-19) come from the injected localizer;Titleis the abstract member the base uses in its error messages.OnSearchChanged(lines 39-43) stores the text and returns the active-layout reload task directly (noasync/await, since nothing follows the reload), so typing drives a server round trip rather than a client-side filter over the current page.OnMobileCardClick(line 63) andNavigateToDetails(lines 79-80) both route throughConferenceRoutePaths.EventDetails(id), andNavigateToCreate(lines 76-77) opensEventCreate.- The grid declares four sortable
PropertyColumns overName,StartDate,EndDate, andIsPublished(.../Pages/Events/EventList.razor:53, 58, 64, 72), withNamecarryingInitialDirection="SortDirection.Ascending"so the first page arrives ordered.
- Why it's built this way: many list pages across the workspace share this base and shell, so browse behavior, state persistence, layout, and error handling stay identical everywhere and a new list page costs a few dozen lines.
- Where it's used: the
/eventsorganizer route (.../Pages/Events/EventList.razor:1-2,[HasPagePermission(ConferencePermissions.EventsManage)]); rows openEventDetailand the create button opensEventCreate.
EventDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventDetail.razor.cs:24· Level 8 · class (Blazor code-behind)
- What it is: the organizer's event console. It loads one event by route id and offers four distinct operations on it: inline edit, publish/unpublish, refresh from Sessionize, and delete. It is the richest detail page in the Conference UI in terms of verbs, and the place where the detail-page shape is taught.
- Depends on:
DetailPageBase(@inherits,.../Pages/Events/EventDetail.razor:9),IEventUIService(line 28) for all four operations,IToastService(line 30),EventEditModel(line 75),LatestLoadGuardandDetailLoadStatethrough the base'sBeginLoad/CompleteLoad/LoadState(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:34,41,48,67);EventDTO,RefreshFromSessionizeResultDTO, andQuestionModerationDefault(.../Pages/Events/EventDetail.razor:101);ConferenceRoutePaths,ErrorMessages(line 177),ResultUiExtensions.NotifyOnFailure(lines 194, 371) and.ActionErrorMessage(lines 253, 319),CommittedWriteReload(_writeReload, line 79), and theUnsavedChangesGuard,DetailLoadStateContent,EventFormFields,ErrorSummary, andDeleteConfirmationcomponents, and the framework'sAuditHistoryPanel(.../Pages/Events/EventDetail.razor:14, 21, 39, 53, 204). - Concept introduced, load-once-on-parameters over a shared detail base. Four mechanisms combine here
and recur in every detail page in this group:
- A shared base owns the boring half.
DetailPageBasesuppliesPageToken(the page-scoped cancellation token with its dispose pattern) and the edit-mode lifecycle (IsEditing,IsDirty,BeginEdit,EndEdit), so this file contains noCancellationTokenSourceand noDisposeat all. It also owns the load state:BeginLoadsupersedes the load in flight through itsLatestLoadGuardand resetsLoadStatetoLoading, andCompleteLoadrecordsLoaded,NotFound, orFailedfor the current generation only (.../DetailPageBase.cs:59-95), so this page declares noIsLoadingflag of its own. - Route id as the typed alias: the id arrives as
[Parameter] public EventIdentifierType Id(line 39) and is passed straight toGetByIdAsync(Id, true, token)(line 114), with no string parsing in the page, so the route constraint (.../Pages/Events/EventDetail.razor:1) and the alias agree on the primitive (ADR-048, ADR-085). - Load once per id, newest load wins:
OnParametersSetAsynccompares against_loadedId(anEventIdentifierType?) and returns a completed task when the id is unchanged (lines 95-105), so a re-render does not refetch. When the id does change, it returnsLoadEventAsync()directly (line 104), which starts withBeginLoad()(line 110), which supersedes any load still in flight, andCompleteLoaddrops a response that is no longer current (line 118). - Shadow editing through a model:
StartEditingAsyncre-validates the shown event (seeEnsureCurrentEventAsyncbelow), copies it intoEventEditModeland callsBeginEdit(lines 130-146);CancelEditingis justEndEdit(line 165). The liveEventobject is never mutated until a validated save succeeds.[Rubric §24, Forms, Validation & UX Safety].[Rubric §8, Data Architecture]assesses a deliberate concurrency strategy: every mutating call re-sends the loadedRowVersion, on save throughEventEditModel.ToUpdatedand on publish/unpublish explicitly (lines 245-247), which is the client half of the optimistic-concurrency token described inWebsite/docs-src/adr/035-optimistic-concurrency.md. A committed write whose follow-up reload fails would leave that token stale, so the page owns aCommittedWriteReload(_writeReload, line 79, tagged M246): the write still counts as done, the page warns that it could not refresh, and the next edit, publish, or Sessionize refresh re-reads first throughEnsureCurrentEventAsync(lines 148-163) instead of posting the stale row version.[Rubric §6, CQRS & Event-Driven]: publish and unpublish are notIsPublishedflag edits, they are their own named service operations (PublishAsync/UnpublishAsync,.../Services/Events/IEventUIService.cs:13, 15), so each state transition stays a use case the server can guard on its own terms.[Rubric §13, Observability & Operability]: the Sessionize refresh returns aRefreshFromSessionizeResultDTOheld in_refreshResult(line 89) so the organizer sees what the import actually did.
- A shared base owns the boring half.
- Walkthrough
OnInitialized(lines 56-68) builds breadcrumbs and wires the validation delegate against_model(line 67), exactly asEventCreatedoes.LoadEventAsync(lines 107-128):BeginLoad()yields a token and a generation (line 110), andGetByIdAsync(Id, true, token)fetches with children (line 114). The page adopts the event and seeds_sessionizeCodeonly whenCompleteLoad(generation, result)reports a current success (lines 118-122). A not-found or failed load raises no toast: the comment (lines 116-117) states that the page body reports it, and the markup rendersDetailLoadStateContentfor every state butLoaded, withOnRetry="LoadEventAsync"for a failure (.../Pages/Events/EventDetail.razor:19-25). A superseded response changes nothing, and the spinner is the base'sLoadingstate rather than a page flag.SaveChangesAsync(lines 167-217): validate the form, then ask the model's shared date-range rule,EventFormModel.DateRangeErrorKey(), and warn with the resolved key when it refuses (lines 181-186, the same ruleEventCreateruns as its pre-check), post_model.ToUpdated(Event)(line 191), then refetch the record (line 199). The refetch goes through_writeReload.TryAdopt(line 200): on success the page adopts the server truth, re-seeds_sessionizeCode, and toasts; on a failed reload the helper warns withSnackbar.SavedRefreshFailedinstead, andEndEdit(line 207) runs either way because the update already committed (comment, line 198).PublishAsync/UnpublishAsync(lines 219-221) both delegate toSetPublishedAsync(bool)(lines 229-278), which picks the failure message up front (line 236), resolves the event throughEnsureCurrentEventAsync(line 240), calls the chosen named operation with that event'sRowVersion(lines 245-247), and refetches (line 257). A reload miss does not fail the gesture (doc comment, lines 223-228):TryAdopt(line 259) warns with a publish- or unpublish-specific stale message (line 258), and the page shows the committed state by settingEvent = current with { IsPublished = publish }(line 267), so the button does not offer the toggle again. A failed toggle showstoggled.ActionErrorMessage(L, failureMessage)(line 253): a refusal the API stated, such as a stale row version answering 412 withConcurrency.PreconditionFailed, shows its own localized message (comment, lines 250-252).ActionErrorMessageis the framework's shared rule for a failed user action, an extension onResultinResultUiExtensions(MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ResultUiExtensions.cs:317): anErrorType.Unexpectedresult (a 500, a transport failure, a timeout) shows the page'sfallbackrather than raw diagnostic text, anything else shows the API's stated refusal asLocalizedErrorMessagecomposes it, falling back only when that composes to nothing, and it returnsnullfor a success. The page calls it only on a failure branch, hence the!at both call sites.ErrorTypeis the classification it tests.SessionizeCodeError(lines 280-288) is the Sessionize panel's own format check: null while the code is blank or well formed, otherwise the sameValidation.SessionizeCodeFormatmessage the Edit form shows, sinceSessionizeCodeAttributeapplies the sameSessionizeCodeFormatrule.RefreshFromSessionizeAsync(lines 290-352) first rejects a malformed code before any call, toastingSessionizeCodeError(lines 299-303), because the persist step would refuse it after a round trip with a less specific message. It then resolves the event throughEnsureCurrentEventAsync(line 311) and hands the whole gesture to one service call,RefreshFromSessionizeWithCodeAsync(current, _sessionizeCode, PageToken)(line 316). The service owns persist-then-import-then-reload and returns a singleSessionizeRefreshOutcomecarrying the import summary and the reload's own result, so the page keeps one failure message for the whole gesture. The failure branch toasts throughActionErrorMessage(line 319) and does one more thing: because the code persist and the refresh stamp can both commit before the import fails, moving the row version, it refetches the stored event and adopts it when the read succeeds (lines 325-328). The comment (lines 321-324) names the payoff: the next refresh, save, or publish carries the currentRowVersioninstead of hitting a 409 until a reload, while the typed_sessionizeCodeis left as entered so a retry re-persists it. This is the same client half of ADR-035 described above, applied to a partially committed gesture. On success the summary is shown first (_refreshResult, line 336), and only then is the reload adopted through_writeReload.TryAdopt(refreshed.Reloaded, ...)(line 337): a current reload replacesEvent, re-seeds_sessionizeCodeand toastsSnackbar.SessionizeRefreshCompleted(lines 339-341), while a failed reload warns withSnackbar.SessionizeRefreshedRefreshFailedinstead. The comment (lines 333-335, M246) states why the import is not reported as failed: it committed, so its summary still shows, and the next write re-reads rather than posting the pre-import row version.DeleteEventAsync(lines 354-382): confirm through_deleteConfirm.ShowAsync(Event.Name)(line 361), which returns a plainbool(false when the organizer backs out,MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), so the page returns on!awaitrather than a nullable test, then delete, then navigate back to the list.- Change history (ADR-075): the markup
hosts the framework's
AuditHistoryPanel(.../Pages/Events/EventDetail.razor:212) withFetchPage="FetchHistoryPageAsync".FetchHistoryPageAsync(lines 42-50) asksIAuditHistoryUIService.GetPageAsyncfor one page of the event's recorded changes, newest first, asAuditHistoryEntryDTOrows, passing the Conference service's route prefixAuditHistoryRoutePrefix("Admin/Conference/AuditHistory", line 37, served through the Gateway), the entity name"Event", and the id formatted withCultureInfo.InvariantCulture. The service is resolved from the injectedIServiceProvider(line 34) only when the panel actually fetches; the comment (lines 32-33) gives the reason, a host or test that never shows the panel needs no audit-history client registered.
- Why it's built this way: an event is the root aggregate of the whole conference, so publishing, importing, and editing carry separate audit meaning rather than collapsing into one PUT; keeping each as its own service call is what lets the server enforce its own rules per transition. Pushing the three-step Sessionize gesture into the service (rather than sequencing it in the page) is the same instinct applied one level down.
- Where it's used: the
/events/{Id:int}organizer route (.../Pages/Events/EventDetail.razor:1, gated by[HasPagePermission(ConferencePermissions.EventsManage)]at:2), reached fromEventListrows and fromEventCreate's success redirect. Its "view feedback" button opensOrganizerEventFeedback(.../Pages/Events/EventDetail.razor:141-142). Tests:EventDetailTests,EventDetailSavedRefreshFailedTests,EventDetailSaveTests,EventDetailActionErrorTests,EventDetailHistoryPanelTests, andEventDetailStaleLoadTestsunderMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Events/. - Caveats / not-in-source: what the Sessionize refresh imports, and how it reconciles existing rows, is server-side; this page only shows the returned summary.
DependencyInjection
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI·MMCA.ADC.Conference.UI/DependencyInjection.cs:18· Level 7 · class (static)
What it is: the Conference UI composition root. Its single
AddConferenceUI()method is the one call a host makes to register every Conference UI service (the per-entity CRUD services by assembly scan, then the child-entity, dashboard, feedback, selection, session-asset, offline-schedule, and lookup services explicitly) plus the module descriptor and the framework's feature-flag administration client.Depends on: ConferenceUIModule and, through
AddUIModule<T>(MMCA.Common.UI/DependencyInjection.cs:490-500), the framework's own assembly-scanning helperAddAssignableTypesand the open generic IEntityService<TEntityDTO, TIdentifierType>. Then this module's own service contracts: ISessionSpeakerUIService, ISessionCategoryItemUIService, ISpeakerCategoryItemUIService, ISpeakerDashboardUIService, IOrganizerEventFeedbackUIService, IOrganizerSessionFeedbackUIService, ISessionSelectionUIService, ISessionAssetUIService, IPublicSessionScheduleService, ISpeakerLookupService, IEventLookupService, ICategoryItemLookupService, and ISpeakerDetailLookupService. From the framework it also callsAddFeatureFlagAdministrationUI, which backs the shared FeatureFlagAdmin component (see FeatureFlagAdminService).Concept introduced: the
extension(IServiceCollection)registration block, half convention and half explicit. [Rubric §3, Clean Architecture] and [Rubric §15, Best Practices & Code Quality] both come down to keeping wiring at the edges; this file is the module's one wiring point. It uses the C# preview extension-type syntaxextension(IServiceCollection services)(:20) to hangAddConferenceUI(:26) offIServiceCollection, the same idiom every module'sDependencyInjectionuses. The convention half is delegated toAddUIModule<ConferenceUIModule>()(:30), which does two things in one call (MMCA.Common.UI/DependencyInjection.cs:490-500): a scan of this assembly through the framework'sAddAssignableTypes(:502-506, no third-party scanning library) registering everyIEntityService<,>implementation under its implemented interfaces (ScanRegistration.ImplementedInterfaces) withServiceLifetime.Scoped, and the singleton registration of the descriptor itself (:508); the<summary>onAddConferenceUI(:22-25) calls it "the framework's assembly scan". Registering under the implemented interfaces is what makes a page able to inject the narrow per-entity interface rather than the open generic, and it means adding a new entity service needs no edit here.Walkthrough: the scan runs first (
:30), then the method registers by hand exactly the services the scan cannot see, because they do not implementIEntityService<,>:- three child-entity managers for the join relationships (
:32-35): session speakers, session category items, and speaker category items; - the speaker dashboard service (
:38); - the two organizer feedback moderation services, tagged BR-53 in the comment (
:40-42); - the session-selection decision-support service (
:45); - the session-asset service, registered explicitly because the endpoint has no paged list, no lookup, and no by-id read, so the service declares only the five operations the API actually offers, per the comment (
:47-50); - the feature-flag administration client (
:56-58), given the two flag-owning services' endpoint prefixes in display order,"Admin/Conference/FeatureFlags"then"Admin/Engagement/FeatureFlags"(both behindfeatures:manage), so the sharedFeatureFlagAdmincomponent on the Feature flags page lists every flag in one table. Its comment (:52-55, ADR-031) records why it lives here rather than in each head: the Web, WebAssembly and MAUI clients all get it; - the offline-first page fetch for the public session schedule, tagged to ADR-042 Wave 3 (
:60-61); - three cross-module lookup services (
:63-66); - and the composite lookup for the speaker detail page (
:70), whose comment states its purpose precisely (:68-69): one call and one failure branch over the three lookups that page needs together.
Every per-service registration is
AddScoped; the one singleton is the descriptor, which is stateless, so one instance per container is correct. The method registers noTimeProviderand noIPublicLinkBuilder: neither appears in this file. It returnsservicesfor chaining (:71).- three child-entity managers for the join relationships (
Why it's built this way: scanning the uniform bulk and spelling out the one-off collaborators keeps registration short without hiding the non-trivial wiring.
Where it's used: called once during startup by each of the three UI heads: the Blazor Server host (
MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/Program.cs:89), the WebAssembly client (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web.Client/Program.cs:56), and the MAUI host (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:140), alongside the other modules'AddXxxUI()extensions.
PublicSessionListFilterState
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/PublicSessionListFilterState.cs:12· Level 0 · class (internal static)
- What it is: the translation layer between
PublicSessionList's live filter fields and the flatstring-to-stringmap thatDataGridListPageBase<TDto>persists per page. Two static methods,SaveandRestore, and no state of its own (PublicSessionListFilterState.cs:12). - Depends on: only
System.Globalization(:1) and theRoomIdentifierType/EventIdentifierTypealiases. No component base, no injected service, no fetch. The class doc records the placement rule (:5-10): it is kept beside the page, likePublicScheduleRoomOptions, so the code-behind holds only the live filter fields and the handlers that change them. - Concept introduced, persisted filter state as a pure, audience-aware codec. The list-page base can only persist strings, so every page that saves filters needs a codec. Writing it as a static pair rather than as two page methods buys three things worth naming.
- A sentinel that distinguishes "cleared" from "never set".
Savewrites"all"when a privileged reader has explicitly cleared the event filter (:42), because an absent key means "no saved state, apply the default" while an empty string would be ambiguous.Restorereads that sentinel back as an explicit null plus a resolved flag (:66-70).[Rubric §19, State Management & Data Flow](assesses that restored state is distinguishable from absent state). - Persistence itself is audience-scoped.
persistEventIdis a caller-supplied flag (:33) and the parameter doc states the rule (:22-26): only a privileged reader persists an event choice, because everyone else is always locked to the computed current or next event, so persisting it would only leak into shared URLs. The room filter, by contrast, is persisted for every audience, and theroomIddoc says why in one sentence (:17-20): a room only ever narrows within the reader's own event.[Rubric §26, Front-End Security](assesses that a client-persisted preference cannot widen what a reader sees) and[Rubric §11, Security]. - A restore never destroys a value it cannot read. Every branch in
Restoreis guarded by aTryGetValueplus aTryParse, and each parameter is passed in and returned out unchanged when the map has nothing usable (:57-90), so a corrupt or partial map degrades to "keep what the page already has" instead of resetting the view.[Rubric §24, Forms, Validation & UX Safety].
- A sentinel that distinguishes "cleared" from "never set".
- Walkthrough
Save(:27-44): writessearchverbatim (:35), the My Schedule toggle as an invariantboolstring (:36), the room id as an invariant number or empty (:37), and the event id only whenpersistEventIdis true, with the"all"sentinel for an explicit clear (:39-43).Restore(:57-91): parseseventIdfirst, accepting"all"case-insensitively as an explicit clear and any invariant integer as a pick, settingeventFilterResolvedin both cases so the page knows not to recompute the default (:64-76); thenroomId(:78-82), thenmySchedulecompared case-insensitively against"true"(:84-87);searchfalls back to empty (:89). The five values leave as one named tuple (:57, returned at:90) that the caller destructures straight into its fields.- The method doc records the one thing
Restoredeliberately does not do (:46-49): a restored room that the resolved event does not offer is dropped afterwards by the page's room-options rescope, not here, because this type never sees the events.
- Why it's built this way: the codec is pure and total, so its rules (the sentinel, the audience gate, the keep-on-unparseable behavior) can be exercised without a renderer, and the page keeps a two-line
SaveFilters/RestoreFilterspair instead of forty lines of string handling.[Rubric §14, Testability]and[Rubric §1, SOLID]. - Where it's used: called only from
PublicSessionList's sealed base overrides,SaveFilters(PublicSessionList.razor.cs:130-133, passingpersistEventId: _isPrivileged && _eventFilterResolved) andRestoreFilters(PublicSessionList.razor.cs:142-145).
VenueMapLinks
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Events/VenueMapLinks.cs:10· Level 0 · internal static class
- What it is: a small, stateless helper that decides how a stored venue map URL should render: as an embedded iframe, or as a plain outbound search link.
- Depends on: nothing first-party. Externals:
System.UriandSystem.StringComparer. - Concept introduced, an allow-list of embeddable hosts.
IsGoogleMapsEmbed(lines 159-177) only returns true for anhttpsURL whose host is in the fixedEmbedHostsarray (line 152:www.google.com,google.com,maps.google.com) and whose path is either/maps/embedor/mapswith anoutput=embedquery parameter. The in-code comment (lines 150-151) ties this directly to the page's CSP: theframe-srcdirective (BlazorCsp:FrameSourcesin the UI.Web host'sappsettings.json) has to allow exactly these origins, so the allow-list here and the CSP origin list are two places that encode the same decision.[Rubric #26, Front-End Security]assesses exactly this: an arbitrary stored URL is never framed, only a URL from a host both this check and the CSP agree on. - Walkthrough
IsGoogleMapsEmbed(lines 159-177) parses the URL, rejects anything nothttpsor not onEmbedHosts, then accepts an/maps/embedpath outright or an/mapspath whose query string carriesoutput=embed(case-insensitive on both the pair and its value).BuildSearchUrl(lines 184-187) builds a plain (non-embed) Google Maps search URL from a venue address,Uri.EscapeDataString-encoding the trimmed address, or returnsnullwhen the address is blank.
- Why it's built this way: a Google Maps embed URL only renders correctly inside an iframe (Google refuses to open it as a page directly), so the venue detail page needs to know, from the stored URL alone, which rendering the value calls for, without ever framing a URL from a host that was not agreed on in advance.
- Where it's used:
PublicEventDetail's markup callsIsGoogleMapsEmbedto decide whether to show the expand/collapse map toggle at all, andBuildSearchUrlto render the always-available "open in Google Maps" fallback link (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Events/PublicEventDetail.razor:73,86).
PublicReadAudience
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/PublicReadAudience.cs:10· Level 2 · class (internal static)
- What it is: the one privileged-reader check the public Conference pages share. A single method,
IsPrivilegedReaderAsync(PublicReadAudience.cs:18), answers whether the reader behind the cascaded authentication state holds one ofConferenceReadAudience.PrivilegedRoles(class doc,:6-9). - Depends on:
Microsoft.AspNetCore.Components.AuthorizationforAuthenticationState(:1) andConferenceReadAudiencefromMMCA.ADC.Conference.Shared.Authorization(:2, read at:28). No injected service and no state. - Concept introduced, a fail-closed audience read that still honors cancellation. Four pages branch on "is this reader an Organizer or a ContentEditor"; keeping the read in one method fixes the semantics in one place, and the method doc states them (
:12-17):- No cascaded state means the public audience. A
nulltask returnsfalsebefore any await (:20-23). - The state is awaited, never read synchronously (
:27), so a token that hydrates asynchronously from the HttpOnly cookie is settled before the role test at:28runs. The callers' own comments explain why that ordering matters for them (seePublicEventListandPublicEventDetail). - A faulted state degrades to the narrowest audience, a cancellation does not. The catch filter is
ex is not OperationCanceledException(:31), so an unreadable auth state returnsfalse(:34) and the public page still renders, while a cancellation propagates to the caller's own teardown handling. TheCA1031suppression carries its reason inline (:30).[Rubric §26, Front-End Security](fail closed to the narrower audience) and[Rubric §11, Security].
- No cascaded state means the public audience. A
- Walkthrough:
IsPrivilegedReaderAsync(Task<AuthenticationState>?)(:18-36): null guard (:20-23),awaitthe task (:27), thenPrivilegedRoles.Any(authState.User.IsInRole)(:28); the filteredcatch(:31-35) returnsfalse. - Why it's built this way: the audience decision gates what a public page shows (a grid, a breadcrumb, a redirect), so its edge cases (no state, a faulted state, a cancelled state) must answer identically on every page. One
internal statichelper makes that a property of the code rather than of four copies kept in step by hand, and it is unit-testable without a renderer.[Rubric §14, Testability]. - Where it's used:
PublicEventList(PublicEventList.razor.cs:71),PublicEventDetail(PublicEventDetail.razor.cs:61),PublicSessionList(PublicSessionList.razor.cs:176) andPublicSpeakerList(PublicSpeakerList.razor.cs:122), each assigning_isPrivilegedfrom it.PublicReadAudienceTestspins the eight behaviors, including both cancellation paths propagating (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Public/PublicReadAudienceTests.cs:79,:89) and a faulted state reading as non-privileged (:69).
PublicEventDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Events/PublicEventDetail.razor.cs:19· Level 8 · class (Blazor code-behind)
- What it is: the read-only public view of one event: venue information, support and organizer contacts, and the conference-day conveniences (copy the Wi-Fi details, open directions, a distance-to-venue hint, a collapsible venue map, a QR code for the page itself). The class summary names exactly that scope, a published event with venue info and the organizer contact (
:15-18). For a public visitor it is also the landing page of the whole conference, becausePublicEventListredirects them here. The page inheritsDetailPageBase(PublicEventDetail.razor:5), so the load guard, the page-lifetime token, the load state and disposal all come from the shared base rather than being declared here. - Depends on:
DetailPageBaseforBeginLoad,CompleteLoad,LoadGuard,LoadStateandPageToken(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:28,:38,:45,:52,:59,:78), which wraps aLatestLoadGuardand reads its token throughComponentLifetimeExtensions;IEventUIService(:21),EventDTO(:89,:95),IToastService(:23),PublicReadAudience(:61, which readsConferenceReadAudienceon the page's behalf),ConferenceRoutePaths(:71,:187,:189,:191, and in the markup atPublicEventDetail.razor:31,33), theEventIdentifierTypealias for the typed route parameter (:30,:80,:93),VenueMapLinks(called from the markup, not the code-behind, atPublicEventDetail.razor:73,86) to decide the venue-map rendering, and four device-capability abstractions:IClipboardService,IMapNavigationService,IGeolocationService,IGeocodingService(:24-27), whoseGeoPointresults supply theDistanceKmToused at:250. It also readsIConfigurationfor the host-wide support contacts (:28,:58-59). The markup renders the loading, not-found and failed states through the sharedDetailLoadStateContentcomponent keyed onDetailLoadState(PublicEventDetail.razor:13-19). - Concept introduced, the load guard, the prerender hand-off, the audience-shaped breadcrumb trail, and best-effort progressive enhancement. Four mechanisms are worth extracting.
- Load once per id, and let the newest load win. The route value arrives already typed as
[Parameter] EventIdentifierType Id(:30, bound by the{Id:int}route constraint atPublicEventDetail.razor:1), andOnParametersSetAsynccompares it against the nullable_loadedId(:80) so a re-render does not refetch (:97-106); it is a non-async method that returnsTask.CompletedTaskon the no-change path and otherwise hands back theLoadEventAsynctask directly. On top of that, eachLoadEventAsynccall opens a fresh generation and cancellation token through the base'sBeginLoad()(:111), which also puts the page back into the loading state (DetailPageBase.cs:48-51); both the fetch (:123) and the distance hint (:153) run under that token. The outcome is recorded throughCompleteLoad(generation, result)(:127), which returns false and changes nothing when a newer load has superseded this one (DetailPageBase.cs:67-71), and the distance hint re-checksLoadGuard.IsCurrent(generation)after each await (:238,:244), so a superseded fetch both drops its results and is actually cancelled, not merely ignored. The field comment explains why the generation and not the route id is authoritative (:77-79):_loadedIdis stamped synchronously before the first await, so two rapid route changes would otherwise let the later-completing fetch paint the wrong event. ClearingEventon a failed or superseded result is itself guarded byLoadGuard.IsCurrent(:130-133,:166-169), so a stale failure cannot blank the event a newer load already painted. The load also resets_distanceMilesto null on entry (:113-115): the hint belongs to the previous event, and a venue-less or unsupported event never recomputes it, so without the reset the previous event's distance would stay on screen.[Rubric #19, State Management & Data Flow]. - The prerender's fetch is handed to the interactive pass, once.
PrerenderedEventandPrerenderedEventIdcarry[PersistentState](:82-93), so the event the SSR prerender fetched travels to the interactive instance through persistent component state.LoadEventAsyncfirst asksTakePrerenderedEvent()(:119-123), which returns the persisted DTO only when it was fetched for the current route id and clears both properties either way (:173-183), so the hand-off answers one load at most and never a different id. Every successful load writes both properties back (:137-141), which is what the prerender pass persists at its end. The doc comment notes the DTO is the public event record with no per-reader field (:82-87), which is why sharing it across the two passes is safe. See ADR-056 for the render-mode strategy this lives inside.[Rubric #23, Front-End Performance and Rendering](no duplicate fetch per page view). - The breadcrumb trail depends on the audience, and the audience is awaited first.
OnInitializedAsyncresolves privileged status throughPublicReadAudience.IsPrivilegedReaderAsync(:61) before building the trail (:56-75), then adds the "Events" crumb only for a privileged reader (:69-72). The doc comment states both halves of the reasoning (:48-55): a public visitor was redirected to this page by the event list, so an Events crumb would bounce them straight back here, and the access token hydrates asynchronously from the HttpOnly cookie, so reading roles synchronously would render the wrong trail and correct it on the next render. A faulted auth read is treated as non-privileged by the shared helper, which lets a cancellation propagate instead (PublicReadAudience.cs:31).[Rubric #25, Navigation & Information Architecture](assesses that navigation affordances lead somewhere the reader can actually use) and[Rubric #26, Front-End Security](fail closed to the narrower audience). - Every capability is optional.
TryComputeDistanceAsync(:230-252) returns early when geolocation or geocoding is unsupported or the venue address is blank (:232-235), and again on any null result or superseded generation (:238,:244), so a denied permission or an offline geocoder simply leaves the hint off. The doc comment states the rule plainly: this must never block the page (:225-229).[Rubric #29, Resilience & Business Continuity](assesses degradation when an optional dependency is absent) and[Rubric #26, Front-End Security](a location read is soft and unblocking, never a gate on content). These come from the device-capability layer of ADR-042. A fifth detail is a small but real configuration rule: a per-eventOrganizerContactEmailwins over the host-wideSupport:Email, and it is re-evaluated on every load so navigating between events never leaves the previous organizer's address on screen (:146-151).[Rubric #15, Best Practices & Code Quality]: a conference can publish its own contact without a redeploy. A sixth is how the one-shot device calls get their token: they pass the base'sPageToken(:204,:218), which reads the base's source throughLifetimeToken()(DetailPageBase.cs:38) because readingTokenoff a disposed source throwsObjectDisposedException; disposal cancels before it disposes, so a handler that resumes after the reader navigated away receives an already-cancelled token and stops through itsOperationCanceledExceptionpath.
- Load once per id, and let the newest load win. The route value arrives already typed as
- Walkthrough
LoadEventAsync(:108-171): begin a fresh generation and token fromBeginLoad()(:111), reset_distanceMiles(:113-115), then take the prerendered event if one was persisted for this id, or else fetch with children under that token, passing the typedIdstraight through with no string parse (GetByIdAsync(Id, true, token),:121-123). A superseded, not-found or failed result goes throughCompleteLoadand clearsEventif this load is still current (:127-134); it raises no toast, because the page body states the outcome throughDetailLoadStateContentwith a Retry for a failure (comment:125-126; markupPublicEventDetail.razor:13-19, whoseOnRetryre-runsLoadEventAsync). On success it persists the event for the prerender hand-off (:137-141), setsEventand resets_showMapto false (:143-144, so navigating to a different event never leaves the previous one's map expanded), resolves the support address (:146-151), and runs the distance hint, passing both the generation and the same token (:153).OperationCanceledExceptionis swallowed as expected teardown (:156-159); a broadcatch (Exception)treats a transport fault as a failed load, recording anError.Unexpectedfailure throughCompleteLoadand clearingEventunder the same currency check (:161-170). That catch-all sits inside aCA1031suppression pair whose justification is stated on the disable line: a last-resort load failure becomes the failed-load body with Retry, never a broken page (:160,:162).TakePrerenderedEvent(:173-183): returnsPrerenderedEventonly whenPrerenderedEventId == Id, then nulls both properties._showMap(:45-46) andToggleMap(:193) back a collapse/expand toggle for the venue map: the markup only offers it whenVenueMapLinks.IsGoogleMapsEmbedrecognizes the storedVenueMapUrl(PublicEventDetail.razor:73), and only actually renders the iframe when_showMapis true (PublicEventDetail.razor:90-100), so third-party map content does not load until the reader asks for it.VenueMapLinks.BuildSearchUrlalways renders the plain "open in Google Maps" link beside the toggle as a fallback (PublicEventDetail.razor:86-89).CopyWifiAsync(:197-208): copiesEvent.WiFiInfothrough the clipboard abstraction underPageToken(:204) and reports success or failure with one toast whose severity flips on the result (:205-207).OpenDirectionsAsync(:210-223): native heads launch the platform maps app, browsers open a maps site, again underPageToken(:218); a false return raises a warning.TryComputeDistanceAsync(:230-252): takes the load generation and aCancellationTokenfrom the caller rather than reading a page token itself, geocodes the venue under that token (:237), reads the current-or-last-known position the same way (:243), converts kilometres to miles with an explicit named constant (:249-250), and callsStateHasChanged()(:251) because the value arrives after the render that requested it; the markup renders it to one decimal in the viewer's culture (PublicEventDetail.razor:59-64).- Navigation helpers (
:185-195) route back to the list (privileged readers only, per the comment at:185-186), on to the public schedule, on to the activities page, and to the event feedback form, whose/feedback/event/{Id}path is built withstring.Create(CultureInfo.InvariantCulture, ...)so the numeric id formats the same under any UI culture (:195). The page declares no disposal of its own: the base'sDispose(bool)releases the load guard (DetailPageBase.cs:120-129) and then callsCancellablePageBase.Dispose(bool), which cancels and disposes the page-scoped token source (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CancellablePageBase.cs:41-51).
- Why it's built this way: the public event page is the one an attendee opens while standing in the building, so its extras (Wi-Fi, directions, distance, the venue map) are worth having, none of them is worth failing the page over, and the map specifically stays collapsed by default so the table stays compact and no third-party (Google) content loads until the reader chooses to see it (
PublicEventDetail.razor:75-79in-code comment). Taking the load guard, token and load state fromDetailPageBasegives this page the same not-found and failed-with-Retry body as the other detail pages built on that base, rather than a page-specific toast. - Where it's used: the
/conference/events/{Id:int}route (PublicEventDetail.razor:1,[AllowAnonymous]at:4), reached fromPublicEventListeither as a grid row (privileged) or as areplace: trueredirect (everyone else); its markup also renders theQrCodeButtonfor this page's own public link (PublicEventDetail.razor:31). A bUnit suite renders it directly (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Public/PublicEventDetailTests.cs).
PublicEventList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Events/PublicEventList.razor.cs:29· Level 9 · class (Blazor code-behind)
- What it is: the
/conference/eventsroute, where the audience decides whether a list is shown at all. A privileged reader (Organizer or ContentEditor) gets the full grid of published and unpublished events; every other visitor is redirected to the current or next event's detail page (class doc,PublicEventList.razor.cs:12-28). - Depends on: extends
DataGridListPageBase<TDto>closed overEventDTO(:29), whoseReloadActiveLayoutAsyncandMobilePageFetcherit calls (:120,:139);IEventUIServiceandIEventLookupService(:33-34), an injectedTimeProvider(:36),PublicReadAudience(:71),CurrentEventSelector(:90),EventInfo(:80),ConferenceRoutePaths(:102,:142),MobileInfiniteScrollList<TItem>(:45, rendered atPublicEventList.razor:23), andResultin the shared fetch signature (:124,:138). Server-side the audience split is enforced byPublishedEventSpecification. - Concept introduced, the audience gate as a routing decision, and the three-state render. This page is the sharpest example in the group of a UI decision that has to wait for identity.
- Resolve the audience before deciding anything.
OnInitializedAsyncawaitsPublicReadAudience.IsPrivilegedReaderAsyncover the cascadingTask<AuthenticationState>first (:71). The comment (:68-70) and the class doc (:21-25) both name the failure this prevents: on all three heads (Blazor Server, WebAssembly, MAUI) the access token hydrates asynchronously from the HttpOnly cookie, so a synchronous role read would see an anonymous principal and bounce an organizer off their own list. A faulted read is treated as non-privileged by the shared helper (PublicReadAudience.cs:31).[Rubric §11, Security]and[Rubric §26, Front-End Security](assess that an authorization-shaped branch reads a settled principal, and fails to the narrower audience). - Three states, and one of them renders nothing.
_showGrid(:52) opens the search box and the layout switch for a privileged reader (:73-77);_showEmpty(:60) is set only when nothing is published anywhere, so there is no redirect target and the page has to stay and say so (:106-108); and the redirect path deliberately leaves both false (:97-104), so the page stays blank until the navigation takes effect instead of flashing a list on the way out. The field doc spells this out (:54-59).[Rubric §18, UI Architecture & Component Design](assesses that intermediate states are designed rather than incidental). replace: trueon the redirect. The comment (:99-101) records the exact trap it prevents: left in the history stack, Back from the event detail would land here and redirect straight forward again, trapping the visitor on the detail page (NavigateToat:102).[Rubric §25, Navigation & Information Architecture](assesses that the Back button keeps working). The redirect target is computed withCurrentEventSelector.SelectCurrentOrNext, passing the four accessors explicitly because the lookup returnsEventInforather thanEventDTO, which the comment calls out (:86-95). "Now" comes from the injectedTimeProvider(TimeProvider.GetUtcNow().UtcDateTime,:95) rather than the static system clock, so the live-window decision reads a replaceable clock. It is the same live-window math every other landing surface uses, so a visitor always lands on the conference that is actually happening. A failed lookup is non-critical and leaveseventsnull (:79-84), which falls through to the empty state rather than to a broken redirect.
- Resolve the audience before deciding anything.
- Walkthrough
GridRef(:41) exposes the captured grid so the base can restore rows-per-page and current page;RetryLoadAsync(:44) re-runs the fetch from the inline error state the base renders whenLoadFailedis set (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:55).[Rubric §29, Resilience & Business Continuity].SaveFilters/RestoreFilters(:111-115) persist the one search term;OnSearchChanged(:117-121, a non-async method that returns the reload task) stores it and reloads whichever layout is active through the base's ownReloadActiveLayoutAsync(_infiniteList)(:120;MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879), which on a phone saves the filters before resetting the card list and otherwise reloadsGridRef.- One fetch and one filter callback serve both layouts.
FetchEventsAsync(:123-126, commented "The one fetch both layouts use") forwards toEventService.GetPagedAsync, andApplyFilters(:131-135) turns the search string into aName containsserver filter.LoadServerData(:128-129) hands both to the base'sLoadServerDataAsyncwithshowCancelSnackbar: false, so a superseded fetch (the reader typed another character) is silent rather than raising a toast.[Rubric §15, Best Practices & Code Quality]: the grid and the phone list cannot drift apart on their filter. FetchMobilePage(:138-139) is the parallel infinite-scroll path, now a property built by the base'sMobilePageFetcher(FetchEventsAsync, ApplyFilters, "Name")(DataGridListPageBase.cs:1101), so it reuses that same fetch and filter and sorts byNameascending;OnMobileCardClick(:141-142) routes toPublicEventDetail.
- Why it's built this way: a public visitor cares about the conference that is running or coming up, not about a roster of past editions, while an organizer curating the catalog needs every row including the unpublished ones. One route serving both is cheaper than two, provided the audience is known before the branch is taken.
- Where it's used: the
/conference/eventsroute (PublicEventList.razor:1). Every non-privileged arrival leaves immediately forPublicEventDetail; privileged rows and cards navigate to the same page. - Caveats / not-in-source: the published-only scoping of the underlying reads for non-privileged callers (BR-108, class doc
:26-27) is enforced in the Conference API throughPublishedEventSpecification, not on this page.
ConferenceTrackInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHomeContent.cs:90· Level 0 · record (sealed, internal)
- What it is: one row of the landing page's track catalogue: a track
Name, anIcon(a MudBlazor icon path constant), and aTopicsstring listing the track's subject areas (:81). - Depends on: no first-party types. The
Iconvalues are MudBlazorIcons.Material.Filled.*constants (external, imported at:1). - Concept introduced: this is one of three static-content records held by ADCHomeContent; the two-tier content model is taught under KeynoteSpeakerInfo and reused by PreConferenceWorkshopInfo.
- Walkthrough: a three-property positional record. The whole catalogue is the
ADCHomeContent.Tracksproperty, anIReadOnlyList<ConferenceTrackInfo>initialized inline as a collection expression (:34-52) with eight entries (:36,:38,:40,:42,:44,:46,:48,:50), each spanning two lines: the track name and its icon constant on the first, the topics blurb on the second. They run from "Foundations (Beginner & Student)" (:36-37) to "Career, Leadership & Community" (:50-51), with the two AI tracks, languages, web/mobile/cross-platform, security, and game/XR in between. EveryIconis a MudBlazorIcons.Material.Filled.*constant picked per track (School,Psychology,AutoAwesome,Code,Devices,Security,SportsEsports,Groups). Storing the icon as astring(rather than aRenderFragmentor an enum) is what keeps the record a plain data type: the markup passes it straight to<MudIcon Icon="@track.Icon">(ADCHome.razor:241). - Why it's built this way: the track list changes once per conference cycle and is editorial rather than transactional, so it lives in the assembly instead of behind an API call or a CMS; the remark on ADCHomeContent names the track catalog alongside the keynote bio as deliberately English-only editorial content, with the localized chrome around it (
:10-14). The collection is a get-only static property, so it is initialized once per process, not per render. - Where it's used:
ADCHomeContent.Tracks(:34), rendered as the track grid inADCHome.razor(:233-250): oneMudItem/MudCardper entry, keyed bytrack.Name(ADCHome.razor:236), showing the icon (:241), the name (:243), and the topics line (:245).
EventPhase
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHome.razor.cs:90· Level 0 · enum (private)
- What it is: the four-state classification of the featured event relative to now:
Unknown,Upcoming,Live,Ended(:94-105). It is the single switch the landing page's hero renders from.Unknownis the first member, so it is also the field's default value, and its doc comment defines it as no featured event known yet (prerender, read pending, or read failed), in which case the hero shows no date and no countdown digits rather than a guessed date that would visibly jump once the real event arrives (:96-101). - Depends on: nothing.
- Concept introduced: deriving a render state from a clock instead of storing it. [Rubric §19, State Management and Data Flow] assesses whether UI state is derived from a single source of truth or duplicated into flags. There is no
IsLiveboolean anywhere on the page:UpdateCountdown()recomputes_phaseevery time it runs, first from whether an event is known at all (_event is nullgivesUnknown,ADCHome.razor.cs:336-340) and otherwise from the injectedTimeProvideragainst the converted UTC window (:356-362), and the markup branches on that one field. Recomputing rather than storing means a stale phase is impossible after a timer callback, a parameter change, or the interactive render pass that follows prerender. TheUnknownstate is the same idea applied to missing data: the page states "nothing known" as a phase instead of inventing a fallback date to classify. - Walkthrough: with an event present, the assignment is a switch expression over
now(:357-362):now < _startUtcgivesUpcoming,now < _endUtcgivesLive, anything later givesEnded.ArmPhaseTimerForEventEnd()reads it as its guard, returning immediately unless the phase isLive(:181-184), which is what makes the Live-to-Ended timer a single one-shot rather than a recurring tick;TicketsOnSale()reads it too, true only forUpcoming(:112). In the markup the loading branch comes first (ADCHome.razor:44-47, aPageLoadingStatewhile_isLoading), thenUnknownrenders an empty,aria-hiddencountdown-placeholderblock of the countdown's height so the hero does not shift (ADCHome.razor:48-53),Upcomingrenders theHomeCountdownchild (ADCHome.razor:54-59),Liverenders the "event live" chip plus a button to/happening-now(ADCHome.razor:60-74), andEndedrenders the post-event chip (ADCHome.razor:75-85). The hero's ticketing button sits outside that branch (ADCHome.razor:93-94) but is gated onTicketsOnSale(), so it shows only in theUpcomingphase and only when the event publishes a URL. - Why it's built this way: four named states read far better at the call site than nested date and null comparisons, and keeping the enum private to the component signals it is a view concern, not a domain concept. The domain's own notion of a live window lives server-side and in CurrentEventSelector.
- Where it's used: the
_phasefield on ADCHome (:83),TicketsOnSale()andArmPhaseTimerForEventEnd()in the same file, and its Razor markup only.ADCHomeEventUnknownTestspins theUnknownrendering: no date while the read is pending, no date and no countdown digits when it fails, the keynote and track cards still rendering, and the date and countdown appearing once the event loads (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Home/ADCHomeEventUnknownTests.cs:45,:56,:71,:84).
KeynoteSpeakerInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHomeContent.cs:81· Level 0 · record (sealed, internal)
- What it is: the keynote block's content: the speaker's
Name,Title(their role), an optionalBadge(a recognition chip rendered above the title, e.g. "Microsoft MVP"), theTalkTitle, an optionalPhotoFileName, andBioParagraphsas anIReadOnlyList<string>(:86-92). - Depends on: no first-party types. BCL only.
- Concept introduced: the two-tier content model of a landing page. The page splits its content into dynamic data fetched from the API (dates, venue, name, ticketing link, sponsors, as
EventDTOandSponsorDTOthroughIEventUIServiceandISponsorUIService,ADCHome.razor.cs:52-55and:80-83) and editorial data compiled into the assembly (keynote, tracks, and workshops, held by ADCHomeContent as this record and its siblings ConferenceTrackInfo and PreConferenceWorkshopInfo). [Rubric §23, Front-End Performance and Rendering] is the payoff: the keynote, the workshop cards, and the track grid render on the first frame with zero network dependency, so a cold or unreachable backend degrades only the countdown, the hero ticketing button, and the sponsor strip, never the page. [Rubric §27, Internationalization] is the deliberate exception: the holder class carries a written remark recording that this English-only editorial content is the same copy the API would serve, while the chrome around it is localized instead (:10-14). That convention is how ADR-027 distinguishes "not yet translated" from "intentionally untranslated". - Walkthrough: a six-property positional record. The single instance is the get-only
ADCHomeContent.Keynoteproperty, initialized inline (:18-31): Jared Rhodes,Title: "Principal Consultant, EPAM Systems",Badge: "Microsoft MVP", the talk "More Software, Different Work",PhotoFileName: "jared-rhodes.webp"(:26), and a three-paragraph abstract (:28-30). Splitting the recognition into its ownBadgeproperty rather than folding it intoTitle(as an earlier draft did, joining "Microsoft MVP" and the role into one string) lets the markup render the badge as a separate chip and omit it entirely for a keynote with none, sinceBadgeis nullable.BioParagraphsis a list rather than one string so the template can emit each paragraph in its own element instead of relying on whitespace preservation (ADCHome.razor:203-206). The record carries only the portrait's file name, not a path: the usablesrcis composed from the head-specificImageBasePathparameter throughKeynoteImageSrc, which returns$"{ImageBasePath}/speakers/{fileName}"ornullwhen no file name is supplied (ADCHome.razor.cs:56-57). That split exists because a head could package its assets elsewhere, and thenullcase is still guarded in the markup so the card renders name and title without a portrait (ADCHome.razor:179-192). - Why it's built this way: the keynote changes once per conference cycle, so a database round-trip and an admin screen would be pure overhead. The image choice is the interesting half. The comment above the file name (
:22-25) records that the shipped asset is a WebP derivative sized to the display resolution, 640px square against a 300px CSS frame so it still has headroom at 2x device pixel ratio, weighing 17 KB against 306 KB for the 2048px source JPEG, and that because both hosts resolve it throughImageBasePaththe file must ship in both wwwroots (the Web client and the MAUI head). The original JPEG stays in the repo as the re-encode source. The markup addsloading="lazy"with the reason inline (ADCHome.razor:182-184): the keynote sits below the hero, so it is never the largest-contentful-paint element, andMudImagesplats unmatched attributes onto the renderedimg, so the hint actually reaches the DOM. Both are [Rubric §23, Front-End Performance and Rendering] in the small. - Where it's used:
ADCHomeContent.Keynote(:18), read byADCHome.KeynoteImageSrc(ADCHome.razor.cs:56-57) and rendered in the keynote section ofADCHome.razor(:163-211): the portrait (:185-190), the alt text and name (:186,:193), the badge chip and the role (:195), the talk title (:202), and the paragraphs (:203-206).
PreConferenceWorkshopInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHomeContent.cs:98· Level 0 · record (sealed, internal)
- What it is: one pre-conference workshop card: a resource-key stem
Key, the workshopTitle, aSubtitle, thePresentername, anIcon, and aDetailsUrlfor the workshop's public detail page (:103-109). Two instances make up the whole workshops section. - Depends on: no first-party types. The
Iconvalues are MudBlazorIcons.Material.Filled.*constants (external). - Concept introduced: the half-localized content record. [Rubric §27, Internationalization] assesses whether user-facing text resolves through resources rather than sitting in code, and this record is the interesting middle case that the other two content records do not show. Instead of choosing "all in code" or "all in resources", it splits by kind of string: proper nouns and public-site addresses stay in code (workshop titles, subtitles, presenter names, and the
DetailsUrl) because translating a talk title, a person's name, or a URL would be wrong, while the prose that describes each workshop lives in the.resxpair. The bridge isKey, documented on the record itself: the markup composesWorkshops.{Key}.AudienceandWorkshops.{Key}.Descriptionat render time (ADCHome.razor:136,:139), and those keys exist in both locales (MMCA.ADC.Conference.UI/Pages/Home/ADCHome.resx:26-29, with the Spanish twins inADCHome.es.resx). One consequence worth noticing: adding a workshop means adding four resource entries per locale, and a typo inKeyfails at runtime as a missing resource rather than at compile time. - Walkthrough: a six-property positional record. The catalogue is the get-only
ADCHomeContent.Workshopsproperty (ADCHomeContent.cs:60-74) with two entries:"AiReadyDotNet", "Build an AI-Ready .NET App with an AI Pair", subtitled "One Day, the Whole SDLC with an AI Pair", presented by Ivan Ball-llovera with theSmartToyicon, linking tohttps://www.atldevcon.com/workshops/ivan-ball-llovera; and"SoftwareFactory", "Beyond the Basics: Starting Your Software Factory", subtitled "Automated Multi-Agent Development Pipelines", presented by Tim Rayburn with thePrecisionManufacturingicon, linking tohttps://www.atldevcon.com/workshops/tim-rayburn. The doc comment above the property states the split in one sentence. The property and the record's file are wrapped in anS1075suppression pair, with the reason inline: the detail addresses are published pages on the public conference site, not environment-dependent paths, so there is nothing to configure. The markup renders the list as a two-column grid (ADCHome.razor:120-145), keyed byworkshop.Key(:123), each card showing the icon in a circle (:128), the title (:130), the localizedWorkshops.PresenterLabelformatted with the presenter name (:132-134), the audience line (:135-137), and the description (:138-140). - Why it's built this way: the workshop day runs before the conference day, and the section is placed between the hero and the keynote so the page reads in the same order as the event, which the markup comment records (
ADCHome.razor:86-88). Two facts the cards would otherwise repeat, the schedule and the venue, are hoisted into one shared logistics line above the grid (ADCHome.razor:107-118), which is why they are resources (Workshops.Schedule,Workshops.Venue,ADCHome.resx:21-22) rather than record fields. Ticketing is the other deliberate asymmetry: the workshop day sells on its own TicketLeap page, so its call to action reads thePreConferenceTicketingUrlconstant (ADCHome.razor.cs:29-30) and always renders (ADCHome.razor:147-159), while the hero's conference-day button readsTicketingUrloff the featured event and hides itself when absent.DetailsUrlis a newer addition than the ticketing constant: it gives each card a link to the presenter's own detail page on the public conference site rather than only naming the presenter inline. [Rubric §26, Front-End Security]: the workshop ticketing button opens withTarget="_blank"together withrel="noopener noreferrer"(ADCHome.razor:155). - Where it's used:
ADCHomeContent.Workshops(:64) and the workshops section ofADCHome.razor(:85-161) only.
ADCHomeContent
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHomeContent.cs:15· Level 1 · class (static, internal)
- What it is: the landing page's editorial content, lifted out of the code-behind into its own file: the keynote card, the conference track catalog, and the pre-conference workshop catalog, as three get-only static properties.
- Depends on: KeynoteSpeakerInfo, ConferenceTrackInfo, and PreConferenceWorkshopInfo (all three declared in this same file,
:81,:90,:98), plus MudBlazor'sIcons.Material.Filled.*constants (:1). - Concept introduced: separating content from orchestration inside one page. [Rubric §18, UI Architecture and Component Design] assesses whether a component has one job and whether its structure makes that job legible. The class summary states the intent verbatim (
:5-9): the content is kept beside the page, like the other page-local data holders, so the code-behind stays orchestration only. That is the practical difference between a 375-line code-behind that reads as a lifecycle (fetch, classify, arm a timer, dispose) and one where three paragraphs of conference copy sit betweenOnInitializedAsyncandDispose. [Rubric §15, Best Practices & Code Quality] is the follow-on: editing the track list for next year's conference touches exactly one file that contains no logic, so the review is a content review. The other reason this is a distinct type rather than a region: theinternalaccessibility. The three records and the holder are allinternal sealed/internal static, so they are visible to the page and to nothing outside the assembly, but unlike the private inner records of ADCHome they can live in their own file. [Rubric §27, Internationalization]: the class remark (:10-14) is where the deliberate English-only decision for this content is recorded, per ADR-027. - Walkthrough: three static get-only properties, each initialized once at type initialization.
Keynote(:18-31): a single KeynoteSpeakerInfo, including the comment (:23-25) that explains the shipped portrait:PhotoFileNamenames a WebP derivative at display resolution (640px square against a 300px CSS frame, so it keeps headroom at 2x DPR), 17 KB (:26). It ships once, in this library'swwwroot/images/speakers, and every head serves it from_content/MMCA.ADC.Conference.UI, which is the path ADCHome composes through itsKeynoteImagePathconstant (ADCHome.razor.cs:48).Tracks(:34-52): anIReadOnlyList<ConferenceTrackInfo>collection expression with the eight conference tracks.Workshops(:60-74): anIReadOnlyList<PreConferenceWorkshopInfo>with the two pre-conference workshops, below the doc comment that spells out which fields are code (titles, subtitles, presenter names, the public detail page addresses) and which resolve from the page resources through the record'sKey(:54-59). The twoDetailsUrladdresses are plain string literals with no analyzer suppression around them (:67,:73).
- Why it's built this way: exposing the three as
{ get; }properties rather than public fields means the collections are initialized exactly once per process and shared by every circuit on the server head, which matters because the server head renders this page for every connected user. ReturningIReadOnlyList<T>rather than an array keeps the markup's@foreachhonest about the collection being read-only. - Where it's used: ADCHome only:
KeynoteImageSrcreadsADCHomeContent.Keynote.PhotoFileName(ADCHome.razor.cs:66-67), the pre-conference ticketing constant's doc comment points at theWorkshopscatalog (ADCHome.razor.cs:25), and the markup reads all three (a comment atADCHome.razor:111,:149for the workshop grid,:232,:239,:240,:245,:250,:257,:258for the keynote card,:290for the track grid).
PublicScheduleRoomOptions
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/PublicScheduleRoomOptions.cs:13· Level 3 · class (internal static)
- What it is: the pure functions behind the public schedule's Room picker and Room column. Given the events
PublicSessionListhas already loaded,IndexNamesbuilds the id-to-name map the list renders with, andScopereturns the ordered room options for the active event filter plus the room filter that survives that scoping (PublicScheduleRoomOptions.cs:20,:37). - Depends on:
RoomDTOandEventDTOfromMMCA.ADC.Conference.Shared.Events(:1), plus theRoomIdentifierTypeandEventIdentifierTypealiases. Nothing else: no injected service, no fetch, no component base. - Concept introduced, the derived filter option set with a self-healing selection. Two ideas are worth extracting from a sixty-line file.
- Derive, do not fetch. The class doc states the rule (
:5-9): the page already reads/events?includeChildren=true, so its rooms are in memory and narrowing the schedule by room costs zero extra round trips. The same doc records the security consequence that comes for free: that events read is published-only for non-privileged audiences server-side, so an unpublished event's rooms can never reach the picker.[Rubric §23, Front-End Performance & Rendering](assesses avoidable network work per interaction) and[Rubric §26, Front-End Security](assesses that a client-derived option set cannot widen what the server already scoped). - A selection that cannot go stale. The last block of
Scope(:53-55) re-validatesselectedRoomIdagainst the freshly scoped list and returnsnullwhen the room is no longer offered. The comment names both ways that happens (:51-52): the reader switched events, or a stale choice was restored from saved page state byPublicSessionListFilterState. Without it, an unreachable room id would filter every session out and the reader would see an empty schedule with no visible cause.[Rubric §19, State Management & Data Flow](assesses that derived state is reconciled rather than left to drift) and[Rubric §24, Forms, Validation & UX Safety].
- Derive, do not fetch. The class doc states the rule (
- Walkthrough
IndexNames(:18-27): a nested loop over every loaded event'sRooms, adding eachId-to-Namepair withTryAdd(:24) so a room that two loaded events both reference is indexed once rather than throwing. The map it fills is the page's own_roomNamesdictionary, added to in place (:17), which is what the list's Room column and mobile card line read.Scope(:37-58): scoping (:42-44), where a non-nulleventIdtakes that event'sRooms(an unknown id yields an empty list through the?? []fallback) and a null id, which only a privileged reader viewing every event can produce, takes the union across all loaded events; shaping (:46-49),DistinctBy(r => r.Id)because the union can repeat a room, thenOrderBy(Sort).ThenBy(Name, StringComparer.OrdinalIgnoreCase)so the picker order is the organizer's intended order with a deterministic case-insensitive tiebreak; reconciliation (:53-55) and the tuple return (:57), which the caller destructures straight into its two fields.
- Why it's built this way: keeping this out of the page makes it a plain static function over data, directly unit-testable without a renderer, and it keeps the page's own code down to one line (
PublicSessionList.razor.cs:232-233).[Rubric §14, Testability]and[Rubric §1, SOLID]. - Where it's used:
IndexNamesis called once per events load (PublicSessionList.razor.cs:189);Scopeis called by that page'sRefreshRoomOptions(:151-152), from the initial load (:147) and from every event-filter change (:216). The options it returns are passed down toPublicSessionListFilterBar'sRoomsparameter and the surviving id to itsSelectedRoomId.
ADCHome
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC.Conference.UI/Pages/Home/ADCHome.razor.cs:21· Level 9 · class (sealed partial component)
What it is: the conference landing page: hero with a live countdown and a ticketing button, pre-conference workshops, keynote, track catalogue, sponsor strip with a sponsorship call to action, a partners band, and venue block. It loads the published events through the UI service layer to find which event to feature, classifies that event as Upcoming/Live/Ended, loads that event's sponsors and partners, and renders the rest from the compiled-in editorial content in ADCHomeContent. It is shared verbatim by the Web and MAUI heads through the one ADCHomePageContent, and its class doc records that its editorial image ships once, as a static web asset of this library (
:13-20).Depends on: IEventUIService (
:50-51), ISponsorUIService (:53-54), and IPartnerUIService (:56-57) for the three reads, an injectedTimeProvider(:59-60) as the page's only clock, EventDTO for the featured event (:80), SponsorDTO and PartnerDTO for the grouped strips (:82-83,:85-86), EventPhase (a private inner enum,:90-101), ADCHomeContent with its KeynoteSpeakerInfo, ConferenceTrackInfo, and PreConferenceWorkshopInfo records, CurrentEventSelector fromMMCA.ADC.Conference.Shared.Events, SponsorTier and PartnerType, and ConferenceRoutePaths for the "see all sponsors" link (ADCHome.razor:369). Externals:IStringLocalizer<ADCHome>injected in the markup asL(ADCHome.razor:2),System.Threading.Timer,TimeZoneInfo, MudBlazor, the BlazorRendererInfoAPI, and theLifetimeToken()extension onCancellationTokenSource(MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ComponentLifetimeExtensions.cs:26). It composes one first-party child component,HomeCountdown(ADCHome.razor:58), which lives in the same folder as a single.razorfile with no code-behind.Concept introduced: rendering correctly across the prerender and interactive passes. [Rubric §23, Front-End Performance and Rendering] assesses whether a page avoids wasted renders and blocking work; this component is the chapter's clearest case study, and both of its decisions are recorded in the code comments. See ADR-056 for the render-mode strategy these two decisions live inside.
- Skip the fetch during prerender.
OnInitializedAsyncchecksRendererInfo.IsInteractiveand, when false, sets_isLoading = false, runsUpdateCountdown()(which, with no event, yields theUnknownphase), and returns without touching the network (:147-152). The comment (:142-146) states why: an untimed server-side call to a cold or unreachable backend would block the prerender, and therefore the page load and the post-loginNavigateTo("/"), indefinitely. The static fallback (brand name, no date, no countdown digits) renders immediately and the interactive pass loads the real event. Prerender is a one-shot static render, so the timer is moot there. [Rubric §29, Resilience and Business Continuity] is the same point from the availability angle. - Fence the per-second re-render. The ticking digits live in the
HomeCountdownchild, which owns its own timer, so this page arms only a single one-shotTimerfor the Live-to-Ended flip (:173-192). The method's summary records the alternative: a 1-second timer would tick the entire page for the whole event, per circuit, just to catch this one flip (:173-176). The child goes further still: it ticks once a minute while more than 65 minutes remain (SlowTickThreshold) and switches to once a second only for the final 65 minutes (MMCA.ADC.Conference.UI/Pages/Home/HomeCountdown.razor:33,:53-56,:60,:71-74), and it too refuses to start a timer unlessRendererInfo.IsInteractive(HomeCountdown.razor:53).
Four more rubric threads run through it. [Rubric §22, Responsive and Cross-Browser/Device]: one component compiles into the Blazor Server, WebAssembly, and MAUI heads with no per-head parameter at all: the keynote portrait resolves from the fixed
KeynoteImagePathconstant,_content/MMCA.ADC.Conference.UI/images/speakers, the same static-web-asset root every head already loadsadc-ui.cssfrom (:43-48). [Rubric §27, Internationalization]: user-facing chrome resolves throughL[...], while the strings that must not be translated carry explicit// i18n: allowmarkers with reasons (the ticketing URL, the brand name, the postal address). [Rubric §20, Design System and Theming]: the page's scoped stylesheet is a single shared copy rendered by both heads, and an architecture fitness test embeds it and fails the build if it re-hardcodes the brand hex instead of usingvar(--mmca-primary)(MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Ui/BrandColorTokenTests.cs:12-17, embedded viaMMCA.ADC.Architecture.Tests.csproj:19-20). [Rubric §14, Testability]: every read of "now" (featured-event selection:221, the end-of-event timer:184, the phase switch:347) goes through the injectedTimeProviderrather thanDateTime.UtcNow, so the event choice and the phase share one clock that a test host can replace.- Skip the fetch during prerender.
Walkthrough, in lifecycle order:
- Constants and state (
:23-88): thePreConferenceTicketingUrlconstant placed first because SA1203 requires constants before fields, with its doc block andS1075suppression (:23-35), thenMaxRoster(:37-41), a fixed upper bound of200on one event's sponsor or partner roster passed explicitly to the paged reads because the underlying endpoints default to 10 rows per page and a conference announces dozens, not thousands, thenKeynoteImagePath(:43-48), the library's static-web-asset folder for the keynote portrait. Then the three injected UI services (:50-57), the injectedTimeProvider(:59-60), the derivedKeynoteImageSrc(:62-67), astaticproperty that returns$"{KeynoteImagePath}/{fileName}"ornullwhen no photo file is supplied, aCancellationTokenSource(:69) with aLifetimeTokenaccessor over it (:71-74), the one-shot_phaseTimer, the computed_startUtc/_endUtc,_phase, the nullable_event(EventDTO?,:80), the grouped_sponsorTiersoverSponsorDTO(:82-83) and_partnerGroupsoverPartnerDTO(:85-86),_isLoading(startingtrue), and a_disposedguard the timer callback checks (:88).LifetimeTokenexists because readingTokenoff a disposed source throwsObjectDisposedException;Disposecancels before it disposes, so a load that resumes after the reader navigated away gets an already-cancelled token and stops through itsOperationCanceledExceptionpath (comment:71-73). TicketsOnSale()(:103-108): a method rather than a cached flag, returning true only when_isLoadingis false and_phaseisEventPhase.Upcoming. The markup reads it on every render to gate both ticketing calls to action, the hero button (ADCHome.razor:94, also requiring a publishedTicketingUrl) and the pre-conference workshops button (ADCHome.razor:194), so the Upcoming-to-Live flip from the countdown removes both without a reload and neither shows while the featured event is still loading (doc comment:103-107, markup commentsADCHome.razor:87-92,:189-193).- Derived display properties (
:110-117):EventName,EventDescription,VenueAddress, andMapSearchUrlare each_event?.X ?? <fallback>, so the page is fully renderable before and without a successful fetch. The name and address fallbacks arei18n: allowliterals (the brand name and the postal address), while the description falls back to theFallback.EventDescriptionresource.MapSearchUrlbuilds a Google Maps search URL withUri.EscapeDataStringover the address. HeroTitleParts()(:119-136): splits the event name so the hero can accent the keyword between "Atlanta " and " Conference" (in "2026 Atlanta Developers Conference" it accents "Developers"). It usesIndexOf/LastIndexOfwithStringComparison.Ordinaland falls back to rendering the whole name plain when the name does not match the brand shape, which is why an arbitrary event name never renders broken markup; the markup branches on the accent being non-empty (ADCHome.razor:17,:21-28).OnInitializedAsync(:138-163): creates the CTS, takes the prerender short-circuit described above, otherwise awaitsLoadEventAsync()first (both follow-up reads need the featured event id), then runsLoadSponsorsAsync()andLoadPartnersAsync()side by side under oneTask.WhenAll(:156-158). The comment gives the reason: both depend only on the featured event, write separate fields, and each swallows its own failure, so running them together costs the landing page one round trip instead of two. It then arms the phase timer (:162).LoadEventAsync(:205-233): callsEventService.GetAllAsync(cancellationToken: LifetimeToken)(:210) and, on a successful Result, picks the event withCurrentEventSelector.SelectCurrentOrNext(...)passing three accessor lambdas plusTimeProvider.GetUtcNow().UtcDateTime(:216-221). The candidates areevents.Where(e => e.IsPublished)(:217): the endpoint scopes only non-privileged callers to published events, while an Organizer or ContentEditor reads it unscoped, so a draft edition has to be filtered out here or the landing page would feature it (comment:212-215, tagged OBS-7). The comment is also the reason it is not aFirstOrDefault: the endpoint returns events unordered, so a naive first-item pick would pin the oldest seeded event. A failed read (API unavailable) surfaces as an unsuccessfulResulthandled by theif, which simply leaves_eventnull and the fallback defaults in place (:209); the only exception caught isOperationCanceledException, meaning the component was disposed mid-load (:224-227). Thefinallyblock always clears_isLoadingand recomputes the countdown (:228-232), so no failure path leaves a spinner on screen.LoadSponsorsAsync(:235-281): returns immediately when no event was featured (:247-250), then callsSponsorService.GetPagedAsyncfiltered to the featured event,pageNumber: 1,pageSize: MaxRoster, sorted bySortascending, underLifetimeToken(:254-260), and on a successful page reducessponsors.Itemsto a tier-grouped list: tiers ascending in package order (Platinum first), each tier ordered bySortthenName(:262-275, comment at:264-265). The event scoping happens server-side; the method's remarks record that the endpoint filters to the featured event the wayPublicSponsorListdoes, so a second published edition's sponsors never bleed onto this page, and that any failure leaves the list empty, which falls back to the sponsorship-packet call to action rather than a blank strip (:238-244). Its one catch arm isOperationCanceledException(:277-280).LoadPartnersAsync(:283-326): the same shape asLoadSponsorsAsyncone method up: returns immediately with no featured event (:293-296), otherwise callsPartnerService.GetPagedAsyncthe same way, again underLifetimeToken(:300-306), and reduces a successful page'spartners.Itemsto the type-grouped list, Community first (:308-320). Its one catch arm mirrors the sponsor load (:322-325) and an unsuccessful page leaves_partnerGroupsempty, which hides the whole partners band rather than rendering a partial one (remarks:286-290).EventFilter(:328-332): a small static helper that builds the one-entry{"EventId": ("equals", eventId)}filter dictionary bothGetPagedAsynccalls pass, formatting the id withCultureInfo.InvariantCultureso the filter value is stable regardless of the host's culture.UpdateCountdown(:334-354): with no featured event it sets_phasetoUnknownand returns (:336-340). Otherwise it takes the event's UTC window from one call,CurrentEventSelector.GetLiveWindowUtc(_event.StartDate, _event.EndDate, _event.TimeZone)(:345); the comment (:342-344) records that this is the one live window every surface and the server live gate share: 08:00 on the first day through the midnight after the last, in the event's zone, with the spring-forward-gap guard applied (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Events/CurrentEventSelector.cs:22,:77-87,:100).nowis read fromTimeProvider(:347) and_phaseis then assigned from the switch described under EventPhase (:348-353).- Phase timing:
OnCountdownElapsedAsync(:165-171) is theEventCallbacktheHomeCountdownchild raises at zero (HomeCountdown.razor:83), which recomputes the phase, re-arms, and returns theInvokeAsync(StateHasChanged)task directly (the method is notasync).ArmPhaseTimerForEventEnd(:173-192) returns unless the phase isLiveand the remaining time, measured againstTimeProvider.GetUtcNow()(:184), is positive, then disposes any prior timer and schedules one callback atuntilEndwithTimeout.InfiniteTimeSpanas the period, meaning fire once and never repeat (:191).OnEventEnded(:194-203) checks_disposedbefore re-rendering. FormatEventDate(:356-365): returnsnullwhile no featured event is known, and the markup then holds the line's height with a non-breaking space instead of painting a guessed date (doc:356-359, markupADCHome.razor:34). Otherwise it formats the date with a pattern read from a resource (L["Hero.DateFormat"]) againstCultureInfo.CurrentCulture, so both the layout and the month names follow the selected language (ADR-027).Dispose(:367-374): sets_disposed, cancels and disposes the CTS, and both stops (Change(-1, -1)) and disposes the phase timer. Stopping before disposing is what prevents a callback already in flight from touching a torn-down component.
- Constants and state (
Why it's built this way: the landing page is the app's most-hit surface and the post-login destination, so its correctness budget is dominated by two failure modes that have nothing to do with its content: a slow backend blocking the prerender, and a per-second render loop multiplied by every connected circuit. Both are solved structurally (skip the fetch, fence the tick) rather than by tuning, and every dynamic block has a defined empty state, so the page is never blank. Routing the three reads through IEventUIService, ISponsorUIService, and IPartnerUIService keeps the event-scoping filter server-side and lets the page consume the same Result-based service layer every other page in the group uses. The conditional calls to action follow the same discipline: the hero ticketing button and the sponsorship packet block each render only when the featured event publishes the corresponding URL (
ADCHome.razor:94,:376), and hide entirely otherwise rather than offering a dead link, which the markup comments state at both sites. The two ticketing buttons (hero and workshops) are further gated onTicketsOnSale(), so the page never sells tickets to an event already under way or over.Where it's used: resolved as the home component by ADCHomePageContent, the one adapter beside it in the same folder, whose
ComponentTypeistypeof(ADCHome)(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Home/ADCHomePageContent.cs:14) and which all three heads register. [Rubric §28, Front-End Testing]: a bUnit suite renders the page directly (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Home/ADCHomeTests.cs), covering the hero eyebrow and title class (:43,:53), the workshop cards and their links, the ticketing call to action with and without a URL (:206,:161), theTicketsOnSale()gate while upcoming, once live or over, while loading, and at the live flip (:273,:307,:325,:336), and the partners band ordering and empty state (:384,:434); a second suite pins theUnknownrendering (ADCHomeEventUnknownTests.cs, see EventPhase). Two suites hold it to account from outside as well: the brand-token fitness test above and the E2E pseudo-localization sentinel, which probes this page'sLocation.OpenInMapsresource and settles on the always-rendered.location-section, precisely because that button is static markup rather than event-load-gated (MMCA.ADC/Tests/E2E/MMCA.ADC.E2E.Tests/Workflows/PseudoLocalizationTests.cs:35-45).Caveats / not-in-source: the countdown and CurrentEventSelector share one live window, because
UpdateCountdownreads it fromGetLiveWindowUtcrather than computing its own: it opens atDayOneStartLocalTime(08:00) local on the first day and closes, exclusive, at the midnight after the last day (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Events/CurrentEventSelector.cs:22,:82-83), so the hero flips to Live at the same instant the selector and the server live gate do. When no event loads there is no fallback date: the phase isUnknownand the hero shows neither a date nor countdown digits. The remaining hard-coded fallbacks are the brand name (:110) and the venue address (:114), both markedi18n: allow.
ADCHomePageContent
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Home·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Home/ADCHomePageContent.cs:11· Level 10 · class (sealed)
- What it is: the ADC binding of the framework's home-page extension point. It tells the shared
Home.razorshell which component to render as the landing page (ADCHome) and what title to show, and it is the one adapter every head registers: Blazor Server, WebAssembly, and MAUI (class doc:5-10). - Depends on: IHomePageContent (implemented, imported from
MMCA.Common.UI.Common.Interfacesat:1) and ADCHome, referenced bytypeofin the same namespace. No injected services, no state. - Concept introduced: app-supplied content for a shared shell. The framework ships one generic home shell; each host app registers a single
IHomePageContentthat hands the shell aComponentTypeand aPageTitle. The dependency is inverted: the shared shell never references an ADC page. [Rubric §18, UI Architecture and Component Design] assesses how a reusable shell is specialized per app, and here the entire specialization is two properties. [Rubric §2, Design Patterns] applies as well, since this is a minimal adapter sitting at a UI boundary. [Rubric §22, Responsive and Cross-Browser/Device]: because the adapter lives beside the page in the Conference UI library rather than in each head, the three heads share not only the page but its binding, and the page's editorial image ships once as a static web asset of this library (:8-9), so no head needs a wrapper page or a base-path override. - Walkthrough: two expression-bodied properties.
ComponentType => typeof(ADCHome)(:14) selects the shared landing component directly.PageTitle => "Atlanta Developers Conference"(:17) carries an explicit// i18n: allowmarker because the conference brand name is deliberately not localized (ADR-027). - Why it's built this way: pointing every head at the Conference module's component means the web and MAUI heads render the same marketing surface, and a change to the conference home lands everywhere at once. Keeping the adapter in the same folder as the page it names keeps the pair discoverable together, and it leaves the heads with one registration line each rather than a per-head class.
- Where it's used: registered as a singleton
IHomePageContentby all three heads, each importingMMCA.ADC.Conference.UI.Pages.Home: the WebAssembly client (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web.Client/Program.cs:9,:42), the Blazor Server host (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/Program.cs:13,:79), and MauiProgram (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:12,:133). ADCHome's class doc names it as the binding through which both head families share the page (ADCHome.razor.cs:18).
SessionAssetComposer
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetComposer.razor.cs:24· Level 0 · class (Blazor code-behind)
- What it is: the input surface for one new session material, add-a-link or pick-a-file, extracted out
of
SessionAssetsPanelas its own component. It owns the two link text fields and validates and normalizes the typed address before ever raising an event; the panel still owns the cap check, the actual write, and every status message. - Depends on:
SessionAssetsPanelas its only host (line 43,_fileInputId), and the Blazor primitivesEventCallback<T>andInputFileChangeEventArgs/IBrowserFile(lines 35, 38, 41, 80). No first-party service or domain type. - Concept introduced, a composer that validates before it emits. Rather than raise a raw string and let
the host re-validate,
AddLinkAsync(lines 60-78) checksCanSubmitLink(lines 50-51) and normalizes the address throughTryNormalizeWebUrl(lines 100-125) itself, and only ever raises one of two outcomes:OnAddLinkwith the trimmed title and the normalized absolute URL, orOnInvalidLinkAddresswith no payload at all, leaving the host to word the refusal.[Rubric #19, State Management & Data Flow]assesses where UI state is owned: the draft fields (_newLinkTitle,_newLinkUrl, lines 47-48) live entirely in the composer, andClearDraft(lines 54-58) is the only way the host reaches back in, called only once a write has actually succeeded (the host'sAddLinkAsynccalls_composer?.ClearDraft()afterMutateAsyncreports success). - Walkthrough
Disabled(line 32) is one flag the host sets whenever every control should render inert (at the session's material cap or mid-write), rather than the composer re-deriving that from state it does not own._fileInputId(line 45) is generated per instance withGuid.NewGuid():N, because a page renders one composer per session and a fixed id would collide across composers and mis-point the file input's label.AddLinkAsync(lines 60-78) re-checksCanSubmitLink, normalizes throughTryNormalizeWebUrl, echoes the normalized URL back into_newLinkUrl(line 75, so the speaker sees the address that will actually be stored) before raisingOnAddLinkwith the trimmed title and normalized URL.OnFileSelectedAsync(lines 80-88) forwards the pickedIBrowserFilethroughOnFileSelected; it does no size or format check itself, that stays the host's job againstSessionAssetLimits.TryNormalizeWebUrl(lines 100-125) accepts a value that already parses as an absolutehttp/httpsURL as-is (Ordinalscheme comparison, lines 107-108, matching the domain invariant and the FluentValidation rule that guard the same value server-side), and otherwise prefixes a scheme-less value withhttps://and re-parses (lines 111-122), so a speaker pastinggithub.com/me/repois treated as a web address rather than rejected outright.
- Why it's built this way: pulling the add-link fields and their normalization out of the panel keeps
the panel's
MutateAsyncgateway focused on the write itself, and gives the input surface aClearDraftthe host can call only when a write actually lands, so a refused write leaves the speaker with what they typed instead of silently emptying the fields. - Where it's used: rendered inside
SessionAssetsPanel's markup as the add-material affordance. - Caveats / not-in-source:
TryNormalizeWebUrlduplicates the method of the same name and shape that used to live onSessionAssetsPanelitself (removed by the same change that added this component); whether a shared helper was considered instead of the duplication is not determinable from source.
NewestLoadTracker<T>
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/NewestLoadTracker.cs:14· Level 0 · class (internal sealed, generic)
- What it is: a tiny tracker that makes overlapping asynchronous loads all resolve to the result of the newest one.
Trackrecords a load as the newest and returns a task that completes with the newest load's result (NewestLoadTracker.cs:24-28). - Depends on: nothing beyond
Task<T>; the only state is_newest(:16). - Concept introduced, newest wins without cancelling. A grid can issue a second
ServerDatacall while the first is still waiting on a prerequisite. Rather than let the superseded call paint its own (possibly empty) page,NewestResultAsync(:30-40) awaits its own load, then loops while_newestis a different task, switching to it and awaiting it, until the task it just finished is the newest. Every caller therefore returns the same final data. The doc (:18-22) states the contract: callTrackbefore anything yields, so an earlier load resuming afterwards already sees this one as its successor.[Rubric §19, State Management & Data Flow]. - Walkthrough
Track(load)(:24-28) assigns_newest = load(:26) and returnsNewestResultAsync(load)(:27), so the assignment happens synchronously on the caller's turn.NewestResultAsync(:30-40): thewhile (_newest is { } newest && !ReferenceEquals(newest, load))loop (:33) advancesloadanddata(:35-36) until nothing newer exists, then returnsdata(:39).
- Why it's built this way: cancelling the older load is not an option here because the older load is the grid's own pending request; making it answer with the newer result removes the visible flash of an empty page without touching the grid.
- Where it's used: held as
_gridLoadsand applied inPublicSessionList.LoadServerData(PublicSessionList.razor.cs:44,:211-212), where it fixes the U-35 case of a load superseded while waiting on the event scope.
PublicSessionEventScope
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionEventScope.cs:14· Level 0 · class (internal sealed)
- What it is: the coordinator for the page's events lookup. It remembers the initial lookup task, reports whether a lookup is still pending, and lets overlapping grid loads await it, re-issuing it at most once while the scope is unresolved so the Retry button heals a transient failure (
PublicSessionEventScope.cs:18-22,:31-35). - Depends on: nothing beyond
Taskand delegates supplied by the caller (scopeUnresolved,reissue,onReissued,:36); state is_lookupand_resolutionsInFlight(:16-17). - Concept introduced, a shared single re-issue. Several grid loads can wait on the same failed lookup.
EnsureAsync(:36-68) counts itself in_resolutionsInFlight(:38), awaits the current lookup (:45), and if the lookup it waited on has since been replaced by a sibling load's re-issue it joins that new one instead and marks itself as retried (:47-53). It only re-issues when it has not retried and the scope is still unresolved (:55-62), storing the new task in_lookupand callingonReissuedso the page can re-render its pending state. The result is at most one extra lookup however many loads overlap.[Rubric §29, Resilience & Business Continuity]. - Walkthrough
Pending(:23) is true while_lookuphas not completed or anyEnsureAsynccall is still resolving, because a resolving load may yet re-issue a failed lookup (doc:19-22).Start(lookup)(:27) records the page's initial lookup and returns it for the caller to await.EnsureAsync(:36-68) decrements_resolutionsInFlightin afinally(:65-67), soPendingcannot stick after a fault.
- Why it's built this way: the page previously held the lookup task and the retry rule itself; pulling it out gives the retry-race behavior a home that can be exercised without rendering the grid.
- Where it's used: held as
_eventScopebyPublicSessionList(PublicSessionList.razor.cs:43);Startis called inOnInitializedAsync(:128),PendingbacksEventsLookupPending(:163), andEnsureAsyncbacksEnsureEventScopeAsync(:178-179).
MyScheduleArrival
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/MyScheduleArrival.cs:9· Level 0 · class (internal sealed)
- What it is: a two-field edge detector that recognises the My Schedule deep link (
?mine=true) arriving as a parameter update on a schedule list that is already open, rather than as a fresh page load (class doc,MyScheduleArrival.cs:3-8, tags A-23 and Run 20 D4). - Depends on: nothing; its only state is the last
minevalue seen,_last(:11), and whether any parameter set has been seen yet,_seen(:12). - Concept introduced, telling a later arrival from the first load. The list page rewrites its URL without
mineafter its first load, so a home-screen shortcut tapped while the list is open turns the value from unset to true with no fresh initialization; the first parameter set is the fresh load itself, which the page'sOnInitializedAsyncalready handles (doc:4-7).Arrived(mine)(:17-23) therefore reports true only whenmineis true now, was not true last time, and an earlier parameter set has already been seen (:19), then records the value and marks the instance as seen (:20-21). The first call can never report an arrival, which is what keeps the two paths from both acting on one deep link.[Rubric §25, Navigation & Information Architecture]. - Walkthrough
Arrived(:17-23, doc:14-16) is the only member: it takes the page's currentminequery value and returns whether this call is a later arrival ofmine=true(:22). It updates its state on every call, so a repeatedtrue(no transition) does not fire twice.
- Why it's built this way: Blazor reuses the open page component and only re-supplies query parameters when the URL changes, so the transition has to be detected across
OnParametersSetAsynccalls; holding that rule in a small class keeps the page's lifecycle override to one condition. - Where it's used: held as
_mineArrivalbyPublicSessionList(PublicSessionList.razor.cs:59) and called in itsOnParametersSetAsync(:108), where an arrival sends a signed-out reader to sign in exactly as a fresh deep-link load does (remarks:103-104).
SessionAssetDisplay
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetDisplay.cs:14· Level 2 · internal static class
- What it is: a small, stateless helper shared by the two session-materials components: it picks the icon for an asset and formats a byte count for display. Everything on it is a pure function over its arguments.
- Depends on:
SessionAssetDTOandSessionAssetKind(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/SessionAssets/SessionAssetDTO.cs,.../SessionAssets/SessionAssetKind.cs),SessionAssetLimits.MaxFileBytes(line 17). Externals: MudBlazorIcons.Material.Filled.*(lines 30-36, 51, 54),System.Collections.Frozen.FrozenDictionary(line 27),System.Globalization.CultureInfo(lines 75, 79). - Concept introduced, deriving display facts instead of storing them. Neither the icon nor the
formatted size is persisted anywhere; both are computed on demand from the asset's
Kindand stored byte count, so a rendering change (a new icon, a different rounding) touches this one file and nothing in the data model.[Rubric §15, Best Practices & Code Quality]assesses whether a number lives in one place: the upload cap shown in the UI hint and the over-size message isMaxFileMegabytes(line 17), derived fromSessionAssetLimits.MaxFileBytesby division rather than restated as a literal, so the client hint and the server-enforced cap cannot drift apart.[Rubric §27, Internationalization]assesses whether user-facing text is externalized:FormatSizereturns the numeric amount and a resource key ("Size.Megabytes","Size.Kilobytes","Size.Bytes"), not a formatted sentence, so the caller composes it through its own localizer and a Spanish reader sees "1,4 MB" rather than an English-punctuated string (doc, lines 57-60). - Walkthrough
IconsByExtension(lines 22-37) is aFrozenDictionary<string, string>built overStringComparer.OrdinalIgnoreCase, mapping seven extensions (.pdf,.pptx,.docx,.xlsx,.zip, and.md/.txtsharing the article icon, lines 30-36) to MudBlazor icons. Its doc comment (lines 22-26) gives both choices: the comparison ignores case, sodeck.pptxandDECK.PPTXname the same format, and a lookup rather than a switch makes the closed set read as data, so adding a format is one entry. Because the comparer owns the casing, no extension is ever upper- or lower-cased.IconFor(SessionAssetDTO asset)(lines 45-55) null-guards (line 47), returns the link icon outright forSessionAssetKind.Link(lines 49-52), and otherwise looksExtensionOf(asset)up inIconsByExtensionthroughGetValueOrDefault, falling back to the genericInsertDriveFileicon (line 54).FormatSize(long sizeBytes)(lines 63-76) picks the largest unit the value clears (megabytes, then kilobytes, then bytes, lines 65-75) and rounds throughRound(lines 78-79), which formats with"0.#"underCultureInfo.CurrentCultureso the decimal separator matches the active locale.ExtensionOf(SessionAssetDTO asset)(lines 86-98) reads the extension off the stored blob name first, and only falls back to parsing the asset'sUrlwhen the blob name is blank (lines 90-93). It returnsPath.GetExtension(name)as stored, with its dot and in its original case (doc line 82, lines 95-97). The doc comment states why the order matters (lines 81-85): a blob URL can carry a signature query string, and taking the extension from the URL first would yield the query string rather than the file's actual format.
- Why it's built this way: both helpers are pure and side-effect-free, so a component that needs an icon or a formatted size calls a static method instead of duplicating the lookup or the rounding logic; keeping the file extension check on the blob name first (not the URL) is what keeps the icon correct for a signed download link.
- Where it's used:
IconForrenders the material icon onSessionAssetsPanelandSessionAssetsDownloadList;FormatSizebacksDescribeSizeon both of those components (.../SessionAssets/SessionAssetsPanel.razor.cs:308,.../SessionAssets/SessionAssetsDownloadList.razor.cs:58);MaxFileMegabytesis quoted inSessionAssetsPanel's over-size message (.../SessionAssetsPanel.razor.cs:153). The icon lookup is pinned bySessionAssetDisplayIconTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/SessionAssets/SessionAssetDisplayIconTests.cs). - Caveats / not-in-source: the lookup (lines 30-36) recognizes seven extensions explicitly; any other extension, including one the API itself accepts, falls back to the generic file icon. Whether the set of icons is meant to track the server's allowed-format list is not determinable from this source.
PublicSessionListFilterBar
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionListFilterBar.razor.cs:16· Level 3 · class (Blazor code-behind)
- What it is: the presentational filter bar for
PublicSessionList: the privileged-reader Filter-by-Event picker (or the locked "Showing" chip for everyone else), the debounced title search box, the Room picker, the All Sessions / My Schedule toggle, and the share-my-schedule action (class doc,PublicSessionListFilterBar.razor.cs:9-15). - Depends on:
EventDTOandRoomDTO(:2);IScreenshotService,IShareService, andIToastService(:18-20). ItsRoomsoption set is produced byPublicScheduleRoomOptions. - Concept introduced, the container/presentational split. The bar owns no filter state. Every value arrives as a
[Parameter]and every change leaves through a matchingEventCallback:IsPrivileged(:26),Events(:29),SelectedEventId/SelectedEventIdChanged(:32,:35),SearchString/SearchStringChanged(:38,:41),Rooms(:47),SelectedRoomId/SelectedRoomIdChanged(:50,:53), andShowMyScheduleOnly/ShowMyScheduleOnlyChanged(:56,:59). The page stays the single source of truth and the bar is a pure view over it, with no lifecycle method of its own.[Rubric §18, UI Architecture & Component Design](assesses decomposition and separation of layout from behavior) and[Rubric §19, State Management & Data Flow](assesses where mutable state lives): with nothing to initialize, the bar cannot drift from the data the grid actually fetched. Three details reward a close read. The parameter isIsPrivileged, not "is organizer", because the privileged read audience is a role set (ConferenceReadAudience) rather than one role.Roomsdocuments its own empty case (:43-46): an empty list hides the Room picker entirely, because an event with no rooms has nothing to narrow by, so a control with no meaningful options is removed rather than shown disabled ([Rubric §24, Forms, Validation & UX Safety]). And the localizer injected in the markup isIStringLocalizer<PublicSessionList>, not one of its own (PublicSessionListFilterBar.razor:3), so the split into three components did not split the page's resource file into three.[Rubric §27, Internationalization]. - Walkthrough
GetSelectedEventName()(:61-62): resolves the chip label from the passed-inEventslist, returning empty when nothing is selected.ShareScheduleAsync()(:64-87): captures the current view to a file throughIScreenshotServiceand hands it toIShareServiceasimage/png(:68-70); a null capture or a failed share collapses into one warning toast (:72), and the||short-circuit means a null path never reaches the share call. The whole body sits in atrythat swallowsOperationCanceledExceptionas expected disposal or an InteractiveAuto transition (:75-78) and turns any other exception into the same warning toast (:80-86): it runs from anOnClickcallback, where on the native heads an escaped exception is fatal to the host (comment:83-84, tag A-08). The broad catch is the one deliberate CA1031 exception in the file, so the suppression is scoped to that singlecatchline by a#pragma warning disable/restorepair carrying the same justification (:79,:81) rather than silenced project-wide. This is a native-head capability (ADR-042 Wave 3) that degrades quietly on the web.[Rubric §29, Resilience & Business Continuity].
- Why it's built this way: pushing all filter state to the page means the same chrome can sit above both the desktop grid and the mobile card list without either layout owning a second copy of the filters.
- Where it's used: rendered once by
PublicSessionList(PublicSessionList.razor:28-38); its callbacks land on that page'sOnEventFilterChanged,OnSearchChanged,OnRoomFilterChangedandOnMyScheduleToggledhandlers (PublicSessionList.razor.cs:246-269).
PublicSessionBookmarkState
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionBookmarkState.cs:13· Level 4 · class (internal sealed, primary constructor)
- What it is: the reader-and-bookmarks state for
PublicSessionList: whether the reader is signed in, their user id, and the dictionary of starred sessions (session id to bookmark id,PublicSessionBookmarkState.cs:31). The same dictionary instance is handed toPublicSessionListView, which patches it in place as stars toggle. Its values are nullableUserSessionBookmarkIdentifierType?: a star set by an add queued offline has no server bookmark id yet, so its value isnulluntil the next read (doc:26-30, ADR-144). - Depends on: the cascaded
Task<AuthenticationState>?and the optionalISessionBookmarkUIServiceas primary-constructor parameters (:13-15);ClaimsPrincipalExtensions'sGetUserId(:79);Resultfor the kept failure (:18). - Concept introduced, a load whose failure is kept rather than thrown. The state is built from the page's already-resolved authentication task and bookmark service, so it has no
[Inject]surface of its own.StartLoad(:38-42) runsLoadAsyncand stores the task, because the page must start it eagerly: the grid's firstServerDatacall can race ahead of initialization (doc:33-36).[Rubric §19, State Management & Data Flow](assesses where mutable state lives and how loads are ordered). - Walkthrough
LoadAsync(:67-98) returns immediately when there is no authentication task or no bookmark service (:69-72), so a disabled Engagement module leaves the reader anonymous with an empty dictionary. Otherwise it awaits the authentication state, reads the id throughGetUserId(:79, accepting both thesubclaim and theNameIdentifierform the bearer handler maps it to), setsCurrentUserIdandIsAuthenticated(:81-82), and loads the bookmarked ids (:86). The failure is stored in_loadFailure(:87) and a success replacesBookmarkedSessions(:88-91), widening each server-confirmed id to the nullable value type (:90) so the read and an offline-queued star share one dictionary shape.OperationCanceledExceptionis swallowed as expected disposal or an InteractiveAuto transition (:94-97).EnsureAsync(showMyScheduleOnly)(:51-65) awaits the load task and returnsnullunless My Schedule is active for a signed-in reader whose read failed (:58-61). In that case it re-issues the load once (:63) and returns the still-held failure (:64), so the page shows an error, not an empty schedule (doc:44-48). Plain browsing is unaffected: a failed read only leaves the stars unset (comment:84-85).[Rubric §29, Resilience & Business Continuity].
- Why it's built this way: My Schedule is the one view that cannot be answered without the bookmark read, so the failure has to be kept somewhere the fetch path can see it. Holding it here keeps that rule out of the page.
- Where it's used: created per page initialization as
_bookmarks(PublicSessionList.razor.cs:176-177), awaited byFetchSessionsAsyncthroughEnsureAsync(:297), and read forIsAuthenticatedandBookmarkedSessionswhen building the request (:307,:316); the page's markup handsIsAuthenticated,CurrentUserIdand theBookmarkedSessionsinstance down toPublicSessionListView(PublicSessionList.razor:57-60).
PublicSessionListView
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionListView.razor.cs:24· Level 4 · class (Blazor code-behind)
- What it is: the presentational session-list view for
PublicSessionList: the mobile infinite-scroll card list and the desktop server-paged data grid, including the inline bookmark stars and their toggle flow (class doc,PublicSessionListView.razor.cs:13-23). - Depends on:
SessionDTO, the optionalISessionBookmarkUIService(:77) and theBookmarkWriteOutcomeitsSetBookmarkedAsyncreturns (:170,:192,:205),SpeakerInfo(:87),Resultin the mobile fetch delegate's signature (:96),ConferenceRoutePaths(:228),MobileInfiniteScrollList<TItem>(:113, rendered atPublicSessionListView.razor:15),IToastServiceandIHapticFeedbackService(:26-27), plus MudBlazor'sMudDataGrid<T>/GridState<T>/GridData<T>andNavigationManager(:28). - Concept introduced, the presentational child that patches container-owned state in place. Like
PublicSessionListFilterBar, the view owns no fetch or filter state: the page hands down itsServerDataandFetchPageResultdelegates (:93,:96), its paging parameters (:59-65), the speaker and room lookups (:87,:90), its layout-known, loading, failure and empty-confirmed flags (:37-56), and the sharedBookmarkedSessionsdictionary (:84). The subtlety is that the view mutates that dictionary in place when a star is toggled (AddBookmarkAsyncwritesBookmarkedSessions[sessionId] = outcome.BookmarkIdat:200,RemoveBookmarkAsyncremoves at:177), so the page's My Schedule fetch, which reads the same dictionary to scope the query, sees the change without a round trip. The dictionary's values are nullable (doc:79-83): a star set by an add queued offline maps to anullbookmark id until the next read. The class doc names the sibling that uses the same pattern,SessionLivePollPanel(:18-19). It also exposes the capturedGrid(:107) and the phone card list asMobileList(:113) so the page'sDataGridListPageBase<TDto>overrides (GridRef,MobileListRef) keep restoring rows-per-page and current page and let the base save its filters before the phone list reloads (docs:102-106,:109-112).[Rubric §18, UI Architecture & Component Design]and[Rubric §19, State Management & Data Flow]: state has exactly one owner (the page) and one mutation point (this component). The class doc also records a deliberate omission (:21-22): the list shows no track or category chips, because the detail page is where a session's categories are read and the list stays scannable on time, speakers, and room.[Rubric §25, Navigation & Information Architecture]. - Walkthrough
IsLayoutKnown(:37, doc:33-36) is the page's ownDataGridListPageBase<TDto>.IsLayoutKnown(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:87), passed down atPublicSessionList.razor:50. It is false until the first viewport notification, whileIsMobile(:31) is only its default, so until then the view renders neither layout: the markup shows a shared viewport-highlist-layout-pendingplaceholder with an indeterminate progress bar and fetches nothing (PublicSessionListView.razor:4-11, tag X-17). The parameter defaults totrue(:37), so a host that never supplies it renders as before.[Rubric §23, Front-End Performance & Rendering].Loading,LoadFailedandEmptyConfirmed(:43-56): three page-owned parameters, all passed down by the page (PublicSessionList.razor:51-53).Loadingis the page's load in flight or the event scope still pending (doc:39-42);LoadFaileddrives the inline error-with-retry empty content (:45-46).EmptyConfirmed(:56) is a parameter rather than a value the view derives: the page passes itsDataGridListPageBase<TDto>.EmptyConfirmed(the newest load completed with no rows) AND its event scope resolved (PublicSessionList.razor:53). The doc (:48-55) records why it cannot be derived fromLoading: the loading state ends, and renders, beforeMudDataGridhas received the rows, and the grid paintsNoRecordsContentin every render where it holds none, so a gate on the flags flashed the empty text before a non-empty page (U-35). BothListNoRecordsContentslots consume it (PublicSessionListView.razor:191,:196).[Rubric §24, Forms, Validation & UX Safety].ReloadAsync(:119-122) is private: it resetsMobileListon a phone and otherwise reloads the grid's server data, for a retry or a removed My Schedule row. Its doc (:115-118) states the boundary: no filter changed, so nothing is saved, and a filter change goes through the page instead.IsBookmarked(:124-125) is a dictionary lookup, so star state costs nothing per row.CanBookmark(:130-134): a session is bookmarkable only when the user is authenticated, the Engagement-owned service resolved, the session is not a service session, andSessionStatuses.IsEligibleaccepts its status. The comment (:127-129) records this as the BR-49 allow-list (unset or"Accepted"), the same rule the server-side bookmark validation applies, precisely so the UI never shows a star the server would then reject.[Rubric §11, Security]and[Rubric §24, Forms, Validation & UX Safety].ToggleBookmarkAsync(:136-163): guards re-entry with a per-sessionHashSetwhoseAdddoubles as the guard test (:138, field at:100), firesHaptics.Click()(:142, a no-op off native heads), then removes when the session is a key in the dictionary and adds otherwise (:146), so a starred session with anullid still toggles to a remove. It catchesOperationCanceledExceptionas expected teardown or an InteractiveAuto transition (:155-158) and clears the guard entry in thefinally(:161). The per-session guard is a fixed defect worth reading: the comment at:98-99records that a single global in-flight flag made one slow toggle swallow every other star's click, so the list stopped responding until that request came back.RemoveBookmarkAsync(:165-186): oneSetBookmarkedAsync(CurrentUserId, sessionId, bookmarked: false, bookmarkId)call with the possibly-null id (:170). The comment (:167-169) records that the service treats an already-gone (404) bookmark as removed, and either resolves a missing id or cancels the still-queued add, so only a real miss keeps the star and raises the error toast (:171-175). Otherwise it clears the entry (:177), toasts throughToastWritten(:178), and reloads the My Schedule view only when the outcome was not queued (:182-185): a removal kept on the device has not reached the server, so a reload would only bring the row back or fail (comment:180-181).AddBookmarkAsync(:188-202):SetBookmarkedAsync(..., bookmarked: true, knownBookmarkId: null)(:192). A write that was neither confirmed nor queued leaves the star unset, so the page reports a warning rather than a success toast that would contradict its own UI (:193-197, comment:190-191); otherwise it storesoutcome.BookmarkId,nullfor a queued add, after which the next tap is still a remove (:199-200), and toasts (:201).ToastWritten(:205-215): an info toast for a queued write (Snackbar.ScheduleQueuedOffline, "saved on this device", doc:204) and the confirmed message as a success toast otherwise. This is the list's side of ADR-144: a star toggled with no network is kept on the device and the reader is told so, rather than shown a failure.[Rubric §29, Resilience & Business Continuity].GetSpeakerList(:217-225) maps a session'sSessionSpeakersto display names through the passed-in lookup, skipping ids the lookup does not know;OnMobileCardClick(:227-228) routes toPublicSessionDetailthroughConferenceRoutePaths.
- Why it's built this way: separating the grid and card layouts from the page's fetch-and-filter logic lets one bookmark implementation serve both, while the page remains the owner of every piece of state either layout renders.
- Where it's used: rendered by
PublicSessionList, which holds it as_view(PublicSessionList.razor.cs:41, captured atPublicSessionList.razor:48), reads_view?.Gridand_view?.MobileListfor itsGridRefandMobileListRefoverrides (PublicSessionList.razor.cs:117-118), and passes_view?.MobileListto the base'sReloadActiveLayoutAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879) through itsReloadViewAsynchelper for every filter change (PublicSessionList.razor.cs:274). The bookmark flow is pinned byPublicSessionListViewBookmarkTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Public/Sessions/PublicSessionListViewBookmarkTests.cs).
SessionBookmarkButton
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/SessionBookmarkButton.razor.cs:27· Level 4 · class (Blazor code-behind)
- What it is: the standalone bookmark star for one session, extracted out of
PublicSessionDetailso that page no longer has to inject the Engagement-owned bookmark service or carry a reader's authentication state just to draw one toggle. - Depends on: optionally
ISessionBookmarkUIService, resolved throughIServiceProvider(:29), and theBookmarkWriteOutcomeitsSetBookmarkedAsyncreturns (:122-123);IToastServiceandIHapticFeedbackService(:30-31); theSessionIdparameter typed asSessionIdentifierType(:38);UserIdentifierTypeandUserSessionBookmarkIdentifierType?for its local state (_currentUserIdand_bookmarkId,:48-50); andClaimsPrincipalExtensions'sGetUserId, read off the cascadingAuthenticationStateTask(:35,:86). - Concept introduced, an optional cross-module service resolved per component instance rather than
per page. Like the pages that used to hold this logic, Blazor's
[Inject]has no optional mode (an unregistered service throws at render), soBookmarkServiceis resolved withServiceProvider.GetService<T>()inOnInitialized(:53-57) and every call site null-checks before using it. Because the resolution now happens once per rendered star instead of once per hosting page, moving it here is what letPublicSessionDetaildrop its own copy of the same pattern entirely.[Rubric section 7, Microservices Readiness](assesses that a module can be switched off without breaking its consumers) and[Rubric section 18, UI Architecture & Component Design](assesses decomposition: one focused component owns one piece of optional behavior instead of every host page repeating it). - Walkthrough
LifetimeToken(:45, comment:42-44) is_cts.LifetimeToken(): readingTokenoff a disposed source throwsObjectDisposedException, and becauseDisposecancels before it disposes, a read or toggle that resumes after the reader navigated away gets a cancelled token and ends through itsOperationCanceledExceptioncatch. The bookmark read and the toggle write pass it (:94,:123).OnParametersSetAsync(:59-71, a non-async override that returnsTask.CompletedTaskon a skip and otherwiseLoadBookmarkStateAsync()'s task) skips the read during SSR prerender for the reason every other interactive page states: under InteractiveAuto the interactive instance re-runs this method, so without the guard every visit would fetch the reader's bookmarks twice; the prerender pass renders the unset star. It then reloads only whenSessionIdactually changed (:64,:69-70).LoadBookmarkStateAsync(:73-105): awaits the cascading authentication state, reads the identifier throughGetUserId(:86, accepting both thesubclaim and theNameIdentifierform the bearer handler maps it to, and parsing invariantly), then loads the bookmarked ids; a failed read is non-critical and leaves the star unset (:93-99).ToggleBookmarkAsync(:107-161): a single_isTogglingBookmarkre-entry guard (:109, set at:115), a haptic click (:113, a no-op off native heads), then oneSetBookmarkedAsyncwrite (:122-123) whose direction is the star's own state (bookmark = !_isBookmarked,:121), passing the held_bookmarkIdonly on a remove. The comment (:118-120) states why the star decides and the held id does not: a star set by an add queued offline has no id until the next read, and its next tap must be a remove (the service resolves the id, or cancels the queued add), not a second add. A write that was neither confirmed nor queued leaves the star where it was, with a warning toast for an add and an error toast for a remove (:127-139, comment:125-126). Otherwise the star flips, an add keepsoutcome.BookmarkId(nullwhile queued,:141-142), and a queued write raises theSnackbar.ScheduleQueuedOfflineinfo toast instead of the added or removed success toast (:144-151, ADR-144). The body catchesOperationCanceledExceptionas expected component disposal or an InteractiveAuto transition (:153-156) and clears the re-entry guard in thefinally(:157-160).[Rubric section 29, Resilience & Business Continuity].- Disposal (
:163-188) is the standard cancel-on-disposal pattern over the component's ownCancellationTokenSource(:40).
- Why it's built this way: a bookmark toggle is genuinely optional (it needs the Engagement module, which ADC can run without), and every page that renders a session benefits from the same fail-soft behavior, so the toggle is a component with its own lifecycle instead of logic duplicated per host.
- Where it's used: rendered by
PublicSessionDetailfor its single session's star, and pinned bySessionBookmarkButtonTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Public/Sessions/SessionBookmarkButtonTests.cs).PublicSessionListViewkeeps its own inline bookmark implementation (a per-sessionHashSetre-entry guard over a sharedBookmarkedSessionsdictionary, not this component), because a list needs to mutate one shared dictionary in place across many rows rather than own independent per-row state; both write through the sameSetBookmarkedAsync.
SessionAssetsDownloadList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetsDownloadList.razor.cs:18· Level 5 · class (Blazor code-behind,IDisposable)
- What it is: the read-only, attendee-facing list of a session's slides, links and files. It loads once per session and renders nothing organizers-only, no add/rename/delete affordances at all.
- Depends on:
ISessionAssetUIService(line 20 injected field),SessionIdentifierType(line 23 parameter),SessionAssetDisplay.FormatSize(line 58), and theLifetimeTokenextension on theCancellationTokenSource(line 30). Externals: Blazor[Inject]/[Parameter],System.Threading.CancellationTokenSource. - Concept introduced, none new. This component is the minimal half of the pattern
SessionAssetsPanelteaches in full: load-once-per-session, swallowOperationCanceledExceptionduring disposal, dispose the_ctsexactly once. Reading the two side by side is the point: this one keeps only the load and render path and drops every mutation.[Rubric §19, State Management]assesses whether fetched state is invalidated deliberately:OnParametersSetAsync(lines 36-54) returns immediately when_loadedSessionId == SessionId(lines 38-41), the same reload guard the mutable panel uses, so re-rendering the same session never refetches. - Walkthrough
OnParametersSetAsync(lines 36-54) sets_loadedSessionId(line 43), then awaitsSessionAssetService.GetBySessionAsync(SessionId, cancellationToken: LifetimeToken)(line 47), whereLifetimeToken(line 30, comment lines 27-29) is_cts.LifetimeToken(): readingTokenoff a disposed source throwsObjectDisposedException, and becauseDisposecancels before it disposes, a load that resumes after the user navigated away gets an already-cancelled token and stops through itsOperationCanceledExceptioncatch (line 50) instead. It leavesbypassCacheat itsfalsedefault so the attendee read is served from the shared output cache (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/ISessionAssetUIService.cs:25-34), and unwraps theResultwithTryGetValue, falling back to an empty list on failure (line 48) rather than surfacing an error state.DescribeSize(long sizeBytes)(lines 56-60) forwards toSessionAssetDisplay.FormatSizeand resolves the returned unit key through the component's own localizer (L[unitKey, amount].Value, line 59).- The
_disposed-guardedDispose(bool)/Disposepair (lines 62-84) cancels and disposes_ctsexactly once, identical in shape to every other component in this group. - The per-instance
_headingId(line 31) exists for the same reason as onSessionAssetsPanel: a page can render more than one materials list, and a fixed id would break the label/heading association across instances.
- Why it's built this way: an attendee never edits a session's materials, so giving them a component
with no mutation surface at all (rather than the organizer panel with
CanManage="false") means there is no upload input, no delete button and no edit state to accidentally expose in a public view. - Where it's used: rendered on the public session detail page wherever attendee-visible materials are shown, keyed by the session's identifier.
- Caveats / not-in-source: a failed load renders an empty list with no visible error (line 48), so an attendee cannot distinguish "this session has no materials" from "the materials failed to load".
SessionAssetsPanel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetsPanel.razor.cs:31· Level 5 · class (Blazor code-behind,IDisposable)
- What it is: the organizer- and speaker-facing manager for a session's materials: add a link, upload
a file, rename or delete an asset, all behind a shared cap and a shared failure-to-message mapping. A
CanManageparameter toggles it into the same read-only renderingSessionAssetsDownloadListprovides. Its add-link and pick-a-file inputs live in a childSessionAssetComposer(line 67 field_composer); this panel keeps the cap check, the write itself, and every status message. - Depends on:
ISessionAssetUIService(line 33 injected field),SessionIdentifierType(line 36 parameter),SessionAssetComposer(line 67),SessionAssetDisplayforMaxFileMegabytesandFormatSize,SessionAssetLimits.MaxAssetsPerSession(line 69),SessionAssetLinkRequest(lines 115-121) andSessionAssetUpdateRequest(lines 186-190), theLifetimeTokenextension on_cts(line 49 property), andResult(line 214). Externals: Blazor ([Inject],[Parameter],IBrowserFile), MudBlazor (Severity), and aDeleteConfirmationcomponent (line 66) fromMMCA.Common.UI.Components. - Concept introduced, one mutation gateway for every write. Add-link, upload-file, rename and delete
are four different service calls, but they all route through
MutateAsync(lines 214-238, plus theTask<Result<T>>-adapting overload at lines 244-245): set busy, run the operation, report the failure throughDescribeFailureor the success through a localized toast state, reload the list, clear busy in afinally. A caller supplies only the operation delegate, the success resource key, and an optional post-success callback (AddLinkAsyncclears the composer's draft,SaveTitleAsynccallsCancelEditing).[Rubric #24, Forms, Validation & UX Safety]assesses whether a rejection is explained in place:FailureResourceKeys(lines 264-280) maps every machine-readable error code the four write paths can return to a resource key, with the field's own doc comment (lines 247-263) explaining two edge cases directly in the source (lines 252-255 and 258-261):Http.413is the one transport-level status in the table, because Kestrel refuses an over-cap request body before the friendlySessionAsset.InvalidUploaddomain check ever runs, which is the one case the client-side size check (line 151) cannot catch (a body inflated past the cap by multipart framing); and a title refusal is listed under two different codes because two layers can raise it under different codes: the domain invariant emitsSessionAsset.Title.Empty/SessionAsset.Title.TooLong(lines 275-276), while the request validator'sSessionAssetTitleRulesanswers underSessionAsset.Title.Required/SessionAsset.Title.MaxLength(lines 277-278), and both pairs map to the same two resource keys.DescribeFailure(lines 287-298) falls back to one generic sentence for any code not in the table (a transport fault, a concurrency refusal, an unexpected- rather than surfacing the server's raw text.
[Rubric #27, Internationalization]assesses whether every user-facing string is externalized: every key inFailureResourceKeysand every success key passed intoMutateAsyncis a resource lookup throughL[...], never an inline sentence.
- rather than surfacing the server's raw text.
- Walkthrough
IsAtCap(line 69) is the one gating boolean the panel itself computes; the markup passes it into the composer asDisabledalongside the busy flag.LifetimeToken(line 49, comment lines 46-48) is_cts.LifetimeToken(): readingTokenoff a disposed source throwsObjectDisposedException, and becauseDisposecancels before it disposes, a load or handler that resumes after the user navigated away gets a cancelled token and stops through itsOperationCanceledExceptionpath. Every service call below (load, add link, upload, rename, delete) passes it instead of_cts.Token.OnParametersSetAsync/LoadAsync(lines 71-105;OnParametersSetAsyncis a non-async override that returnsTask.CompletedTaskwhen the session id is unchanged and otherwise hands backLoadAsync()'s task) mirrorSessionAssetsDownloadList's reload guard, but differ in two ways. The fetch passesbypassCache: true(line 87): the list endpoint is served under a shared output-cache policy, so an owner's read could otherwise hit an entry built for an anonymous caller and miss a material they just added, and the flag makes the UI service add a unique query parameter that is a guaranteed cache miss (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/ISessionAssetUIService.cs:25-34). And on a failed fetch this version keeps the list empty and sets a status message (SetStatus, line 95), unlike the read-only list's silent fallback.AddLinkAsync(lines 107-129) takes the(Title, Url)tuple the composer already normalized, re-checks onlyIsAtCap, builds aSessionAssetLinkRequestwithSortOrder = _assets.Count(line 120), and clears the composer's draft (_composer?.ClearDraft()) only onceMutateAsyncreports the write succeeded, so a refused write leaves the speaker with what they typed (in-code comment, lines 123-124). LikeOnFileSelectedAsyncandSaveTitleAsyncbelow, it is a plainTask-returning method that returns theMutateAsynctask (orTask.CompletedTaskon an early exit) rather than awaiting it.ReportInvalidLinkAddress(lines 131-137) words the composer's own refusal of a typed address. The doc comment explains why the wording stays here rather than moving into the composer: every outcome of every action reaches the one aria-live status region below, and the sentence stays beside the matching API refusal it mirrors inFailureResourceKeys.OnFileSelectedAsync(lines 139-162) takes the composer's forwardedIBrowserFiledirectly, rejects an over-cap file client-side againstSessionAssetLimits.MaxFileBytes(line 151) before ever posting, with a title defaulted byDefaultTitleFor(lines 312-324), which strips the extension and falls back to the raw file name only if the stripped result is blank, capped atSessionAssetDTO.TitleMaxLength.StartEditing/CancelEditing(lines 164-175) toggle the inline rename state;SaveTitleAsync(lines 177-196) echoes the asset's ownSortOrderback unchanged (in-code comment: omitting it would silently move the material to the top) and posts throughUpdateAsyncwith the asset'sRowVersionfor optimistic concurrency.DeleteAsync(lines 198-208) confirms through the injectedDeleteConfirmationcomponent rather than a native browserconfirm()(in-code comment: unstyled, untranslated and unreachable from the MAUI head), then deletes throughMutateAsync.- The
_disposed-guarded dispose pair follows the same shape as every other component in this group.
- Why it's built this way: four writes with the same busy/report/reload shape and a shared failure
vocabulary are cheaper to keep correct as one gateway method than as four hand-written try/catch blocks,
and centralizing
FailureResourceKeysis what lets a new server error code be wired to a message in one place instead of four. Extracting the add-link fields intoSessionAssetComposerkeeps this gateway focused on the write itself rather than also owning the draft the write is built from. - Where it's used: rendered on the organizer's and the speaker's session detail surfaces, with
CanManagedistinguishing an editable view from a read-only preview;SessionAssetDisplay.IconForandFormatSizesupply the icon and size text for every rendered asset. - Caveats / not-in-source:
CanManage="false"renders the same read-only shapeSessionAssetsDownloadListprovides independently, so the codebase carries two components capable of a read-only materials list rather than one component the other wraps. Whether that duplication is deliberate is not determinable from this source.
PublicSessionDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionDetail.razor.cs:25· Level 9 · class (Blazor code-behind)
- What it is: the public read-only view of one session (speakers, categories, room and wayfinding) plus the contextual actions an authenticated attendee gets: the bookmark toggle (rendered through
SessionBookmarkButton), the feedback link, a listen-aloud button, and the Live entry point when the Engagement module is present and the session is inside its event's live window. - Depends on: its base class
DetailPageBase(@inheritsatPublicSessionDetail.razor:8), which suppliesBeginLoad,CompleteLoad, theLatestLoadGuardLoadGuard,LoadStateandPageToken(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:38,:45,:52,:59,:78);ISessionUIService,ISpeakerLookupService,IRoomUIService,ICategoryItemLookupService(:27-30),IEventLookupServiceand an injected BCLTimeProviderfor the live-window check (:35-36); optionallyISessionLiveUIService(property:41, resolved at:52);ITextToSpeechService(:34);SessionDTO,RoomDTO,IToastService(:32),ResultandError.Unexpected(:174,:217),CurrentEventSelector.GetLiveWindowUtc(:309-312),ConferenceRoutePaths(:56,:317), and the typed route parameterId(aSessionIdentifierType,:43) that the page passes straight to the service. The bookmark toggle itself, includingISessionBookmarkUIServiceand theClaimsPrincipalExtensions-based user lookup this page used to hold, now lives entirely inSessionBookmarkButton, which the page renders and no longer injects services for. - Concept introduced, optional cross-module service resolved through the container. Blazor's
[Inject]has no optional mode (an unregistered service throws at render), so the Engagement-ownedISessionLiveUIServiceis resolved withServiceProvider.GetService<T>()inOnInitializedand left null when that module is disabled (property:41, comment:38-40, resolved at:52). The markup only renders the Live button whenSessionLiveresolved.[Rubric section 7, Microservices Readiness](assesses that a module can be switched off without breaking its consumers): the Conference page degrades to a plain read-only session view when Engagement is absent, rather than failing to render.[Rubric section 3, Clean Architecture]: the dependency is on an interface owned by the other module's UI contract, never on its internals. The page combines three mechanisms taught elsewhere. The prerender hand-off (:100-119): under InteractiveAuto the interactive instance re-runsOnParametersSetAsync(a non-async method returning the chosen task directly), so the comment (:102-106) records that every visit used to fetch the session, all speakers, all category items, the room and the bookmark state twice, and names the category-item read as the expensive one, a full-table read per view. The SSR pass now runsPrerenderSessionAsync(:107-110, method:125-140), which fetches only the session (on the base'sPageToken,:129) and stores it in two[PersistentState]properties,PrerenderedSessionandPrerenderedSessionId(:73-78, doc:66-72); the lookups stay interactive-only and the prerendered markup is still the loading skeleton (doc:121-124). The interactive load then callsTakePrerenderedSession(:146-152), which returns the persisted DTO only when it was fetched for the current route id and clears both properties either way, so it answers one load at most and never a different id (doc:142-145). The per-reader bookmark state is not part of that DTO and is fetched interactively bySessionBookmarkButton(doc:68-70).[Rubric section 23, Front-End Performance & Rendering]. The load guard now comes fromDetailPageBase:LoadSessionAsynccallsBeginLoad()(:157) to get back both a token and a generation, so starting a new load also cancels the fetch already in flight, andCompleteLoad(generation, result)(:179) records the outcome into the base'sLoadStateonly when the generation is still current, withLoadGuard.IsCurrent(generation)re-checked after every later await. The comment on_loadedId(:61-64) explains why the generation rather than the route id is authoritative. The page owns noCancellationTokenSource: the load's token is kept in_sessionToken(:83, comment:80-82, assigned at:158), which the next route change and disposal both cancel, and the listen-aloud call runs on it (:342). Blazor keeps this routed instance when only theIdchanges, so a read-aloud tied to a page-lifetime token would have kept reading the previous session (U-25). It also repeats the BR-49 status allow-list asIsStatusIneligible(:95-98), with the comment pointing atSessionStatuses.IsEligibleas the same rule the server applies. - Walkthrough
LoadSessionAsync(:154-223): right afterBeginLoad()it records the load's token as_sessionToken(:158) and resets the derived per-session state (_room,_roomName,_speakerNames,_categoryNames,_isLiveNowand_isSpeaking,:164-169) so a session with no room, or a failed enrichment lookup, never shows the previous session's room, speakers, categories or live state (comment:160-163, tags L156 and U-25; starting the load cancelled the previous session's read-aloud, so the button starts as Listen). It then takes the prerendered session or fetches the session with children by the typedId(:173-175). A not-found or failed fetch raises no toast:CompleteLoadrecords it intoLoadState, which the page body states throughDetailLoadStateContent(PublicSessionDetail.razor:19, with Retry for a failure), andSessionis cleared only when the generation is still current (:177-187), so a superseded response changes nothing. On success it runs three resolvers in a single short-circuiting condition (:192-194) so any one failing raises one load-failure toast (:196-199), each resolver taking the load's own cancellation token, and finallyResolveLiveWindowAsync(:204). The broadcatch (Exception)(:210-222) records that every resolve step above answers with aResult, so nothing here is expected to throw; a fault that does completes the load as a failure withError.Unexpected("PublicSessionDetail.LoadFailed", ...)(:217) and clearsSession, leaving the reader the failed-load body and its Retry rather than a blank card. Its CA1031 suppression is a#pragma warning disable/restorepair around that onecatchline with the justification written inline (:210,:212), so the analyzer stays on for the rest of the file.ResolveSpeakerNamesAsync(:229-241) andResolveCategoryNamesAsync(:244-260) join the session's child collections against the two lookup services, skipping ids the lookup does not know; the category resolver prefixes the owning category title when present, so a chip reads "Level: Intermediate".ResolveRoomAsync(:267-289): returns success immediately for a session with no room, otherwise fetches the room including wayfinding info (BR-94) and treats a not-found as a tolerable miss that leaves the wayfinding block empty (:288), which the markup renders field by field. It does not clear_room/_roomNameon a miss:LoadSessionAsyncalready reset them up front.ResolveLiveWindowAsync(:298-315): decides whether the session is inside its event's live window. It looks the event up throughIEventLookupService(:301), re-checks the generation, and returns with_isLiveNowfalse when the lookup failed or the event is unknown (:302-307). OtherwiseCurrentEventSelector.GetLiveWindowUtcturns the event's start date, end date and time zone into a UTC range from the first day 00:00 to the day after the last (doc:291-297, the same window the server enforces), compared againstTimeProvider.GetUtcNow().UtcDateTime(:313-314). A missing Live button is deliberately not worth a toast.[Rubric section 29, Resilience & Business Continuity].ToggleListenAsync(:324-348): text to speech over the description, where the same button stops playback;SpeakAsyncruns on_sessionToken(:342) and completes when playback finishes,StopAsynccancels it, or the page moves to another session or is disposed, and thefinallyclears_isSpeakingeither way.[Rubric section 21, Accessibility](assesses alternative modalities for content) and ADR-042 Wave 3.- Navigation (
:317,:319) returns to the schedule or opens the session feedback form (the route is built withstring.Create(CultureInfo.InvariantCulture, ...)over the typedId). The page declares no disposal of its own: the comment at:350-351records that disposal isDetailPageBase's (Dispose(bool),MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:120), which disposesLoadGuardand so cancels_sessionToken, stopping a read-aloud still in progress. The page sits on the same base asSponsorDetail.
- Why it's built this way: this is the page an attendee opens in a hallway, so the expensive lookups are done once per id, the optional Live capability fails soft, and the bookmark toggle is a self-contained component so the page's own load path no longer has to carry a user's authentication state just to draw one star.
- Where it's used: the
/conference/sessions/{Id}route, reached fromPublicSessionListViewrows and cards and fromPublicSpeakerDetail; its markup rendersSessionBookmarkButtonfor the star (PublicSessionDetail.razor:157) and aQrCodeButtonfor its own public link (PublicSessionDetail.razor:51).
PublicSessionEventCatalog
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionEventCatalog.cs:18· Level 10 · class (internal sealed)
- What it is: the page-state holder for everything
PublicSessionListknows about events, rooms and speakers: the loaded events with their rooms, the Room picker options, a room-name index, the speaker lookup, and the event and room filter selection (PublicSessionEventCatalog.cs:32-53). It was extracted out of the page, which now holds one instance as_catalog(PublicSessionList.razor.cs:47). - Depends on:
IEventUIServiceandISpeakerLookupServiceasLoadAsyncarguments (:65-70), a BCLTimeProvider(:68), the cascadedTask<AuthenticationState>(:69),PublicReadAudience(:72),PrerenderLookupBudget(:75-78),PublicScheduleRoomOptions(:92,:158),CurrentEventDefaults(:173),SpeakerInfo(:44),Errorfor the kept events failure (:26), andEventDTO/RoomDTO. - Concept introduced, state plus its rules in a plain class. The catalog takes its collaborators as method arguments rather than injecting them, so the page keeps ownership of the
[Inject]surface and the catalog stays a plain object whose rules (who is privileged, which event is the default, what a failed fetch means) sit beside the data they govern.[Rubric §18, UI Architecture & Component Design](assesses decomposition of a page into focused units). - Walkthrough
LoadAsync(:65-101) resolves privilege throughPublicReadAudience(:72), then reads the events with children throughPrerenderLookupBudget.RunAsync(:75-78), which receives theprerenderingflag (:70, doc:63: the server pre-render bounds the events read) and the clock, and hands the read its token. On success it indexes every event's rooms intoRoomNamesand loads the speaker lookup, still onCancellationToken.None(:87-95,:93). A failed events fetch is remembered in_eventsLoadFailed(:84) together with its errors inEventsLoadErrors(:85, reset to empty on success at:89), and deliberately skips the speaker lookup, because it only labels sessions of the events that failed to load (comment:81-83). It then marks the catalog loaded (:97), resolves the default event filter and rescopes the Room picker (:98-99), and returns which reads failed as(EventsFailed, SpeakersFailed)(:100) so the page can toast.EventsLoadErrors(:26, doc:22-25) keeps the most recent failed events read's errors so the page can answer a refused fetch with that failure instead of a generic load error.ScopeUnresolvedForPublicReader(:110) is!IsPrivileged && !SelectedEventId.HasValue && _eventsLoadFailed: true only for a non-privileged reader with no selected event because the fetch failed. A successful fetch that finds no current or next event stays unscoped, and the doc (:103-109) records that the view also renders its load-failed state with Retry while this holds and no lookup is in flight (the page'sShowLoadFailed), because a pre-rendered empty grid could otherwise read as "No sessions found.".[Rubric §29, Resilience & Business Continuity].RescopeRestoredSelection(:125-131) rescopes the Room picker after a saved selection was restored over an already-loaded catalog (M245, the base page's late sessionStorage restore). It does nothing untilLoadAsynchas run, tracked by the_loadedflag (:29, set at:97), becauseLoadAsyncrescopes itself and an empty catalog would drop the restored room.SelectEvent(:114-118) switches the event filter and rescopes the Room picker in one call.ApplyFilters(:136-154) addsTitle contains,EventId equalsandRoomId equalsto the query's filter dictionary. The comment on the room branch (:148-149) notes thatSession.RoomIdis a real nullable column, so it rides the generic filter pipeline likeEventId.ResolveDefaultEventFilter(:160-175): a privileged reader keeps a restored id only if it still exists in the loaded events (:166-171); everyone else is always locked toCurrentEventDefaults.SelectCurrentOrNextevaluated againsttimeProvider.GetUtcNow().UtcDateTime(:173), so a shared privileged URL can never pin an attendee to a different or unpublished event (comment:162-165).[Rubric §11, Security].
- Why it's built this way: the audience rule and the fail-closed rule are the page's security-relevant logic, and a plain class can hold them where the page's unit tests reach them without rendering a grid.
- Where it's used: held as
_catalogbyPublicSessionList(PublicSessionList.razor.cs:47), which loads it inLoadEventsAndResolveDefaultAsync(:195-196), saves and restores its selection throughPublicSessionListFilterState(:106-127), applies its filters to every fetch (:368-369), and answers a fail-closed fetch with itsEventsLoadErrors(:346).
PublicSessionList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionList.razor.cs:25· Level 11 · class (Blazor code-behind)
- What it is: the public conference schedule and the most heavily wired page in this unit. It is the container half of a three-part page (this class,
PublicSessionListFilterBar,PublicSessionListView), and it now delegates its state to four small helpers:PublicSessionEventCatalogfor events, rooms, speakers and the event and room filters,PublicSessionBookmarkStatefor who the reader is and what they starred,PublicSessionEventScopefor the in-flight events lookup, andNewestLoadTracker<T>for racing grid loads. The page itself keeps the search string, the My Schedule flag and the server-paged fetch (class doc,PublicSessionList.razor.cs:16-24). - Depends on: extends
DataGridListPageBase<TDto>closed overSessionDTO(:25), whoseMobileListRef,ReloadActiveLayoutAsync,MobilePageFetcher,OnRestoredStateAppliedAsyncandNavigateAwayit uses (:118,:274,:398,:385,:201);IPublicSessionScheduleService(:29) with itsSessionSchedulePageRequest(:317),IEventUIServiceandISpeakerLookupService(:30-31), an injected BCLTimeProvider(:33), the optionalISessionBookmarkUIService(:37); the four helpers above (:43-50) andMyScheduleArrival(:59);PublicSessionListFilterState(:122,:133),ConferenceRoutePaths(:201),MobileInfiniteScrollList<TItem>(:118), andResult(:300). Event, room and speaker types (EventDTO,RoomDTO,SpeakerInfo),PublicReadAudience,PublicScheduleRoomOptionsandCurrentEventDefaultsare now used insidePublicSessionEventCatalog, andClaimsPrincipalExtensions'sGetUserIdinsidePublicSessionBookmarkState. - Concept introduced, the container page with racing loads, a dual-branch fetch, and a fail-closed scope. Everything the sibling list pages do once, this page does twice and then adds a mode switch.
- Two startup tasks, both awaited by the fetch path.
OnInitializedAsync(:154-190) creates_bookmarksand starts its load (:176-177), then starts the events load through_eventScope.Start(...)(:181), both before the firstawaitthat matters. The comments (:173-175,:179-180) name the failure each guards: the grid's firstServerDatacall can race ahead of initialization (in-app back-navigation has no prerendered data), and the fetch awaits the same bookmark task so My Schedule never fetches as a signed-out reader, while the default (current or next) event must be resolved before the first fetch.LoadScopedPageAsync(:283-294) awaitsEnsureEventScopeAsync(:287) before entering the base'sLoadServerDataAsync(:289), becauseApplyAdditionalFiltersruns inside it, andFetchSessionsAsync(:300-338) awaits the bookmark load through_bookmarks.EnsureAsync(:313).[Rubric §19, State Management & Data Flow]. - Racing grid loads resolve to the newest.
LoadServerData(:279-280) wraps each load in_gridLoads.Track(LoadScopedPageAsync(state)).NewestLoadTracker<T>records the load as the newest before anything yields, so a load superseded while it waited on the event scope answers with the newest load's result instead of painting its own empty page (doc:276-278, tag U-35).[Rubric §19, State Management & Data Flow]. - Two fetch branches, both truly server-paged. In My Schedule mode with bookmarks present, the page passes the bookmarked ids as
MyScheduleSessionIdson theSessionSchedulePageRequest(:323) and the service turns them into a server-sideId IN (...)filter so the server still pages (MMCA.ADC.Conference.UI/Services/Public/IPublicSessionScheduleService.cs:14-19). The request is built once (:317-323), so the offline fallback judges exactly the request a live fetch would send (comment:315-316, tag M208). An empty bookmark set short-circuits to([], 0)(:332-335) rather than issuing a query that would return the whole catalog, and returns before the offline snapshot is written so an empty schedule never overwrites the cached programme (comment:330-331).[Rubric §12, Performance & Scalability]. - Audience-scoped filter persistence. Only privileged readers persist an event choice, expressed as
persistEventId: _catalog.IsPrivileged && _catalog.EventFilterResolvedin the call toPublicSessionListFilterState.Save(:121-124). The default-event rule itself (everyone else locked to the current or next event) lives inPublicSessionEventCatalog.ResolveDefaultEventFilter.[Rubric §11, Security]and[Rubric §26, Front-End Security]. - Fail closed, with a retry that heals. When the public scope is unresolved, or the bookmark read failed in My Schedule mode,
FetchSessionsAsyncroutes toAnswerUnqueryablePageAsync(:325-328,:343-361). Offline, the cached programme answers first because a dead venue network fails both reads alike (doc:340-342, tag A-09;:348). Otherwise a bookmark failure is returned as a failedResultcarrying the same errors (:353-356), and an unresolved scope returns a failedResultcarrying the catalog'sEventsLoadErrorsrather than issue an unscoped session query (:360). The comment (:358-359) records why the lookup's own (never empty) errors answer the fetch: the base'sResultpath words the toast and shows the failed grid state, whose Retry re-resolves the scope first.EnsureEventScopeAsync(:242-243) delegates toPublicSessionEventScope.EnsureAsync, which re-issues a failed events lookup at most once and lets overlapping loads share that one re-issue.EventsLookupPending(:227) andShowLoadFailed(:233) hold the load-failed state back while a lookup is still in flight (doc:229-232, tag U-35), andScopeFailureShown(:236) does not count an unresolved scope as a failure when the offline snapshot is on screen.[Rubric §29, Resilience & Business Continuity]and[Rubric §11, Security]. - A deep link that beats saved state, unless the reader is signed out.
[SupplyParameterFromQuery(Name = "mine")](:70-71) carries the MAUI head's home-screen quick action into the My Schedule view, andOnInitializedAsyncapplies it after the base has restored saved page state so intent wins, also recording_mineDeepLinked(:158-162). When the reader is not authenticated, the interactive pass redirects to sign in instead of showing the full programme under a "My Schedule" title (:164-170, tag A-23). The check isIsReaderSignedOutAsync(:193-194), where an unknown auth state counts as signed out.RedirectToLogin(:198-202) sets_redirectingToLoginand navigates to/loginwith areturnUrlback to?mine=truethrough the base'sNavigateAway(:201;MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1987), because the base reload on the same location change must not rewrite the URL after the redirect (doc:196-197).FetchSessionsAsyncreturns an empty page while that flag is set (:308-311). The same link can also arrive on a list that is already open: the page dropsminefrom its URL after the first load, so a shortcut tap only changes a parameter.OnParametersSetAsync(:105-112) asksMyScheduleArrivalwhether this parameter set is such a later arrival and, for a signed-out reader not already on the way out, calls the sameRedirectToLogin(:108-111, remarks:103-104); a signed-in reader is switched by the filter restore instead.[Rubric §25, Navigation & Information Architecture]and ADR-042 Wave 2. - A restored My Schedule is not an intent (L155).
ClearMyScheduleForAnonymousReader(:146-152) drops_showMyScheduleOnlyonce the reader is known to be anonymous (_readerKnownAnonymous,:54, set at:188). It runs after the initial load (:189) and again at the end ofRestoreFilters(:130-142, remark:127-129), because the base page's later sessionStorage restore can re-apply a stale flag. The same method also re-applies the?mine=truedeep link after the restore (if (Mine == true || _mineDeepLinked),:135), so the link still beats saved state._mineDeepLinked(:63) exists because the first load dropsminefrom the URL before the base's late restore runs (it waits for the layout render, X-17), so the intent is kept on the page instead (comment:61-62, M245); toggling My Schedule by hand clears it (:267). The method ends by calling_catalog.RescopeRestoredSelection()(:141) so the Room picker follows a restored event (M245).[Rubric §25, Navigation & Information Architecture]. - The offline snapshot lives in the service, not the page. The section comment (
:363-365) states the division:IPublicSessionScheduleServicekeeps the last successful first page of the programme so a dead venue network still shows a schedule, and only the banner stays here. The page passesOnCacheStateChangedinto the fetch (:337) and the offline read (:348), and that handler flipsShowingCachedData(:366, set at:372), callingStateHasChanged()only on the raise, because the clear rides the render the grid does for the fresh rows anyway (:368-377). The chip itself is markup (PublicSessionList.razor:40-46).[Rubric §29, Resilience & Business Continuity]and ADR-042 Wave 3. - A one-time set-a-password hint after a sign-in link.
[SupplyParameterFromQuery(Name = "signedInByLink")]SignedInByLink(:79-80) is set by the sign-in link landing path (SignIn:SignInLinkLandingPath, doc:73-78) after a visitor redeems an invitation or a sign-in link.OnParametersSet(:91-100, remarks:89-90) captures it the first time it arrives, guarded by_passwordHintCaptured(:83), into_showPasswordHint(:86), because the list page rewrites its URL with its own state on first load and that drops the value from the query. The markup shows an infoMudAlertwith a dismiss button while the flag holds (PublicSessionList.razor:13-26; its comment records that an account an invitation created has no password yet, and Forgot password is how it gets one), andDismissPasswordHint(:114) clears it.[Rubric §24, Forms, Validation & UX Safety].
- Two startup tasks, both awaited by the fetch path.
- Walkthrough
SaveFilters/RestoreFilters(:121-142) delegate toPublicSessionListFilterState, reading and writing the catalog'sSelectedEventId,EventFilterResolvedandSelectedRoomIdrather than page fields. After the restore,RestoreFiltersforces My Schedule on when theminequery parameter is true or the page opened on the deep link (:135-138), clears it for an anonymous reader, and rescopes the Room picker through the catalog.OnRestoredStateAppliedAsync(:385-386) overrides the base's hook (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:755) to re-render the page when a restore needs a reload. The remarks (:383-384) give the reason: the late sessionStorage restore runs after the layout render (X-17) and on a phone reloads only the card list, so without this re-render the filter bar would not show the restored event and rooms.LoadEventsAndResolveDefaultAsync(:208-223): one call to_catalog.LoadAsync, passingprerendering: !RendererInfo.IsInteractiveso the pre-render bounds the events read (:210-211, doc:204-207), then a single toast for whichever read failed, the events error taking precedence over the speakers error (:212-222). The events toast is skipped on a public reader's fail-closed path (ScopeUnresolvedForPublicReader,:214), because there the grid's ownResulttoast already reports that failure. One children-loaded events fetch plus one speaker lookup replace per-row enrichment calls.[Rubric §23, Front-End Performance & Rendering].- Filter handlers (
:246-269) each update one value (the search string, the catalog's selection, or the My Schedule flag, whose handler also clears_mineDeepLinkedat:267) and returnReloadViewAsyncdirectly rather than awaiting it.ReloadViewAsync(:274) calls the base'sReloadActiveLayoutAsync(_view?.MobileList)(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879): on a phone the base saves the filters first, because the card list fetches throughFetchMobilePage, which saves nothing, so the My Schedule state an earlier?mine=truelink saved would otherwise come back when the reader returns (comment:271-273). ApplyAdditionalFilters(:379-380) forwards to_catalog.ApplyFilters(filters, _searchString); theTitle,EventIdandRoomIdfilters are described underPublicSessionEventCatalog. The room branch is worth reading againstPublicSpeakerList:Session.RoomIdis a real nullable column, so it rides the generic filter pipeline with no virtual-key interception in the controller, unlike the speaker page'sEventId.FetchMobilePage(:393-399) awaits the sameEnsureEventScopeAsync(:395) and then runs the delegate the base'sMobilePageFetcherbuilds overFetchSessionsAsync,ApplyAdditionalFiltersand a start-time sort (nameof(SessionDTO.StartsAt),:398;DataGridListPageBase.cs:1101), matching the desktop grid's initial sort (comment:397). The comment above the method (:388-392) explains why the scope wait stays here rather than in the base'sOnBeforeFetchAsync: the grid path already awaits it before entering the base loader (so a superseded load is tracked, U-35), and a secondEnsureEventScopeAsyncin the same load could re-issue a failed lookup a second time. Both layouts share one fetch implementation including its offline path and its fail-closed guard.- The optional Engagement service is resolved with
GetService(:156) for the same reason as onPublicSessionDetail:[Inject]has no optional mode (:35-36).
- Why it's built this way: this is the highest-traffic page of the conference, viewed on bad networks by both anonymous browsers and signed-in attendees managing a personal schedule. That drives every design decision visible here: server-side everything, one enrichment fetch, ordering guarantees around the grid's eager first call, newest-load-wins when loads overlap, an audience-locked event filter that refuses to run unscoped when its scope could not be loaded, a room filter derived from data already in hand, and a cached last-known-good first page owned by the service rather than the page.
- Where it's used: the
/conference/sessionsroute (PublicSessionList.razor:1, matchingConferenceRoutePaths.PublicSessionsatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:47), including the?mine=truedeep link; it rendersPublicSessionListFilterBar(PublicSessionList.razor:28-38) andPublicSessionListView(:48-65) and routes onward toPublicSessionDetail.
ScorePollSignal
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollTracker.cs:8· Level 0 · enum (internal)
- What it is: the five-valued verdict that ScorePollTracker returns for one observation of the AI-scoring poll loop. It says what should happen next: keep waiting, re-render with fresh data, or stop and report an outcome.
- Depends on: nothing. It is a bare
internal enumdeclared above the tracker in the same file (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollTracker.cs:8), visible to the bUnit test project through the project'sInternalsVisibleTo(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/MMCA.ADC.Conference.UI.csproj:9). - Concept introduced: the decision/effect split.
[Rubric §18, UI Architecture]assesses whether components stay thin and free of tangled control flow; naming each outcome as an enum member is how that is achieved here. The decision (what did this poll mean?) is computed by a pure state machine, ScorePollTracker, and the effects (toast, re-render, stop the loop) are applied in a singleswitchinside ScorePollSession, so neither half has to know the other's internals.[Rubric §14, Testability]follows for free: the signal sequence for a synthetic count series can be asserted without rendering anything. - Walkthrough:
Continue(ScorePollTracker.cs:11) means nothing changed this tick, keep polling.Progressed(:12) means new scores arrived, so apply the fresh board, re-render, and keep polling.CompletedAll(:15) means every session now has a score, so apply and finish successfully.CompletedStable(:19) means the count has been unchanged long enough to call scoring done, with the success-versus-partial wording decided from coverage.GaveUpNoScores(:22) means no score was ever produced inside the zero-progress budget, so fail loudly rather than wait out the full cap. - Why it's built this way: the poll loop has four terminal outcomes that each need a different user-facing message (complete, partial, timed out, never started). An enum makes the exhaustive
switchin ScorePollSession readable and keeps that failure vocabulary in one place. - Where it's used: returned by
ScorePollTracker.RegisterFetch(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollTracker.cs:96) and consumed byScorePollSession.HandleSignalAsync(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollSession.cs:137-167).
SessionSelectionDisplay
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionDisplay.cs:13· Level 1 · class (static, internal)
- What it is: a stateless helper holding the display and filter-matching rules shared by the session-selection dashboard and its two presentational sub-components. It answers four kinds of question with no side effects: what color a score chip should be, whether a locality tier counts as local or is the "Unknown" sentinel, and whether a session passes the active score-tier or status filter. Status chip colors now come from SessionStatusDisplay.
- Depends on: the MudBlazor
Colorenum (external NuGet, imported atSessionSelectionDisplay.cs:2) andSessionStatusesfor the eligibility rule. No other first-party types: it is deliberately dependency-light so both SessionSelectionSpeakerOverlap and SessionSelectionAiScores can call the same predicates, and so can the page markup itself. - Concept introduced: extracting view logic into testable pure functions.
[Rubric §18, UI Architecture]rewards keeping decision logic out of.razormarkup so it can be unit-tested and reused;[Rubric §14, Testability]is the same point from the other side. Every method here isstaticand total (eachswitchhas a default arm), so the same input always yields the same color or boolean regardless of component state. - Walkthrough:
UnknownLocalityTier(SessionSelectionDisplay.cs:19, the literal"Unknown") is the tier name the dashboard handler reports for a speaker with no resolvable locality; it is a sentinel rather than data, soIsUnknownTier(:21-22, an ordinal equality test) lets the page swap in the localizedChip.Unknownlabel instead of showing the raw string.IsLocalTier(:24-27) folds three locality substrings (Atlanta,Georgia,Surrounding, all matched withStringComparison.OrdinalIgnoreCase) into one "is this speaker local" test.GetScoreColor(:29-35) buckets adecimalscore into four bands (at or above 8.0 success, 6.0 info, 4.0 warning, otherwise error).ScoreMatchesFilter(:37-48) turns a filter token ("9.0"down to"3.0", plus"<3.0") into a threshold predicate, with an unrecognized token matching everything;<3.0is the only strict-less-than case.MatchesAcceptedFilter(:50-51) now compares againstSessionStatuses.Acceptedinstead of a literal, andSessionMatchesStatus(:53-56) delegates the null-status case toSessionStatuses.IsEligiblerather than inlining the null-or-Accepted check; every other filter is still a plain case-insensitive equality test. - Why it's built this way: the two sibling sections filter over different DTO shapes but must agree on what "score tier 8.0" or "status Accepted" means; hoisting the rules here guarantees they never drift apart. Routing the status literal and the eligibility rule through
SessionStatuseskeeps this file and SessionSelectionFilterOptions from drifting on what "Accepted" means. The tier tokens it understands are exactly the values SessionSelectionFilters.ScoreTierOptionsoffers in the picker. - Where it's used: by SessionSelectionSpeakerOverlap (
SessionMatchesStatusandScoreMatchesFilter,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionSpeakerOverlap.razor.cs:60and:69), by SessionSelectionAiScores (MatchesAcceptedFilterandScoreMatchesFilter,.../SessionSelectionAiScores.razor.cs:48and:63), and directly from markup for chip coloring:.../SessionSelectionAiScores.razor:72and:76,.../SessionSelectionSpeakerOverlap.razor:45,:61,:65, and the locality tiles on the page itself (.../SessionSelectionDashboard.razor:194).
ScorePollTracker
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollTracker.cs:33· Level 1 · class (sealed, internal)
- What it is: the pure state machine behind the dashboard's fire-and-forget AI-scoring poll loop. It counts progress, stability, zero-progress polls, and consecutive failures, and converts each observation into a ScorePollSignal. It performs no I/O and touches no UI.
- Depends on: nothing first-party except the co-located ScorePollSignal enum it returns and, for
CountScoredSince, SessionAiScoreDTO; its own state is fourintfields. - Concept introduced: taming a fire-and-forget loop with an explicit budget.
[Rubric §12, Performance and Scalability]and[Rubric §29, Resilience and Business Continuity]both ask whether long-running work has bounded cost and a defined give-up path, and this class is where those bounds are written down as named constants instead of being scattered through a component. The class doc names the motivation directly (ScorePollTracker.cs:27-32): the state machine was extracted from the page code-behind so the component keeps only the UI side effects, which is the[Rubric §18, UI Architecture]concern about component size.[Rubric §14, Testability]applies because the whole loop policy can be exercised by callingRegisterFetchwith a synthetic count series, with no timers and no rendering. - Walkthrough: two public constants set the outer limits.
MaxPolls = 225(ScorePollTracker.cs:36, documented as a 30-minute cap at 225 polls times an 8-second interval) andMaxConsecutiveFailures = 5(:41), whose doc comment explains why failures are tolerated at all: the polling task is fire-and-forget, so an escaping exception would be unobserved and would wedge the Score button until a full reload. Two private constants set the inner heuristics, both widened by a later fix:ZeroProgressLimit = 15(:49, roughly two minutes with no score written by this run, sized to outlast the 60-second internal-command poll that picks a scoring run up plus its first call, or a healthy run reads as producing nothing) andStablePollsForCompletion = 6(:55, roughly 48 seconds, sized to outlast one scoring call's 30-second framework timeout plus its save, or a single slow call mid-pass reads as the end of the run). Four fields carry the state (:57-60):_previousCount,_stablePolls,_zeroProgressPolls,_consecutiveFailures.ResetFailures(:63) zeroes the failure counter after any successful fetch;RegisterFailure(:69-73) increments it and returnstrueonce the budget is exhausted.CountScoredSince(scores, baseline)(:75) is astatichelper added alongside the widened limits: it counts a session as scored-this-run when it is missing from the baseline dictionary or itsScoredOnmoved, because the scoring runner replaces each session's score in place, so the raw dashboard count cannot tell a re-run's progress from its starting point.RegisterFetch(currentCount, totalSessions)(:82-108, taking the scored-this-run count rather than the raw dashboard count) is the core: a zero count increments_zeroProgressPollsand returnsGaveUpNoScoresat the limit, otherwiseContinue(:84-90); any nonzero count clears the zero-progress counter (:92); a count greater than the previous one advances_previousCount, resets_stablePolls, and returnsCompletedAllwhen the count has reachedtotalSessions(guarded bytotalSessions > 0) orProgressedotherwise (:94-101); an unchanged count increments_stablePollsand returnsCompletedStableat the (now six-poll) stability window (:103-110); anything else returnsContinue(:112). - Why it's built this way: server-side AI scoring is a batch whose duration depends on an external model, so the UI has no completion event to await and must infer completion from the score count. Treating completion as either full coverage or a run of unchanged polls yields an answer even when some sessions fail to score, and the separate zero-progress budget turns the common credential-failure case into a fast, loud error rather than a long silence. Both windows were widened, and
CountScoredSincewas added, once a re-run over an already-scored event was found to read the flat raw count as instant stability and report every session it had not yet reached as failed. - Where it's used: instantiated once per scoring run by ScorePollSession
.RunAsync(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollSession.cs:56), whoseforloop bounds itself withScorePollTracker.MaxPolls(:57);CountScoredSinceis called from the same file (:64). - Caveats / not-in-source: the latency claim in the
MaxPollscomment ("enough for ~200+ sessions at typical Haiku latency",ScorePollTracker.cs:35) is a code comment, not a measurement recorded in this repo.
ScorePollHost
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollSession.cs:18· Level 4 · record (sealed, internal)
- What it is: the five-callback contract a ScorePollSession uses to reach back into the page that started it. The polling session owns no rendering: everything it needs from the component (the current load generation, the poll cadence, applying a board, re-rendering, finishing with a message) arrives as a delegate in this record.
- Depends on: SessionSelectionDashboardDTO (the payload of
ApplyFreshDashboard) and ToastSeverity (the severity of the finish message), plus BCLFunc<>,Action<>,Task, andTimeSpan. It is a positionalrecordwith no body. - Concept introduced: the callback record as an inverted UI port.
[Rubric §1, SOLID]assesses dependency inversion and interface segregation: rather than handing the loop a reference to the whole component (which would let it touch any field and would make it untestable outside a renderer), the component passes exactly the five capabilities the loop needs, each as its own delegate.[Rubric §19, State Management]is the reason this shape exists at all: two of the five members are readers, not values.CurrentGenerationandPollIntervalareFunc<>rather than captured snapshots so the loop re-reads the page's live state on every tick, which is what lets an event switch supersede a running session mid-flight and lets a bUnit test shrink the cadence after the loop has already started. - Walkthrough:
CurrentGeneration(ScorePollSession.cs:19) reads the page's_loadGenerationcounter, the value the loop compares its own generation against to decide it has been superseded.PollInterval(:21) reads the page's cadence, re-read every tick (:15).ApplyFreshDashboard(:22) is anAction<SessionSelectionDashboardDTO, int>: it hands a freshly polled SessionSelectionDashboardDTO to the page together with the number of scores the current run has written so far (:16), and the page swaps the board in, stores that count for the progress display, and recomputes the derived state. The count travels separately because a rescore rewrites each session's score in place, so the board's own score list cannot measure the run's progress.RenderAsync(:23) is the component'sInvokeAsync(StateHasChanged), so the re-render is marshalled onto the renderer's synchronization context from whatever thread the loop resumed on.FinishScoring(:24) ends the scoring session and surfaces the outcome as a toast, taking the message and a ToastSeverity. - Why it's built this way: the doc comment states the rule (
:9-13): the loop raises side effects, the page performs them, soStateHasChanged, the toasts, and the generation counter that supersedes a stale session all stay on the component. Making the port arecordof delegates instead of an interface keeps the wiring to one expression at the call site and avoids a second implementation existing only for tests. - Where it's used: constructed inline by SessionSelectionDashboard
.PollForScoresAsync(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:282-287) and consumed throughout ScorePollSession.
SessionSelectionAiScores
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionAiScores.razor.cs:12· Level 4 · class (partial component)
- What it is: the presentational AI-scores section of the selection dashboard. It renders the "Score Sessions with AI" action with its in-progress state and the per-session score table, narrowed by the parent's active filters. The scoring flow itself stays on the containing page and is triggered upward through an
EventCallback. - Depends on: SessionSelectionDashboardDTO and its SessionAiScoreDTO rows (imported at
SessionSelectionAiScores.razor.cs:2), SessionSelectionDisplay for the shared predicates, and the Blazor[Parameter]andEventCallbackinfrastructure fromMicrosoft.AspNetCore.Components(external,:1). - Concept introduced: lifting the action up via
EventCallback.[Rubric §19, State Management]favors child components that raise intent rather than own the operation; here the child never calls a service. The scoring trigger is exposed as[Parameter] public EventCallback ScoreRequested(:24) alongside anIsScoringflag the parent flips (:15) and aScoredThisRuncount the parent feeds from the polling run (:22), so the long-running scoring loop, its cancellation, and its toasts all live in SessionSelectionDashboard while this section only shows the button and the progress state. Like its sibling it is otherwise a pure function of its parameters (:14-29): the wholeDashboardDTO, the scoring flag and count, plus the same five filter strings, each defaulting to empty. - Walkthrough:
ScoredThisRun(:22) carries its reason in its doc comment (:17-21): a rescore rewrites each session's score in place, soDashboard.AiScoresstill holds every previous score while the run is in flight, and only this count measures the run's progress.ScoredShown(:31) clamps the count toDashboard.TotalSessions, andScoringPercent(:33-34) turns it into a percentage, guarding a zero total. The markup's in-progress alert renders both: the "N / total sessions scored" line and a named progress bar whose share also reads as text (.../SessionSelectionAiScores.razor:20-39).HasActiveFilters(:36-39) is a cheap short-circuit over the five filter strings.FilteredAiScores(:41-53) returns an empty list when the board has no scores yet (:45-46), returnsDashboard.AiScoresuntouched when no filter is active (:48-49), and otherwise materializesApplyAiScoreFiltersinto an array with a collection expression (:51).ApplyAiScoreFilters(:55-77) is a straight pipeline ofWhereclauses over the flat score rows: status through a single call to SessionSelectionDisplay.SessionMatchesStatus(:59-62); locality against the row'sSpeakerLocalitiescollection (:64-65); category againstSessionCategories(:67-68); level as a case-insensitive equality onSessionLevel(:70-71); and score tier viaScoreMatchesFilteronOverallScore(:73-74). The markup colors each row's status and score chip through SessionStatusDisplay and SessionSelectionDisplay (.../SessionSelectionAiScores.razor:78and:82). - Why it's built this way: the score table is a flat DTO list, so its filter pipeline is simpler than the speaker section's nested rebuild; sharing SessionSelectionDisplay keeps the two sections' notion of "matches this filter" identical even though their data shapes differ. Keeping the pipeline lazy until one final materialization avoids an intermediate array per filter stage (
[Rubric §23, Front-End Performance]). - Where it's used: rendered inside SessionSelectionDashboard's markup (
.../SessionSelectionDashboard.razor:241-249), which bindsScoredThisRunto the page's_scoredThisRun(:243) and itsScoreRequestedcallback to the page'sScoreSessionsAsync(.../SessionSelectionDashboard.razor.cs:164); covered bySessionSelectionAiScoresTestsin the Conference UI bUnit tier (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/Selection/SessionSelectionAiScoresTests.cs, which setsScoredThisRunat:129).
[Rubric §16, AI-Native Application Architecture] applies: this type is part of the AI session-scoring feature (a model call behind a port, versioned prompt and model, an evaluation gate, metered spend; ADR-111).
SessionSelectionFilterOptions
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionFilterOptions.cs:12· Level 4 · record (sealed, internal)
- What it is: the four dropdown option lists the dashboard's filters bind to (statuses, localities, categories, levels), together with the pure projection that derives them from a loaded board. It holds no page state: it is the answer to "given this dashboard, what can the organizer filter by?".
- Depends on: SessionSelectionDashboardDTO as the projection input (imported at
SessionSelectionFilterOptions.cs:2), reading itsSpeakerOverlap.Speakers,AiScores,SpeakerLocality, andCategoryDistribution.Categoriescollections. Externally it is LINQ plusStringComparer.OrdinalIgnoreCase. - Concept introduced: the derived-option projection as a static factory on a record.
[Rubric §19, State Management]distinguishes stored state from derived state; option lists are derived, so they are computed by onestaticmethod from the board and never edited afterwards.[Rubric §14, Testability]follows: the whole "what shows up in the pickers" rule set is one pure function of a DTO. The fourIReadOnlyList<string>members (:12-15) are positional record parameters, so instances are immutable by construction. - Walkthrough: a private
static readonly Emptyinstance (:17) is the null-board answer, so callers never getnulllists and no allocation happens on the not-yet-loaded path.From(SessionSelectionDashboardDTO?)(:20-54) returnsEmptyfor a null board (:22-25), then derives each list. Statuses (:28-33) come from the union of every multi-session speaker's sessions and every AI-score row, withnullnormalized toSessionStatuses.Accepted(the shared constant, replacing a literal), then de-duplicated and ordered case-insensitively. Localities (:35-37) are theLocalityTiervalues from the board's locality breakdown, ordered the same way. The level group is picked out by aCategoryTitle.Contains("Level")match (:39-40), and its items become the level list (:42-44); if no such group exists the list is empty. Categories (:46-51) then take every other category group's items, so the Level values do not appear twice in two different pickers, de-duplicated and ordered. All four use collection expressions over LINQ, materializing once at the end. - Why it's built this way: the option lists must reflect only what the loaded event actually contains, otherwise the organizer can select a filter that matches nothing. Deriving statuses from both the speaker-overlap sessions and the score rows covers both child sections, and splitting the Level group out of the category options mirrors the two separate pickers in the markup (
.../SessionSelectionDashboard.razor:90-107). - Where it's used: called only by SessionSelectionFilters
.ComputeOptions(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionFilters.cs:74), which copies the four lists onto the page's filter state. - Caveats / not-in-source: the level group is identified by a title substring match, so it depends on the conference's category naming ("Level"). The category titles themselves come from the Conference data, not from this file.
ScorePollSession
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/ScorePollSession.cs:35· Level 5 · class (sealed, internal)
- What it is: one fire-and-forget AI-score polling run for the selection dashboard. It drives ScorePollTracker (the pure counters) over repeated dashboard fetches and turns each resulting ScorePollSignal into the page's UI side effects through a ScorePollHost.
- Depends on: ISessionSelectionUIService for the fetch,
IStringLocalizerfor the outcome messages, and a ScorePollHost for the callbacks, all primary-constructor parameters (ScorePollSession.cs:35-38). Internally it uses ScorePollTracker, ScorePollSignal, SessionSelectionDashboardDTO's SessionAiScoreDTO rows, and ToastSeverity; externallyTask.Delay,CancellationToken, and the ConferenceEventIdentifierType/SessionIdentifierTypealiases. - Concept introduced: the generation guard against a superseded async loop.
[Rubric §19, State Management]asks whether asynchronous work can corrupt state it no longer owns. A polling run belongs to the event that was selected when scoring started; if the organizer switches events, the page bumps a generation counter and this loop, which re-reads that counter throughhost.CurrentGeneration(), exits instead of painting the previous event's board (and its toasts) over the new selection. Note the counter is checked twice per tick, once after the delay and once after the fetch (:70-73and:76-79), because both are await points where the selection can move.[Rubric §29, Resilience and Business Continuity]covers the second concept here: because ISessionSelectionUIService answers every non-2xx response and transport fault with a failedResultrather than an exception (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/Selection/ISessionSelectionUIService.cs:11-23), the consecutive-failure budget has to be fed from the result path, and the code comment says exactly why (:81-85): left on the exception path it would be dead code and a persistently failing endpoint would poll silently toMaxPollswithout ever reporting. - Walkthrough:
RunAsync(eventId, baseline, generation, cancellationToken)(:51-121) takes abaseline(each already-scored session'sScoredOnbefore the run started, documented at:48) so progress is measured as scores this run wrote, not the raw dashboard count. It creates a tracker (:57) and two locals,lastFreshandlastScoredThisRun(:62-63), remembering the last board a poll fetched: the accepted run cleared the replaced scores from view, so every exit path must put the server's board back (the code cites OBS-14), otherwise the board would read "No AI scores yet." until a reload. It then loops up toScorePollTracker.MaxPollstimes (:65). Each iteration awaitshost.PollInterval()under the page's disposal token (:69), checks the generation (:70-73), fetches the board throughselectionService.GetDashboardAsync(:75), and checks the generation again (:76-79). A failedResultfeedstracker.RegisterFailure(), and when the budget is exhausted the run callsRestoreLastBoard, reportsSnackbar.ScoringPollFailedas an error and returns (:86-91); a failure inside budget falls through tocontinuebecauseTryGetValueyields nothing (:93-96). A successful fetch resets the failure counter (:98), computesscoredThisRunviaScorePollTracker.CountScoredSince(fresh.AiScores, baseline)(:99), records it with the board in the two locals (:100-101), and passes it (not the raw count) to bothtracker.RegisterFetchandHandleSignalAsync; atruereturn means the run is over and the finish callback has already fired (:102-105).OperationCanceledExceptionexits quietly, which is component disposal (:107-111). Falling out of the loop means the cap was reached, so, unless the run has meanwhile been superseded (:114-117), it restores the last board and reportsSnackbar.ScoringTimedOutas a warning (:119-120).RestoreLastBoard(:126-132) callshost.ApplyFreshDashboard(lastFresh, scoredThisRun)only when some poll succeeded.HandleSignalAsync(fresh, scoredThisRun, signal)(:142-172) is the effects half of the split introduced under ScorePollSignal:GaveUpNoScoresnow applies the fresh board first (the run wrote nothing new but the server still holds the earlier scores) and then finishes with an error (:146-150);Progressedcallshost.ApplyFreshDashboard(fresh, scoredThisRun)and re-renders but keeps going (:152-155);CompletedAllapplies the board with the same count, re-renders, and finishes with a success message carryingscoredThisRun(:157-161);CompletedStableapplies the board with the count and defers toFinishStable(fresh, scoredThisRun)(:163-166); andContinuedoes nothing (:168-170). Every apply passesscoredThisRunthrough the ScorePollHost callback, which is how the page's progress display learns the run's own count rather than inferring it from a score list that still holds the previous run's rows.FinishStable(fresh, currentCount)(:177-190) compares the caller-computed count againstTotalSessionsand reports eitherSnackbar.ScoringPartialwith the missed count as a warning orSnackbar.ScoringCompleteas a success. - Why it's built this way: the class doc states the placement rule (
:26-32): the session was extracted from the page code-behind under the rubric §18 line cap, and it stays beside the page rather than moving into ISessionSelectionUIService because every step it takes is a rendering decision, not a data-access one. Every user-visible string is a resource key resolved through the injected localizer, so the outcome messages follow a language switch like the rest of the page (ADR-027,Website/docs-src/adr/027-multi-locale-i18n.md). - Where it's used: constructed and run by SessionSelectionDashboard
.PollForScoresAsync, which passes the caller's baseline snapshot toRunAsync(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:291). Its supersede behavior is asserted end to end byWhenEventChangesMidScoring_ThePollingSessionStopsWithoutTouchingTheNewBoard(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/Selection/SessionSelectionStaleResponseTests.cs:217). - Caveats / not-in-source: the resource keys used here (
Snackbar.ScoringPollFailed,Snackbar.ScoringNoScores,Snackbar.ScoringComplete,Snackbar.ScoringPartial,Snackbar.ScoringTimedOut) resolve against the page's localizer, which the caller supplies; their text lives inSessionSelectionDashboard.resxandSessionSelectionDashboard.es.resx, not in this file.
SessionSelectionFilters
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionFilters.cs:13· Level 5 · class (sealed, internal)
- What it is: the dashboard's filter state object. It holds the five selected values the markup two-way binds to (an empty string means "all") plus the four option lists derived from the loaded board, and it exposes the localized score-tier choices.
- Depends on: SessionSelectionFilterOptions for the derivation, SessionSelectionDashboardDTO as the input to
ComputeOptions, andIStringLocalizer(external,SessionSelectionFilters.cs:1) for the tier labels. - Concept introduced: the bindable state object as a component field.
[Rubric §19, State Management]is the whole point: five separate_filterXfields on the page would be five things to reset, five things to pass down, and five things to keep in step with their option lists. Collapsing them into one object lets the markup bind@bind-Value="_filters.Status"directly (.../SessionSelectionDashboard.razor:70) and lets the page reset or recompute everything with one call.[Rubric §18, UI Architecture]is the stated motive in the class doc (:6-12): extracted from the code-behind under the line cap so the component keeps only its load and scoring orchestration.[Rubric §27, i18n]shows inScoreTierOptions, which is a method taking a localizer rather than a stored list, "so the labels follow a language switch" (:42-45, ADR-027). - Walkthrough: the five selections are plain
get; set;string properties defaulting to empty (:16-28):Status,Locality,Category,Level,ScoreTier. The four option lists (:31-40) areIReadOnlyList<string>withprivate set, so only this class can replace them; they start empty.ScoreTierOptions(IStringLocalizer)(:47-58) isstaticand returns nine label/value tuples pairing a localized label with the token SessionSelectionDisplay.ScoreMatchesFilterunderstands: the empty string for "all", then"9.0"down to"3.0", then"<3.0"for Poor; the markup enumerates it directly (.../SessionSelectionDashboard.razor:112).Reset()(:61-68) clears all five selections back to "all".ComputeOptions(SessionSelectionDashboardDTO?)(:72-79) delegates the projection to SessionSelectionFilterOptions.Fromand copies its four lists across, so a null board yields four empty lists rather than a null reference. - Why it's built this way: separating selection (mutable, bound to the UI) from projection (pure, derived from data) means a reload can recompute the options without disturbing the selections, and a fresh load can reset both with two calls. The page uses exactly that asymmetry: SessionSelectionDashboard
.LoadDashboardAsynccallsReset()thenComputeOptions(...)for a new board (.../SessionSelectionDashboard.razor.cs:133-134), whileApplyFreshDashboardcalls onlyComputeOptions(...)mid-poll (:240), so the organizer's active filters survive a polling update. - Where it's used: one instance is a
readonlyfield on SessionSelectionDashboard (.../SessionSelectionDashboard.razor.cs:43), bound by the fiveMudSelectpickers in the page markup (.../SessionSelectionDashboard.razor:70-115) and passed down as parameters to SessionSelectionSpeakerOverlap (:221-225) and SessionSelectionAiScores (:231-235).
SessionSelectionSpeakerOverlap
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionSpeakerOverlap.razor.cs:11· Level 7 · class (partial component)
- What it is: the presentational "speakers with multiple sessions" section of the selection dashboard. It lists each multi-session speaker with their locality and per-session status and score chips, narrowed to whatever filters the parent dashboard currently has active.
- Depends on: MultiSessionSpeaker and SpeakerSessionSummary (the DTOs it renders, imported at
SessionSelectionSpeakerOverlap.razor.cs:2), SessionSelectionDisplay for the shared predicates, theSessionIdentifierTypealias, and the Blazor[Parameter]infrastructure (external,:1). - Concept introduced: the presentational (dumb) child component.
[Rubric §19, State Management]distinguishes components that own state from components that only render state passed in; this is the second kind. It has no service injections and no mutable fields, only[Parameter]inputs (:13-19): theSpeakerslist, anAiScoreLookupdictionary from session id to score, and the five filter strings, each defaulting to empty. All state flows down from SessionSelectionDashboard, which makes this component a pure function of its parameters.[Rubric §18, UI Architecture]is served by keeping the filtering in the code-behind and the template thin. - Walkthrough:
HasActiveFilters(:21-24) is a cheap short-circuit: when every filter string is empty the component returnsSpeakersexactly as it received it.FilteredSpeakerOverlap(:31-34) is the computed view the markup binds to; it applies filters when any are set and otherwise passes the list through, and it never re-sorts: its doc comment (:26-30) says the rows keep the order the server returned (multi-session speakers first, then by name, produced by GetSessionSelectionDashboardHandler), because the table caption promises "most submissions first".ApplySpeakerFilters(:36-57) works in two passes, neither of which changes that order: the locality filter drops whole speakers by comparingLocalityCategory ?? "Unknown"against the selection (:40-44); then, if any session-level filter is set, a recordwithexpression rebuilds each speaker'sSessionscollection keeping only matching sessions, and speakers left with zero sessions are dropped (:46-54).SessionMatchesFilters(:59-63) ands together the status test (delegated to SessionSelectionDisplay.SessionMatchesStatus), a category and a level test that both search the session'sCategoryItemNames, and the score-tier test.SessionMatchesScoreTier(:65-67) looks the session up inAiScoreLookupand hands the score toSessionSelectionDisplay.ScoreMatchesFilter; it returns false when the session has no score yet, so an active score-tier filter hides unscored sessions. - Why it's built this way: rebuilding the speaker record with a filtered
Sessionslist (rather than hiding rows in markup) means the "drop empty speakers" rule operates on already-filtered data, so the rendered list and any counts derived from it stay consistent. Leaving the ordering to the server keeps one owner for the "most submissions first" rule instead of a client sort that could contradict the caption. Thewithcopy leaves the source DTOs untouched, which matters because the parent keeps rendering from the same board. - Where it's used: rendered inside SessionSelectionDashboard's markup (
.../SessionSelectionDashboard.razor:235-241), fed the board's speakers, the page's_aiScoreLookup, and the five values off SessionSelectionFilters; covered bySessionSelectionSpeakerOverlapTestsin the Conference UI bUnit tier.
SessionSelectionDashboard
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:16· Level 9 · class (partial component)
- What it is: the organizer decision-support page for choosing a conference program. It picks an event (defaulting to the current or next one), loads its decision-support DTO (category distribution, speaker overlap, locality breakdown, and AI session scores, per the class summary at
SessionSelectionDashboard.razor.cs:12-15), owns the filter state the two child sections read, and starts the asynchronous "score all sessions with AI" flow. - Depends on: ISessionSelectionUIService (loads the board and starts scoring), IEventLookupService (the event picker source), IToastService, and the BCL
TimeProvider(the clock behind the default-event pick), all injected as properties (SessionSelectionDashboard.razor.cs:18-21); SessionSelectionDashboardDTO, EventInfo, CurrentEventSelector, ConferenceRoutePaths, ToastSeverity, and the co-located SessionSelectionFilters, ScorePollSession, and ScorePollHost. It composes SessionSelectionSpeakerOverlap and SessionSelectionAiScores in its markup, and the page is routed and permission-gated in the.razorhalf (@page "/sessions/selection-dashboard"with[HasPagePermission(ConferencePermissions.SessionSelectionManage)],.../SessionSelectionDashboard.razor:1-2, the attribute from HasPagePermissionAttribute and the"conference:session-selection:manage"constant from ConferencePermissions,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Authorization/ConferencePermissions.cs:30). A failed load renders the CommonDetailLoadStateContentin its DetailLoadState.Failedstate withOnRetry="RetryLoadAsync"(.../SessionSelectionDashboard.razor:28-33). - Concept introduced: the smart (container) component that owns state and lifecycle, and the load-generation counter. This is the counterpart to the two presentational sections above.
[Rubric §19, State Management]is fully exercised: the component holds the loaded DTO, the selected event id, the filter object, the_aiScoreLookup, the scoring flag and the current run's score count, the loading and error flags, and an_eventsLoadedflag that decides what Retry re-runs (:23-57), and passes what the children need down as parameters. The generation counter_loadGeneration(:49) is the concept worth learning here: anyawaitin a Blazor page is a window in which the user can change the selection, so every asynchronous result must prove it is still wanted before it writes anything. The field's doc comment (:43-48) explains why the generation and not the event id is authoritative: switching away from an event and back must still discard the first response even though both carry the same id.[Rubric §18, UI Architecture]is served by splitting a large page into a container, two presentational children, an extracted filter object, and an extracted polling session.[Rubric §14, Testability]shows ininternal TimeSpan PollInterval(:264, eight seconds by default), documented as internal precisely so bUnit tests can shrink the cadence and exercise the loop quickly (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/Selection/SessionSelectionDashboardTests.cs:362).[Rubric §27, i18n]applies throughout: every user-visible string resolves through the injectedIStringLocalizer<SessionSelectionDashboard>(.../SessionSelectionDashboard.razor:6) against the co-locatedSessionSelectionDashboard.resxand its.es.resxtranslation (ADR-027).[Rubric §11, Security]applies with the usual caveat that the page-permission attribute is a UX gate; the services behind it enforce authorization independently. - Walkthrough: the component implements
IDisposableand owns aCancellationTokenSource(:23) that every service call threads through, but never reads.Tokenoff it directly: the privateLifetimeTokenproperty (:28) returns_cts.LifetimeToken(), because readingTokenfrom a disposed source throwsObjectDisposedException, whereasDisposecancels before it disposes, so a load or handler resuming after navigation gets a cancelled token and exits through itsOperationCanceledExceptionpath (comment at:25-27; the Common architecture ruleComponentsReadTheirTokenThroughLifetimeTokenenforces the habit,MMCA.Common/Source/Hosting/MMCA.Common.Testing.Architecture/Rules/Ui/ArchitectureRules.LifetimeTokens.cs:28).Disposecancels and disposes it exactly once via the guarded_disposedpattern (:316-338).OnInitializedAsync(:59-69) is a non-asyncmethod returning aTask: it builds the three breadcrumbs (:61-66) and returnsLoadEventsAsync()(:68).LoadEventsAsync(:78-116) turns the spinner on and clears any prior error (:80-81), loads the events (:85; a failed lookup sets theError.LoadEventsFailedmessage and returns), records_eventsLoaded = true(:92), and defaults the picker through CurrentEventSelector.SelectCurrentOrNext(:96-101: live now, else next upcoming, else most recently ended), passingTimeProvider.GetUtcNow().UtcDateTimeas "now" (:101) from the injected clock rather than readingDateTime.UtcNowdirectly; then it loads the board.OperationCanceledExceptionis swallowed as disposal andIsLoadingis cleared in thefinally(:108-115). Splitting the load out of the lifecycle method is what makes Retry possible:RetryLoadAsync(:75) re-runsLoadEventsAsyncwhen the event lookup is what failed, and onlyLoadDashboardAsynconce_eventsLoadedis set (the flag and its comment at:36-38), so a dashboard failure does not refetch the event list.OnEventSelectedAsync(:118-134) bumps_loadGenerationbefore the selection moves (:123), so both the load path and the clear path supersede anything in flight.LoadDashboardAsync(:136-183) is the generation pattern in full: it snapshots the generation and the requested id (:143-144), turns the spinner on, fetches withLifetimeToken(:152), and then returns early if superseded (:156-157, with the comment noting that a superseded failure must not paint an error banner over a board that loaded fine); on success it stores the board, calls_filters.Reset()and_filters.ComputeOptions(...), and rebuilds the score lookup (:159-165); and even thefinallyis generation-guarded so a stale response cannot switch off the spinner a newer load just turned on (:176-182).LocalityTierLabel(:185-188) renders a locality tier for the locality tiles: tier names are data shown as stored, except the handler's"Unknown"sentinel, whichSessionSelectionDisplay.IsUnknownTierdetects so the page shows the localizedChip.Unknownlabel the speaker table already uses.RebuildAiScoreLookup(:190-193) projects the score rows into aSessionIdtoOverallScoredictionary for the speaker section.ScoreSessionsAsync(:195-261) sets_isScoring, captures the currentgenerationandeventIdbefore any await (:205-206, because the picker stays enabled while the start request is in flight, so the answer is judged against the event selected when scoring began), snapshots abaselinedictionary of each visible score'sSessionIdto itsScoredOn, and resets_scoredThisRunto zero (:212-213); the comment there gives both reasons: the scoring runner rewrites each session's score in place, so progress is only measurable as scores whose timestamp moved, and the scores stay on screen until the server accepts the run, so a failed start leaves the board exactly as it was. It then calls the service withLifetimeToken(:217); if the generation moved while the request was in flight, the run belongs to the old event, so it clears_isScoringand returns without wiping the board or polling (:218-224). A failedResulttoasts an error and clears the flag (:226-233); the comment there notes that the endpoint only queues the pass and deduplicates a duplicate trigger rather than refusing it, so a failure is a 404 (unknown event, or scoring switched off), another non-2xx answer, or a transport fault; aSessionsScored == -1result means the server accepted the work asynchronously, so it toasts "started", only now clears the replaced scores from view with awithexpression and rebuilds the lookup so the table and the overlap chips empty together, and launches the fire-and-forgetPollForScoresAsync(baseline, eventId, generation)(:234-244); and a synchronous result toasts the scored and failed counts and reloads. The closing comment documents why there is nofinallyhere: only the accepted asynchronous path leaves_isScoringset, handing ownership of the flag to the polling task (every other branch, the superseded one included, clears it,:257-260).PollForScoresAsync(baseline, eventId, generation)(:271-299) takes the event and generation captured at start, rather than re-reading_selectedEventIdand_loadGenerationwhen the task begins, and builds a ScorePollSession with the service, the localizer, and a ScorePollHost wired to_loadGeneration,PollInterval,ApplyFreshDashboard,InvokeAsync(StateHasChanged), andFinishScoring(:279-287; the host's generation callback still reads the live_loadGeneration), runssession.RunAsync(eventId, baseline, generation, LifetimeToken)(:291), and clears_isScoringin afinallyso the Score button always comes back whatever path exits the loop.ApplyFreshDashboard(fresh, scoredThisRun)(:301-307) swaps the board in, stores the run's count in_scoredThisRunfor the SessionSelectionAiScores progress display (bound at.../SessionSelectionDashboard.razor:246), and recomputes the options and the lookup, deliberately without resetting the filters.FinishScoring(:309-314) clears the flag, shows the toast, and requests a re-render. - Why it's built this way: AI scoring is a long, failure-prone batch that depends on an external model with variable latency, so the page cannot block on it and there is no server push channel for this surface. Delegating the loop to ScorePollSession and the counting policy to ScorePollTracker leaves this class holding only lifecycle, state, and UI effects, which is what keeps a page with this much behavior inside the rubric §18 size expectation. Cancelling the token on disposal stops the loop from outliving the page, and the generation counter stops it from outliving its event.
- Where it's used: the organizer route
/sessions/selection-dashboard, reachable from the admin navigation registered by ConferenceUIModule; covered bySessionSelectionDashboardTestsandSessionSelectionStaleResponseTestsin the Conference UI bUnit tier (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/Selection/). - Caveats / not-in-source: the
-1sentinel onSessionsScoredis what distinguishes a deferred scoring start from a synchronous one; its meaning is documented on ISessionSelectionUIService (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/Selection/ISessionSelectionUIService.cs:15-20: the endpoint answers HTTP 202, which comes back as a success carrying the sentinel) and produced server-side, not by this component. The model used for scoring, its per-session timeout, and its failure modes are not determinable from this file.
CategoryItemInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/ICategoryItemLookupService.cs:9· Level 0 · record
- What it is: a four-field projection record carrying everything a Conference page needs to render
one category item:
Id,Name,CategoryId, and the parent category'sCategoryTitle(ICategoryItemLookupService.cs:9-13). It is the value type of the category-item lookup dictionary, not a wire contract and not a domain type. - Depends on: no first-party types. Its two id parameters use the Conference identifier aliases
CategoryItemIdentifierTypeandConferenceCategoryIdentifierType, bothintin this module (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:9-10). BCLstring. - Concept introduced, the UI lookup projection.
[Rubric §18, UI Architecture](assesses whether the front end keeps its own display-shaped models instead of dragging server contracts through the render tree; this record is a UI-owned shape with three display fields and one key).[Rubric §23, Front-End Performance](assesses avoiding per-row round-trips: a list page holds category item ids but must render category item names, so the page pre-loads a dictionary of these records once and indexes it during render instead of issuing one request per row).[Rubric §19, State Management](the dictionary is page-local state loaded once, not an ambient store). The same shape repeats for events and speakers, see EventInfo and SpeakerInfo. - Walkthrough: a positional record with four members and no body.
Id(ICategoryItemLookupService.cs:10): the dictionary key.Name(line 11): the item's display name, for example a track or level value.CategoryId(line 12): the owning category, which lets a page group items by category without a second fetch.CategoryTitle(line 13): the parent category's title, denormalized onto the item. It is filled in by CategoryItemLookupService from a separate categories request and falls back tostring.Emptywhen the parent title is not found (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/CategoryItemLookupService.cs:103-104).
- Why it's built this way: the denormalized
CategoryTitleexists so a page can render the combined label without holding a second dictionary. SessionLookups does exactly that:string.IsNullOrEmpty(item.CategoryTitle) ? item.Name : $"{item.CategoryTitle}: {item.Name}"(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionLookups.cs:180), and PublicSessionDetail uses the same expression (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionDetail.razor.cs:257). The empty-title fallback keeps the label sensible rather than rendering a stray colon. - Where it's used: produced by CategoryItemLookupService behind
ICategoryItemLookupService; consumed by
SessionLookups (
SessionLookups.cs:34), which serves SessionDetail, by PublicSessionDetail (PublicSessionDetail.razor.cs:30), and, gathered with two sibling dictionaries, by SpeakerDetailLookups.
ChildEntityDeletePath
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/ChildEntityServices.cs:62· Level 0 · class
What it is: an
internal statichelper with a single generic method that builds the"{childId}?{parent}={parentId}"suffix the join endpoints' DELETE takes (ChildEntityServices.cs:62-73). It is the smallest type in this group and the one that decides whether a removal works at all.Depends on: no first-party types. BCL
Convert,CultureInfo.InvariantCulture(ChildEntityServices.cs:1),Uri.EscapeDataString,string.Concat.Concept introduced, the parent-scoped child delete.
[Rubric §9, API & Contract Design](assesses whether the client speaks the URL shape the server actually implements). The join controllers remove a row by loading the OWNING aggregate and asking it to drop the child, so the parent id is not decoration: the remarks on the file's first service record that the endpoint binds it as a required query value, so a DELETE sent without it is refused with 400 before any handler runs, while the UI reports a generic failure (ChildEntityServices.cs:13-20). The type's own summary states the consequence (ChildEntityServices.cs:57-61).[Rubric §15, Best Practices & Code Quality]: the whole difference between a removal that works and one the API refuses lives in this one place instead of being concatenated at three call sites.[Rubric §26, Front-End Security]in its smallest form: the parent id is percent-encoded before it reaches the query string.Walkthrough: one method,
For<TChildId, TParentId>(TChildId childId, string parentName, TParentId parentId)(ChildEntityServices.cs:64), constrainedwhere TChildId : notnullandwhere TParentId : notnull(lines 65-66). The body is a singlestring.Concat(lines 67-72) that formats the child id withConvert.ToString(..., CultureInfo.InvariantCulture)(invariant so anintid never picks up a culture-specific group separator), appends"?", the caller's parameter name and"=", then the parent id through the same invariant conversion wrapped inUri.EscapeDataString. Both conversions fall back tostring.Emptyon a null result. The generic parameters matter because Conference ids are not one type:SpeakerIdentifierTypeis aSystem.Guidwhile every other alias here isint(MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:8-26).Why it's built this way: the shared ChildEntityServiceBase appends whatever string it is given straight onto the endpoint,
var url = $"{endpoint}/{id}"(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/ChildEntityServiceBase.cs:82), so the query has to be baked into the "id" argument. Keeping that formatting in one internal helper rather than in the framework base keeps the base generic while making the Conference-specific convention explicit.Where it's used: all three join services in the same file, each supplying its own parent parameter name to
DeleteByIdAsync. They are the whole join-entity family: each derives from ChildEntityServiceBase, supplies only its resource root, and is registered explicitly inAddConferenceUI(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:33-35), because a join service is not anIEntityService<,>implementation and the assembly scan does not see it.Service Contract Endpoint Parent parameter Delete call SessionSpeakerService ISessionSpeakerUIService "sessionspeakers"(ChildEntityServices.cs:22)"sessionId"line 28 SessionCategoryItemService ISessionCategoryItemUIService "sessioncategoryitems"(line 35)"sessionId"line 41 SpeakerCategoryItemService ISpeakerCategoryItemUIService "speakercategoryitems"(line 48)"speakerId"line 54
ICategoryItemLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/ICategoryItemLookupService.cs:18· Level 3 · interface
- What it is: the contract for the category-item lookup: fetch everything once, hand back a
dictionary wrapped in a Result, and let a write drop the
memoized copy (
ICategoryItemLookupService.cs:18-29). - Depends on: CategoryItemInfo (the dictionary value), the
CategoryItemIdentifierTypealias, andResult<T>fromMMCA.Common.Shared.Abstractions(ICategoryItemLookupService.cs:1). BCLTask,IReadOnlyDictionary,CancellationToken. - Concept introduced, the bulk-then-index lookup contract.
[Rubric §23, Front-End Performance](assesses how many round-trips a render costs; one call plus O(1) dictionary reads replaces one request per referenced id) and[Rubric §1, SOLID](a two-member interface is a small dependency for a page to take, and it is what the UI tests substitute). ReturningIReadOnlyDictionary<,>rather than a list is the point of the contract: the caller is told, by the type, that this is a key-indexed cache to read from, not a collection to search. TheResult<T>envelope is the second half: a failed fetch is a value the page branches on, not an exception, which is the workspace-wide Result pattern taught in 00-primer.md.[Rubric §19, State Management]: the contract itself names the cache's invalidation point, so the services that change what the lookup holds can drop it without knowing how it is stored. - Walkthrough: two members.
GetAllAsync(CancellationToken cancellationToken = default)returningTask<Result<IReadOnlyDictionary<CategoryItemIdentifierType, CategoryItemInfo>>>(ICategoryItemLookupService.cs:20-21). The cancellation token is optional and defaulted, so page code can pass its own component-scoped token.Invalidate()(ICategoryItemLookupService.cs:28): the doc comment (lines 23-27) states that it drops the memoized lookup so the nextGetAllAsyncrefetches, and that the write services call it after a successful category or category-item create, update or delete, and after a Sessionize refresh.
- Why it's built this way: pages depend on this interface, never on the HTTP class, so the
requests the implementation actually makes (one categories read, then the items paged to their
total) and the per-scope memo in front of them stay an implementation detail
(
CategoryItemLookupService.cs:25-35). PuttingInvalidateon the interface rather than on the concrete class lets the write services take the same abstraction the pages do. - Where it's used: implemented by CategoryItemLookupService,
registered scoped at
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:66under the "cross-module lookup services" comment. Read side: injected into SessionLookups (SessionLookups.cs:34), SessionDetail (SessionDetail.razor.cs:35), PublicSessionDetail (PublicSessionDetail.razor.cs:30), and SpeakerDetailLookupService (SpeakerDetailLookupService.cs:14). Invalidation side: CategoryItemService (CategoryItemService.cs:45), ConferenceCategoryService (ConferenceCategoryService.cs:45), and EventService after a successful Sessionize import (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventService.cs:103).
ISessionCategoryItemUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/IChildEntityUIService.cs:25· Level 3 · interface
- What it is: the join contract for tagging a session with a category item and untagging it
(
IChildEntityUIService.cs:25-29). - Depends on: SessionCategoryItemDTO, the
SessionIdentifierType,CategoryItemIdentifierType, andSessionCategoryItemIdentifierTypealiases, andResult/Result<T>. - Concept: the add/remove-only join contract taught at
ISessionSpeakerUIService, including the parent-scoped delete.
[Rubric §9, API & Contract Design]. - Walkthrough:
AddAsync(sessionId, categoryItemId, ct)returningTask<Result<SessionCategoryItemDTO>>(line 27) andDeleteAsync(sessionId, id, ct)returningTask<Result>(line 28). - Where it's used: implemented by SessionCategoryItemService
(
ChildEntityServices.cs:34-35), registered atDependencyInjection.cs:34, injected into SessionDetail (SessionDetail.razor.cs:37), which pairs it with ICategoryItemLookupService, reached through SessionLookups, to offer the untagged items as choices.
ISessionSpeakerUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/IChildEntityUIService.cs:13· Level 3 · interface
- What it is: the join contract for adding a speaker to a session and removing one
(
IChildEntityUIService.cs:13-17). - Depends on: SessionSpeakerDTO, the
SessionIdentifierType,SpeakerIdentifierType, andSessionSpeakerIdentifierTypealiases, andResult/Result<T>. - Concept: the add/remove-only join contract shared by the three interfaces in
IChildEntityUIService.cs(this one, ISessionCategoryItemUIService and ISpeakerCategoryItemUIService): anAddAsyncthat returns the created DTO and aDeleteAsyncthat takes the owning aggregate's id as well as the join row's own, because the API removes a row by loading that aggregate and asking it to drop the child, and refuses a call without it with 400 (IChildEntityUIService.cs:9-11).[Rubric §18, UI Architecture]. This is the one member of the family whose two ids inAddAsyncare of different CLR types, anintsession and aGuidspeaker, which is why the family was written as three typed interfaces rather than one generic pair of ids. - Walkthrough:
AddAsync(sessionId, speakerId, ct)returningTask<Result<SessionSpeakerDTO>>(line 15) andDeleteAsync(sessionId, id, ct)returningTask<Result>(line 16). - Where it's used: implemented by SessionSpeakerService
(
ChildEntityServices.cs:21-22), registered atDependencyInjection.cs:33, injected into SessionDetail (SessionDetail.razor.cs:36).
ISpeakerCategoryItemUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/IChildEntityUIService.cs:37· Level 3 · interface
- What it is: the join contract for tagging a speaker with a category item, which is how speaker
attributes such as locality are modeled, and untagging one (
IChildEntityUIService.cs:37-41). - Depends on: SpeakerCategoryItemDTO, the
SpeakerIdentifierType,CategoryItemIdentifierType, andSpeakerCategoryItemIdentifierTypealiases, andResult/Result<T>. - Concept: see ISessionSpeakerUIService.
[Rubric §9, API & Contract Design]. Its delete is the one that carries aGuidparent id into the query string, which is why ChildEntityDeletePath is generic and escapes the parent value (ChildEntityServices.cs:54). - Walkthrough:
AddAsync(speakerId, categoryItemId, ct)returningTask<Result<SpeakerCategoryItemDTO>>(line 39) andDeleteAsync(speakerId, id, ct)returningTask<Result>(line 40). - Where it's used: implemented by SpeakerCategoryItemService
(
ChildEntityServices.cs:47-48), registered atDependencyInjection.cs:35, injected into SpeakerCategoryItemsPanel (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerCategoryItemsPanel.razor.cs:20), the component SpeakerDetail hosts.
ICategoryItemUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/ICategoryItemUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
categoryitemsREST resource, an empty marker over IEntityService<TEntityDTO, TIdentifierType> bound to CategoryItemDTO andCategoryItemIdentifierType(ICategoryItemUIService.cs:9-11). - Depends on: IEntityService<TEntityDTO, TIdentifierType>
(imported at
ICategoryItemUIService.cs:2) and CategoryItemDTO (imported atICategoryItemUIService.cs:1). - Concept: identical shape to IActivityUIService; see it for the
marker-interface and assembly-scan rationale.
[Rubric §18, UI Architecture]. - Walkthrough: no members. The doc comment (
ICategoryItemUIService.cs:6-8) repeats the "uses generic CRUD" formula. - Where it's used: implemented by CategoryItemService; injected into
ConferenceCategoryItemsPanel, the editor for the items belonging to a
category (
Pages/ConferenceCategory/ConferenceCategoryItemsPanel.razor.cs:24). It is the one CRUD marker in this family with a single consumer: category items are only ever managed from inside their parent category, never as a top-level list. Read-side enrichment of category items goes through the separate ICategoryItemLookupService instead.
IConferenceCategoryUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/IConferenceCategoryUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
conferencecategoriesREST resource, an empty marker over IEntityService<TEntityDTO, TIdentifierType> bound to ConferenceCategoryDTO andConferenceCategoryIdentifierType(IConferenceCategoryUIService.cs:9-11). - Depends on: IEntityService<TEntityDTO, TIdentifierType> and ConferenceCategoryDTO.
- Concept: identical shape to IActivityUIService.
[Rubric §18, UI Architecture]and[Rubric §15, Best Practices & Code Quality](a new aggregate resource costs one empty interface plus one thin class). - Walkthrough: no members (doc comment
IConferenceCategoryUIService.cs:6-8). - Where it's used: implemented by ConferenceCategoryService; injected
into the conference-category list, detail and create pages
(
Pages/ConferenceCategory/ConferenceCategoryList.razor.cs:16,Pages/ConferenceCategory/ConferenceCategoryDetail.razor.cs:23,Pages/ConferenceCategory/ConferenceCategoryCreate.razor.cs:13) and into ConferenceCategoryItemsPanel (:23). It is also one of the three services SpeakerDetailLookupService composes, supplying the category titles for SpeakerDetailLookups (Services/Speakers/SpeakerDetailLookupService.cs:15,25).
CategoryItemLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/CategoryItemLookupService.cs:21· Level 6 · class (sealed)
- What it is: the implementation behind ICategoryItemLookupService.
It reads the categories in one API call and the items in as many paged calls as the item total
needs, joins them in memory into a dictionary of CategoryItemInfo, and keeps
that dictionary per scope for five minutes (
CategoryItemLookupService.cs:21-109). - Depends on: CategoryItemInfo (what it emits),
CategoryItemDTO and
ConferenceCategoryDTO (the wire shapes it
reads), CollectionResult<T> and
PagedCollectionResult<T> (the two
envelopes those endpoints return),
HttpResultExecutor and
ProblemDetailsResultReader (the two halves of the
railway conversion), PagedReadAll (the page-until-total
loop and the lookup URL format),
IdempotentReadRetry (the transient-failure
retry on each GET), ScopedMemo<T> (the per-scope
cache), and BCL
IHttpClientFactoryandTimeProvider(CategoryItemLookupService.cs:21). Note what it does not take: no token storage, so this is an unauthenticated read, unlike the entity services that derive from AuthenticatedServiceBase. - Concept introduced, the client-side join.
[Rubric §23, Front-End Performance]assesses whether the front end minimizes round trips for a render, and[Rubric §8, Data Architecture]assesses where denormalization happens. The category-item endpoint returns aCategoryIdbut not the category's title, and the UI wants the pair. Rather than asking the server for a nested projection or fetching the parent per item, the client pulls both collections in full and does the join itself, producing the denormalized CategoryItemInfo. The cost is one round trip for the categories plus one per 500 items (PagedReadAll.PageSize,MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:21), independent of how many rows the page renders. The second concept here is the two-part railway conversion that every lookup in this family uses: ProblemDetailsResultReader converts a response into a Result with the server's original ErrorType intact, while HttpResultExecutor converts the absence of a response (refused connection, DNS failure, dropped socket, client timeout) into a failure, and deliberately lets caller cancellation propagate as an exception rather than reporting a disposed page as an error (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/HttpResultExecutor.cs:12-24). Both halves are what let this method be honestly typed as returning aResult. - Concept introduced, the per-scope lookup memo.
[Rubric §19, State Management](assesses where client state lives and how it goes stale) and[Rubric §23, Front-End Performance]. The class remarks (CategoryItemLookupService.cs:12-20) state the design: the whole lookup is memoized PER SCOPE forCacheTtlthrough the framework's ScopedMemo<T>, as EventLookupService and SpeakerLookupService are, because the session and speaker pages all read it and a user moving between them should pay one round trip per time-to-live instead of one per page. The memo caches the task, so concurrent callers share one in-flight fetch, and only a successfulResultis kept; a failure expires at once (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/ScopedMemo.cs:12-15). The fetch is started without a caller token and each caller awaits it under its own, so a page disposing mid-load abandons only its own await (ScopedMemo.cs:18-21). Staleness is handled by explicit invalidation from this scope's own writes and from a Sessionize refresh, not by the TTL alone. - Walkthrough
CacheTtlisTimeSpan.FromMinutes(5)(CategoryItemLookupService.cs:25)._memois aScopedMemo<IReadOnlyDictionary<CategoryItemIdentifierType, CategoryItemInfo>>built from() => FetchAsync(httpClientFactory), the TTL and the injectedTimeProvider(:27-28).Invalidate()forwards to_memo.Invalidate()(:31).GetAllAsync(ct)is notasync: it returns_memo.GetAsync(cancellationToken)directly (:33-35), so the caller's token governs only that caller's wait.FetchAsyncis private and static (:38-70); the comment above it records that the memo calls it with no caller token because the fetch is shared by every page in the scope (:37). The whole body is wrapped inHttpResultExecutor.ExecuteAsync(:40), and every inner call passesCancellationToken.None(:48,:64-65,:70).- Resolves the named
"APIClient"HttpClientfrom the factory in ausing(:43), so the per-call handler lifetime is the factory's concern. - GETs
conferencecategories?includeFKs=false&includeChildren=falsethrough the privateGetAsync<T>helper into a CollectionResult<ConferenceCategoryDTO> (:45-48). This one is the non-paged envelope: the category list is small and unpaged. - Short-circuits on failure, re-wrapping the errors under the dictionary's type parameter
(
:50-54), so a failed first call is never silently treated as "no categories". BuildCategoryTitlesfolds the categories into aDictionary<ConferenceCategoryIdentifierType, string>, null-guarding the collection (:56,:81-94).- Reads every item through
PagedReadAll.ReadAllAsync(:60-65), handing it a per-page fetch that GETsPagedReadAll.LookupPageUrl("categoryitems", pageNumber)into a PagedCollectionResult<CategoryItemDTO> (:61-64). That URL is the/pagedendpoint inIdascending order, 500 rows a page, with foreign keys and children excluded (PagedReadAll.cs:48-51). The source comment states why (:58-59): the GET-all endpoint ignorespageSizeand stops silently at the API's maximum page size, so only paging to the reported total is complete.ReadAllAsyncstops on an empty page or once the accumulated count reachesTotalItemCount, and returns the first failing page's errors unchanged (PagedReadAll.cs:66-105). Mapprojects the accumulatedList<CategoryItemDTO>throughBuildLookup(:67-68), which loops the items, resolves each parent title withTryGetValuefalling back tostring.Empty, and stores one CategoryItemInfo per id (:96-108).
- Resolves the named
- The private
GetAsync<T>(:72-79) is the shared read step for both calls: oneIdempotentReadRetry.GetAsync(:77), which re-sends the GET on a transient failure through the same retry policy AuthenticatedServiceBase applies (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/IdempotentReadRetry.cs:18-44), then oneProblemDetailsResultReader.ReadAsync<T>(:78).
- Why it's built this way:
includeFKs=false&includeChildren=falsekeeps both payloads flat and small, which is the whole point of a lookup fetch, no navigation graphs, only the display fields. The stableIdsort means consecutive pages neither skip nor repeat a row (PagedReadAll.cs:35-39). The retry exists because this service has no base class: withoutIdempotentReadRetryan anonymous lookup would get a single attempt, and a GET is safe to re-send. TheTryGetValuefallback (:103) means a missing or newly added category degrades to an unprefixed label instead of throwing mid-render. The fetch ignores every caller token because the result is shared: one page's cancellation must not fail the read the other pages in the scope are waiting on. The service is registered Scoped, the lifetime the memo requires (:19), becauseScopedMemo<T>holds no lock and relies on Blazor dispatching one scope's callbacks on a single logical thread (ScopedMemo.cs:24-27). - Where it's used: registered scoped in
AddConferenceUIagainst ICategoryItemLookupService (DependencyInjection.cs:66); injected into SessionDetail (Pages/Sessions/SessionDetail.razor.cs:35, passed on at:80) and PublicSessionDetail (Pages/Public/Sessions/PublicSessionDetail.razor.cs:30), taken as a constructor argument by SessionLookups (Pages/Sessions/SessionLookups.cs:34), and composed by SpeakerDetailLookupService as the first of its three side-by-side loads (Services/Speakers/SpeakerDetailLookupService.cs:14,24). Its memo is dropped by CategoryItemService and ConferenceCategoryService after a successful write (CategoryItemService.cs:45,ConferenceCategoryService.cs:45) and by EventService after a successful Sessionize import (Services/Events/EventService.cs:103). Its page-1 URL is also one of the lookup paths SelfHttpOutputCacheWarmupTask replays to warm the server's output cache, which is why the URL format is treated as a byte-for-byte contract (MMCA.ADC/Source/Services/MMCA.ADC.Conference.Service/SelfHttpOutputCacheWarmupTask.cs:40-45,PagedReadAll.cs:38-39). - Caveats / not-in-source: the item read is bounded by
PagedReadAll's runaway guard of 40 pages (PagedReadAll.cs:33), so beyond 20,000 category items the lookup fails with a named truncation error rather than returning a partial dictionary (PagedReadAll.cs:98-104). The categories call sends no page size at all (CategoryItemLookupService.cs:47) and is not paged, so it depends on that endpoint returning the full set. Invalidation reaches only the scope that made the write: another user's scope keeps its copy until its own five-minute TTL expires, so an organizer's category edit can take up to that long to appear for everyone else.
CategoryItemService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/CategoryItemService.cs:15· Level 6 · class (sealed)
- What it is: the concrete HTTP service for the
categoryitemsresource, built on the same base asActivityServiceand bound toCategoryItemDTOandCategoryItemIdentifierType, with one addition: every successful write drops the scope's category-item lookup (CategoryItemService.cs:15-50). It implementsICategoryItemUIService. - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>,ITokenStorageService,CategoryItemDTO,ICategoryItemLookupService(the memo it invalidates,CategoryItemService.cs:18),Result; BCLIHttpClientFactory. - Concept introduced, the write that invalidates its read cache.
[Rubric §19, State Management](assesses whether cached client state is kept coherent with the writes the same client makes). The remarks (CategoryItemService.cs:11-14) give the reason: a successful create, update or delete drops this scope's memoized lookup, so the session and speaker pages show the item just added, renamed or removed without waiting out the memo's time-to-live. The CRUD plumbing itself is the thin-leaf shape taught atActivityService.[Rubric §15, Best Practices & Code Quality]: the invalidation lives in one private helper rather than at every page that writes a category item. - Walkthrough
- The base call passes
"categoryitems"alongside the factory and token storage, and the same declaration implementsICategoryItemUIService(CategoryItemService.cs:19-20). AddAsync,UpdateAsyncandDeleteAsyncoverride the base members (:22-26,:28-32,:34-38). Each awaits the base call and hands its result toInvalidateOnSuccess, so the return value is unchanged.InvalidateOnSuccess<TResult>(:40-49), constrainedwhere TResult : Result, callscategoryItemLookup.Invalidate()only whenresult.IsSuccess(:43-46) and returns the result as is. A failed write leaves the memo alone, since nothing on the server changed.
- The base call passes
- Where it's used: picked up by the same assembly scan as its siblings
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:28-30) and resolved throughICategoryItemUIServiceinConferenceCategoryItemsPanel, the category detail page's items editor (Pages/Categories/ConferenceCategoryItemsPanel.razor.cs:25). - Caveats / not-in-source: the invalidation reaches only the current scope's
CategoryItemLookupService; other users' scopes keep their copy until its own time-to-live expires.
ConferenceCategoryService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Categories/ConferenceCategoryService.cs:15· Level 6 · class (sealed)
- What it is: the concrete HTTP service for the
conferencecategoriesresource, structurally identical toCategoryItemServicebut bound toConferenceCategoryDTOandConferenceCategoryIdentifierType(ConferenceCategoryService.cs:15-50). It implementsIConferenceCategoryUIService. - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>,ITokenStorageService,ConferenceCategoryDTO,ICategoryItemLookupService(ConferenceCategoryService.cs:18),Result. - Concept: the write-that-invalidates pattern taught at
CategoryItemService.[Rubric §19, State Management]. The reason a category write drops the category-item lookup is in the remarks (ConferenceCategoryService.cs:11-14): that lookup carries each item's category title, and a deleted category takes its items with it. - Walkthrough: the base call passes
"conferencecategories"alongside the factory and token storage (ConferenceCategoryService.cs:19-20).AddAsync,UpdateAsyncandDeleteAsyncoverride the base members (:22-26,:28-32,:34-38) and route each result throughInvalidateOnSuccess(:40-49), which callscategoryItemLookup.Invalidate()on success only (:45). - Where it's used: picked up by the same assembly scan as its siblings
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:28-30) and resolved throughIConferenceCategoryUIServiceinConferenceCategoryList(Pages/Categories/ConferenceCategoryList.razor.cs:16),ConferenceCategoryDetail(Pages/Categories/ConferenceCategoryDetail.razor.cs:23),ConferenceCategoryCreate(Pages/Categories/ConferenceCategoryCreate.razor.cs:11) andConferenceCategoryItemsPanel(Pages/Categories/ConferenceCategoryItemsPanel.razor.cs:24), and composed bySpeakerDetailLookupService(Services/Speakers/SpeakerDetailLookupService.cs:15).
SessionCategoryItemService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/ChildEntityServices.cs:34· Level 5 · class (sealed)
- What it is: the HTTP service for the SessionCategoryItem join entity: add (POST) or remove
(DELETE) a category-item tag on a session (
ChildEntityServices.cs:34-42). It implementsISessionCategoryItemUIService. - Depends on:
ChildEntityServiceBase;ChildEntityDeletePath;ITokenStorageService;SessionCategoryItemDTO;Result; theSessionIdentifierType/CategoryItemIdentifierType/SessionCategoryItemIdentifierTypealiases. - Concept: cross-reference the join-entity mechanics and the parent-id rule taught at
SessionSpeakerService.[Rubric §18, UI Architecture]. - Walkthrough (
ChildEntityServices.cs:34)- The base call supplies the
"sessioncategoryitems"endpoint (ChildEntityServices.cs:35). Both methods return the base helper'sTaskdirectly, notasync(:51-55). AddAsync(sessionId, categoryItemId, ct)(ChildEntityServices.cs:37-38):PostAsync<SessionCategoryItemDTO>(new { SessionId, CategoryItemId }), returning the createdSessionCategoryItemDTOin aResult<T>.DeleteAsync(sessionId, id, ct)(ChildEntityServices.cs:40-41):DeleteByIdAsyncoverChildEntityDeletePath.For(id, "sessionId", sessionId), so the owning session id rides along in the query string.
- The base call supplies the
- Why it's built this way: modeling each many-to-many link as its own tiny service over a shared child base keeps the add/remove surface uniform and each payload strongly typed, without the CRUD surface a join row does not need.
- Where it's used: registered explicitly at
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:34, and injected intoSessionDetail's "categories on this session" editor (Pages/Session/SessionDetail.razor.cs:28).
SessionSpeakerService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/ChildEntityServices.cs:21· Level 5 · class (sealed)
- What it is: the HTTP service for the SessionSpeaker join entity: add (POST) or remove (DELETE)
a speaker on a session (
ChildEntityServices.cs:21-29). It is the structural twin ofSessionCategoryItemServiceandSpeakerCategoryItemService, differing only in endpoint, payload keys, DTO and parent parameter name. It implementsISessionSpeakerUIService. - Depends on:
ChildEntityServiceBase;ChildEntityDeletePath;ITokenStorageService;SessionSpeakerDTO;Result; theSessionIdentifierType/SpeakerIdentifierType/SessionSpeakerIdentifierTypealiases. - Concept: the join-entity mechanics and the parent-id rule, stated in this class's remarks
(
ChildEntityServices.cs:13-20): a join row is added with a POST and removed with a DELETE that carries the owning aggregate's id as a required query value, built byChildEntityDeletePath(ChildEntityServices.cs:62), because the join controllers remove a row by loading the parent aggregate and asking it to drop the child; a DELETE sent without it is refused with 400.[Rubric §18, UI Architecture]. - Walkthrough (
ChildEntityServices.cs:21)- The base call supplies the
"sessionspeakers"endpoint (ChildEntityServices.cs:22). Both methods return the base helper'sTaskdirectly, notasync(:38-42). AddAsync(sessionId, speakerId, ct)(ChildEntityServices.cs:24-25):PostAsync<SessionSpeakerDTO>(new { SessionId, SpeakerId }).DeleteAsync(sessionId, id, ct)(ChildEntityServices.cs:27-28):DeleteByIdAsyncoverChildEntityDeletePath.For(id, "sessionId", sessionId).
- The base call supplies the
- Why it's built this way: same rationale as the other join services, a tiny per-link service over the shared child base keeps the add/remove surface uniform and strongly typed.
- Where it's used: registered explicitly at
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:33, and injected intoSessionDetail's "speakers on this session" editor (Pages/Session/SessionDetail.razor.cs:27). The rows it creates are also what the server joins on whenSpeakerDashboardServicefilters sessions by the virtualSpeakerIdkey.
SpeakerCategoryItemService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Common/ChildEntityServices.cs:47· Level 5 · class (sealed)
- What it is: the HTTP service for the SpeakerCategoryItem join entity: add (POST) or remove
(DELETE) a category-item tag on a speaker, which is the mechanism behind speaker categorization such
as locality (
ChildEntityServices.cs:47-55). It is the third structurally identical join service in the file and implementsISpeakerCategoryItemUIService. - Depends on:
ChildEntityServiceBase;ChildEntityDeletePath;ITokenStorageService;SpeakerCategoryItemDTO;Result; theSpeakerIdentifierType/CategoryItemIdentifierType/SpeakerCategoryItemIdentifierTypealiases. - Concept: cross-reference the join-entity mechanics and the parent-id rule taught at
SessionSpeakerService.[Rubric §18, UI Architecture]. - Walkthrough (
ChildEntityServices.cs:47)- The base call supplies the
"speakercategoryitems"endpoint (ChildEntityServices.cs:48). Both methods return the base helper'sTaskdirectly, notasync(:64-68). AddAsync(speakerId, categoryItemId, ct)(ChildEntityServices.cs:50-51):PostAsync<SpeakerCategoryItemDTO>(new { SpeakerId, CategoryItemId }).DeleteAsync(speakerId, id, ct)(ChildEntityServices.cs:53-54):DeleteByIdAsyncoverChildEntityDeletePath.For(id, "speakerId", speakerId).
- The base call supplies the
- Why it's built this way: same shared-child-base rationale as the other three join services. The four differ only in the resource name, the two id fields in the payload, and the parent parameter name in the delete path, which is exactly the amount of code the base cannot supply.
- Where it's used: registered explicitly at
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:35, and injected intoSpeakerCategoryItemsPanel, the speaker detail page's category editor (Pages/Speaker/SpeakerCategoryItemsPanel.razor.cs:18).
EventInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/IEventLookupService.cs:14· Level 0 · record
- What it is: the event-side lookup projection: identity, name, the date window, the event's time
zone, its published flag, and an optional sponsorship packet URL (
IEventLookupService.cs:14-21). Beyond name enrichment it is the input to the "which event is the current one" decision that several pages make on load. - Depends on: no first-party types.
EventIdentifierTypeisintin this module (MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:8); BCLDateOnly,string,bool. - Concept: the same UI lookup projection introduced by CategoryItemInfo. What
is new here is that the projection carries decision fields, not only display fields.
[Rubric §18, UI Architecture]and[Rubric §19, State Management]: pages feedStartDate,EndDate, andTimeZoneinto the shared CurrentEventSelector to pick the current or next event, so the "default event filter" rule lives in one shared selector while the record just supplies its inputs. - Walkthrough: a positional record with seven members.
Id,Name(IEventLookupService.cs:15-16): key plus display name.StartDate,EndDate(lines 17-18):DateOnlybounds of the event.TimeZone(line 19): the event's time zone id, passed to the selector so "current" is evaluated in the event's own zone rather than the browser's.IsPublished(line 20).SponsorshipPacketUrl(line 21):string?with a default ofnull. The remarks block (IEventLookupService.cs:9-13) records why: the many call sites that need only identity and dates stay unchanged, and only the public sponsor page reads it, to decide whether the sponsorship call to action renders at all.
- Why it's built this way: adding the optional parameter last with a default kept a wide set of
construction sites source-compatible while the sponsor feature landed.
[Rubric §15, Best Practices & Code Quality](assesses whether a shape can grow without a ripple edit). EventLookupService is the single place that fills every member (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventLookupService.cs:83). - Where it's used: PublicSponsorList resolves the current or next event and
then reads
SponsorshipPacketUrloff it (PublicSponsorList.razor.cs:88); every page that injects IEventLookupService indexes the dictionary of these records to render event names, includingEventFilteredListPageBase<TDto>(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:27), which supplies the shared event filter to its derived list pages.
SessionAssetLinkRequest
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/SessionAssetRequests.cs:14· Level 0 · record
- What it is: the request DTO for adding one link-type session asset from the UI: the session it
belongs to, the display title, the URL, and its sort order
(
SessionAssetRequests.cs:14-27). - Depends on: no first-party types.
SessionIdentifierTypeisintin this module (MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:15); BCLstring,int. - Concept: a plain positional-free
record classwithinit-only,requiredmembers for the two values that must be supplied (Title,Url) and defaulted members for the rest (SessionAssetRequests.cs:25-38).[Rubric §24, Forms/Validation/UX Safety]: therequiredmodifier makes a missing title or URL a compile error at every construction site rather than a runtime validation surprise, before the request even reaches SessionAssetLinkRequestValidator on the server. - Walkthrough: four members.
SessionId(line 17): the owning session, defaults to the type's default (0).Title(line 20):required string, the display title on the public session page.Url(line 23):required string, the absolute http or https URL the link points at.SortOrder(line 26):int, the display order within the session's asset list.
- Why it's built this way: the panel builds one of these per "add link" gesture and posts it
through ISessionAssetUIService
.AddLinkAsync, which is the client half of the same shape the API validates (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/SessionAssets/UseCases/AddLink/SessionAssetLinkRequestValidator.cs). - Where it's used: constructed by
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetsPanel.razor.csand passed to ISessionAssetUIService.AddLinkAsync, implemented by SessionAssetService.
SessionAssetUpdateRequest
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/SessionAssetRequests.cs:35· Level 0 · record
- What it is: the request DTO for editing one session asset's title, sort order and (for a link)
URL (
SessionAssetRequests.cs:35-45). - Depends on: no first-party types. BCL
string,int. - Concept: the sibling of SessionAssetLinkRequest, but
Urlhere is optional (string?) rather than required, because the same update shape covers a FILE asset too, and a file's URL cannot be edited from the client, only its title and order (SessionAssetRequests.cs:42-44). - Walkthrough: three members.
Title(line 38):required string, the new display title.SortOrder(line 41):int, the new display order.Url(line 44):string?, the new URL for a LINK asset, ornullto leave it unchanged. The doc comment states the "leave unchanged" meaning explicitly.
- Why it's built this way: one request shape serves both asset kinds instead of two near-duplicate
DTOs, at the cost of
Urlbeing meaningless for a FILE asset; the panel only ever populates it for a link edit. - Where it's used: constructed by
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/SessionAssetsPanel.razor.csand passed to ISessionAssetUIService.UpdateAsync, implemented by SessionAssetService.
SessionSchedulePageRequest
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Public/IPublicSessionScheduleService.cs:20· Level 0 · record
- What it is: a
sealed recorddescribing one page request from the public session list: the grid's filters, the 1-based page number, the page size, the optional sort column and direction, and the optional set of bookmarked session ids that scopes the "My Schedule" view (IPublicSessionScheduleService.cs:20-26). - Depends on: no first-party types.
SessionIdentifierTypeisint(MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:15). BCLDictionary<string, (string Operator, string Value)>andIReadOnlyCollection<T>. - Concept introduced, the parameter object for a grid fetch.
[Rubric §9, API & Contract Design](assesses whether a call's inputs are named and typed rather than a positional run of primitives: six arguments collapse into one record whose members carry the intent).[Rubric §18, UI Architecture]: the record is what lets the offline-first fetch live in a service instead of in the page, because a page'sServerDatadelegate can hand its whole request over in one object. The filter dictionary's tuple value,(string Operator, string Value), is the MMCA.Common filter convention the paged query endpoints understand. - Walkthrough: a positional record with six members and no body.
Filters(IPublicSessionScheduleService.cs:21): the grid filters the page already assembled.Page,PageSize(lines 22-23): the 1-based page and rows per page.SortColumn,SortDirection(lines 24-25): bothstring?, null when the grid is unsorted.MyScheduleSessionIds(line 26):IReadOnlyCollection<SessionIdentifierType>?. The param doc (lines 14-19) is the load-bearing part: when the "My Schedule" view is active for an authenticated user this holds the bookmarked ids so the query is scoped server-side with anId IN (...)filter and the server still pages; it isnullfor the normal browse path, and it is never empty, because an empty schedule has no query to run and the page answers it without reaching the service.
- Why it's built this way: PublicSessionScheduleService turns
MyScheduleSessionIdsinto an extra"Id"filter with theINoperator before delegating to the paged session query (PublicSessionScheduleService.cs:159-164), which is why the "never empty" invariant is documented on the record rather than defended in the service: an emptyINlist would be a query that cannot match.[Rubric §12, Performance & Scalability]: the alternative the doc comment rules out, pulling a 500-row page and filtering in memory, also reported a wrong total past 500 rows (PublicSessionScheduleService.cs:148-151). - Where it's used: constructed by PublicSessionList inside its unified fetch
delegate (
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sessions/PublicSessionList.razor.cs:396-400) and consumed by IPublicSessionScheduleService.FetchPageAsync.
IEventLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/IEventLookupService.cs:26· Level 3 · interface
- What it is: the event counterpart of ICategoryItemLookupService:
one call returning an event-keyed dictionary of EventInfo, plus an
Invalidate()hook that drops the memo (IEventLookupService.cs:26-36). - Depends on: EventInfo, the
EventIdentifierTypealias, andResult<T>. - Concept: identical bulk-then-index shape, see
ICategoryItemLookupService.
[Rubric §23, Front-End Performance]. This is the most widely injected of the three lookups because so many Conference surfaces are event-scoped, and it is the only one whose implementation memoizes: the remarks on EventLookupService explain that the cached unit is theTask, not the result, so concurrent callers in one scope share a single in-flight fetch (EventLookupService.cs:12-29), with a five-minute TTL matched to the server's "EventsCache" output-cache policy (EventLookupService.cs:33-40) and an explicitInvalidate()for this scope's own writes (EventLookupService.cs:46). - Walkthrough: two members.
GetAllAsync(CancellationToken cancellationToken = default)returningTask<Result<IReadOnlyDictionary<EventIdentifierType, EventInfo>>>(IEventLookupService.cs:28-29).void Invalidate()(IEventLookupService.cs:36): drops the memoized lookup so the nextGetAllAsyncrefetches. The doc comment (:31-35) names the callers: the write services after a successful create, update, delete, publish, unpublish or Sessionize refresh. The reason is that privileged writers bypass the server output cache, so the client memo would otherwise be the only staleness they could see.
- Where it's used: implemented by EventLookupService, registered scoped at
DependencyInjection.cs:65, and injected into a wide set of Conference pages, includingEventFilteredListPageBase<TDto>(EventFilteredListPageBase.cs:27), RoomDetail (RoomDetail.razor.cs:21), RoomCreate (RoomCreate.razor.cs:13), SessionCreate (SessionCreate.razor.cs:21), SessionDetail (SessionDetail.razor.cs:33), ActivityDetail (ActivityDetail.razor.cs:26), ActivityCreate (ActivityCreate.razor.cs:19), SpeakerDashboard (SpeakerDashboard.razor.cs:31), SessionSelectionDashboard (SessionSelectionDashboard.razor.cs:19), OrganizerEventFeedback (OrganizerEventFeedback.razor.cs:22), PublicActivityList (PublicActivityList.razor.cs:30), PublicEventList (PublicEventList.razor.cs:36), PublicSponsorList (PublicSponsorList.razor.cs:29), and the sponsor admin pages (SponsorDetail.razor.cs:25,SponsorCreate.razor.cs:18). It is also consumed from the Engagement module's event feedback page, EventFeedback (MMCA.ADC/Source/Modules/Engagement/MMCA.ADC.Engagement.UI/Pages/Feedback/EventFeedback.razor.cs:21), which is whyDependencyInjection.cs:63labels these "cross-module lookup services".
IPublicSessionScheduleService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Public/IPublicSessionScheduleService.cs:34· Level 3 · interface
- What it is: the offline-first page fetch for the public session schedule
(
IPublicSessionScheduleService.cs:34-70). One method runs the live paged query and keeps the last successful FIRST page in the device-local cache, so a dead venue network still shows a programme (doc comment, lines 28-33); a second reads that cache alone for a page that cannot run its query. - Depends on: SessionSchedulePageRequest,
SessionDTO, and
Result<T>. BCLAction<bool>,Task,CancellationToken, and a named tuple return type(IReadOnlyList<SessionDTO> Items, int TotalItems). - Concept introduced, offline-first read-through with an explicit blast radius.
[Rubric §29, Resilience & Business Continuity](assesses whether a surface degrades usefully when a dependency is gone; here the conference programme survives a venue network outage).[Rubric §19, State Management]and[Rubric §18, UI Architecture]: the caching decision lives in the service while the page keeps only the banner flag, so the component stays a renderer. The doc comment is precise about how narrow the fallback is, and that precision is the teaching point: the live path is never affected, the snapshot is only consulted when a fetch fails, and only for page 1 while the device reports itself offline (lines 30-33). This is the ADR-042 device-capability abstraction at work (Website/docs-src/adr/042-device-capability-abstraction.md): the implementation composesOfflineFirstPageSnapshot<TItem>over ILocalCacheStore and IConnectivityStatusService (PublicSessionScheduleService.cs:18-33), so the same page code runs on a head that has no local store at all. - Walkthrough: two members.
TryReadOfflineSnapshotAsync(SessionSchedulePageRequest request, Action<bool> onCacheStateChanged, CancellationToken cancellationToken = default)returningTask<(IReadOnlyList<SessionDTO> Items, int TotalItems)?>(IPublicSessionScheduleService.cs:66-69). It reads the offline snapshot without a live fetch, for a page that cannot run its query at all because its event scope or bookmarks could not be read (doc comment:56-65). It answers only on the fallback's terms: the unfiltered programme, page 1, device offline. A My Schedule or narrowed request gets no snapshot, andnullmeans the snapshot cannot answer.onCacheStateChangedis raised withtruewhen it does.FetchPageAsync(SessionSchedulePageRequest request, Action<bool> onCacheStateChanged, CancellationToken cancellationToken = default)returningTask<Result<(IReadOnlyList<SessionDTO> Items, int TotalItems)>>(IPublicSessionScheduleService.cs:51-54).request(line 52): the page to fetch, see SessionSchedulePageRequest.onCacheStateChanged(line 53): a callback, raised withtruewhen the snapshot answered, so the page shows its "cached schedule" banner and re-renders, and withfalsewhen a live fetch succeeded (documented at lines 45-49). Passing a callback rather than exposing a property keeps the service free of any rendering knowledge.- The failure contract is spelled out in the method doc (lines 36-43): a successful first page is
written back to the snapshot, a failed fetch falls back to it, and a failure with nothing cached
travels on to the caller unchanged, a failed
Resultas a failed result and a throwing cache store as a rethrow, so the grid's own handling still applies. The write-back is narrower than "any first page": only the unfiltered programme is written or answered from, so a "My Schedule" page or a page narrowed by any filter other than the event scope never overwrites the snapshot and is never answered with it (lines 38-41). The implementation matches that on every branch (PublicSessionScheduleService.cs:63-95) and enforces the rule through its privateIsProgrammePagecheck (PublicSessionScheduleService.cs:145-146).
- Why it's built this way: extracting the offline behavior behind an interface is what let the page
keep a single fetch delegate for both the browse and "My Schedule" views. The page comment says it
directly: only the banner stays in the page, the service decides when it is warranted
(
PublicSessionList.razor.cs:363-365). - Where it's used: implemented by PublicSessionScheduleService,
registered scoped at
DependencyInjection.cs:61under an explicit ADR-042 Wave 3 comment (line 62), and injected into PublicSessionList (PublicSessionList.razor.cs:29), which calls itsFetchPageAsyncfrom the page fetch (PublicSessionList.razor.cs:337) and itsTryReadOfflineSnapshotAsyncwhen a page cannot run its query (PublicSessionList.razor.cs:348).
ISessionAssetUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/ISessionAssetUIService.cs:17· Level 3 · interface
- What it is: the UI-service contract for a session's materials: list, add a link, upload a file,
update, and delete (
ISessionAssetUIService.cs:17-85). Unlike the generic entity-service pattern elsewhere in this chapter, this contract is hand-written rather than derived fromIEntityService<,>, because a session asset is not a plain CRUD resource: it has two creation paths (link vs. uploaded file) and a conditional update. - Depends on: SessionAssetDTO,
SessionAssetLinkRequest,
SessionAssetUpdateRequest,
Result<T>; BCLIBrowserFile(Microsoft.AspNetCore.Components.Forms),byte[],CancellationToken. - Concept: the conditional update carries the same
If-Matchshape as IEventUIService's transitions:UpdateAsynctakes a requiredbyte[] rowVersionand refuses the write with 428 Precondition Required when it is empty (ISessionAssetUIService.cs:63-65), the same ADR-035 optimistic-concurrency contract. The list call is deliberately forgiving instead:GetBySessionAsyncis anonymous, and a session the caller cannot see answers with an empty list rather than a failure, because it backs the public session page as well as the organizer panel (ISessionAssetUIService.cs:19-23). Because that list is served under a shared output-cache policy, the owner's management view needs a way past it: thebypassCacheflag (:25-29) exists because a lookup can hit an entry built for an anonymous caller, so the speaker's or organizer's own read adds a unique query parameter that is a guaranteed cache miss.[Rubric §19, State Management](assesses whether cached state can go stale in front of the user who just changed it). - Walkthrough: five members.
GetBySessionAsync(sessionId, bypassCache = false, ct)(:32-35):Task<Result<IReadOnlyList<SessionAssetDTO>>>. The default keeps the cached public read; only the owner's management view passestrue.AddLinkAsync(request, ct)(:41-43):Task<Result<SessionAssetDTO>>, takes a SessionAssetLinkRequest.UploadFileAsync(sessionId, title, file, sortOrder, ct)(:55-60):Task<Result<SessionAssetDTO>>. The doc comment (:45-54) frames it as streaming the picked file straight into the multipart body rather than buffering the whole deck in the circuit.UpdateAsync(id, rowVersion, request, ct)(:72-76):Task<Result<SessionAssetDTO>>, conditional onrowVersionas described above.DeleteAsync(id, ct)(:82-84):Task<Result>. The doc comment notes a file asset also schedules its blob for removal (:78).
- Why it's built this way: separating
AddLinkAsyncfromUploadFileAsyncinstead of one polymorphic "add" call keeps the link path a small JSON POST and the file path a multipart stream, which matters because the upload path deliberately skips the shared retry policy (see SessionAssetService). - Where it's used: implemented by SessionAssetService, registered in
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:50, and injected into SessionAssetsPanel (SessionAssetsPanel.razor.cs:33, which lists withbypassCache: trueat line 82) and SessionAssetsDownloadList (SessionAssetsDownloadList.razor.cs:20, which keeps the cached read) (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/).
SessionizeRefreshOutcome
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/SessionizeRefreshOutcome.cs:14· Level 3 · record (sealed)
- What it is: the two-field payload the event detail page gets back from one Sessionize refresh
gesture:
Summary, the per-entity counts and warnings the import reported, andReloaded, the outcome of the event reload that followed the import, which is either the event with its fresh row version or the reload's own failure (SessionizeRefreshOutcome.cs:12-14). - Depends on:
RefreshFromSessionizeResultDTO and
EventDTO, both from
MMCA.ADC.Conference.Shared.Events(SessionizeRefreshOutcome.cs:1), and Result fromMMCA.Common.Shared.Abstractions(:2), which wraps the reload. - Concept introduced, a committed write is not undone by a failed read. A Sessionize refresh is
three server calls (persist an edited code, run the import, reload the event). The first two decide
whether the refresh happened; the third only refreshes the page's copy. The doc comment draws exactly
that line: the import has committed by the time this record exists, so a failed reload is not a failed
refresh, and the page keeps the summary and adopts the reload through its committed-write rule (warn
"imported, but not refreshed", re-read before the next write) (
SessionizeRefreshOutcome.cs:6-11). Typing the second member asResult<EventDTO>rather thanEventDTOis what makes that reachable: the outerResult<SessionizeRefreshOutcome>fails only for the persist or the import, and the reload's outcome travels inside a successful value.[Rubric §19, State Management]assesses whether the UI's copy of server state stays consistent after a write: the reload is part of the success value, so a page that handles the outcome cannot forget to refresh its row version, and when the reload fails it knows its copy is stale instead of believing the import failed.[Rubric §9, API & Contract Design]assesses whether a client contract models the operation rather than the transport; this record models the gesture's real outcome (one committed import plus one best-effort read) instead of collapsing three HTTP calls into a single pass or fail. - Walkthrough: a positional
sealed recordwith two members and no behavior (SessionizeRefreshOutcome.cs:14). Value equality andwithcome from the record declaration; there is no constructor body, no validation, and no mapping code. - Why it's built this way: the import rewrites the event's child data and its refresh stamp, so the
caller's copy of the event is stale the moment the import succeeds. The service comment says so and
concludes "hand back the reload with the summary": the import has committed, "so a failed reload
travels inside a successful outcome rather than failing it"
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventService.cs:132-134). Reporting a failed reload as a failed refresh would invite the organizer to re-run an import that already landed. - Where it's used: produced by
IEventUIService
.RefreshFromSessionizeWithCodeAsync(IEventUIService.cs:30), built by EventService (EventService.cs:137), and consumed by EventDetail, which showsrefreshed.Summaryunconditionally and handsrefreshed.Reloadedto CommittedWriteReload.TryAdopt, adopting the event (and its stored Sessionize code) only when the reload succeeded (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Events/EventDetail.razor.cs:333-342).
IEventUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/IEventUIService.cs:11· Level 4 · interface
- What it is: the UI-service contract for the
eventsresource. Unlike the plain CRUD markers, it extends the generic surface with four event-specific operations: publish, unpublish, a Sessionize refresh, and the composed refresh gesture (IEventUIService.cs:11-34). - Depends on: IEntityService<TEntityDTO, TIdentifierType>
bound to EventDTO,
RefreshFromSessionizeResultDTO (the
import summary), SessionizeRefreshOutcome (the composed payload), and
Result (
IEventUIService.cs:1-3). BCLTask,CancellationToken,byte[]. - Concept introduced, extending the generic UI service with resource-specific verbs.
[Rubric §9, API & Contract Design]assesses whether non-CRUD state transitions get first-class, intention-revealing operations instead of being forced through a generic update. Publish and unpublish are lifecycle transitions on an event and refresh triggers an external Sessionize sync, none of which is a CRUDUpdate, so they earn their own methods mapped to dedicated WebAPI endpoints (the doc comment,IEventUIService.cs:7-10, says exactly this). The second concept is in the signatures: both transitions take a requiredbyte[] rowVersion(IEventUIService.cs:13,15), the optimistic-concurrency token the client echoes back from the EventDTO it acted on. The implementation turns it into anIf-Matchheader via ConcurrencyETag.Format(Services/Events/EventService.cs:72,85), so a publish decided against a stale view comes back as a conflict rather than applying silently. That makes this contract a[Rubric §8, Data Architecture]touch point as well: concurrency control reaches all the way up into the UI service signature instead of stopping at the database. The rationale is ADR-035, which describes theETagon the read and the conditionalIf-Matchon the write as one exchange. - Walkthrough: four declared members, all returning
Result values.
PublishAsync(EventIdentifierType id, byte[] rowVersion, CancellationToken)(IEventUIService.cs:13), returnsTask<Result>: success is "the transition applied", with no payload.UnpublishAsync(EventIdentifierType id, byte[] rowVersion, CancellationToken)(IEventUIService.cs:15), the mirror transition, same shape.RefreshFromSessionizeAsync(EventIdentifierType id, CancellationToken)(IEventUIService.cs:17), returnsTask<Result<RefreshFromSessionizeResultDTO>>. It takes norowVersion: a Sessionize pull is not a lifecycle transition on the event row.RefreshFromSessionizeWithCodeAsync(EventDTO current, string? sessionizeCode, CancellationToken)(IEventUIService.cs:30-33), returnsTask<Result<SessionizeRefreshOutcome>>. The doc comment is the interesting part (IEventUIService.cs:19-29): this member runs the whole organizer refresh gesture, persisting the Sessionize code when the organizer changed it, callingRefreshFromSessionizeAsync, then reloading the event so the caller renders the server's new state. The persist and the import share one failure, so the page reports "refresh failed" once; the reload runs after the import committed, so its failure is carried inSessionizeRefreshOutcome.Reloadedrather than reported as a failed refresh. Thecurrentparameter is documented as carrying the row version the update is conditional on.
- Why it's built this way: the extra verbs live on the interface so the concrete EventService is the only place that knows the endpoint URLs, and pages stay transport-agnostic. Putting the three-step gesture on the contract (rather than orchestrating it in the page) is the same move ISpeakerDetailLookupService makes for reads: one call, one failure branch for what decides the outcome, one success value.
- Where it's used: implemented by EventService; injected into
EventList (
Pages/Events/EventList.razor.cs:21), EventDetail (Pages/Events/EventDetail.razor.cs:28, which is the only caller ofRefreshFromSessionizeWithCodeAsync, at:316), EventCreate (Pages/Events/EventCreate.razor.cs:15), ADCHome (Pages/Home/ADCHome.razor.cs:51), PublicEventList (:33), PublicEventDetail (:21), PublicSessionList (:30) and PublicSpeakerDetail (:25), and taken as a constructor argument by PublicSessionEventCatalog (Pages/Public/Sessions/PublicSessionEventCatalog.cs:66).
PublicSessionScheduleService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Public·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Public/PublicSessionScheduleService.cs:19· Level 5 · class (sealed)
- What it is: the offline-first page fetch behind the public session schedule. It runs the live paged
session query and keeps the last successful first page in the device-local cache, so a dead venue
network still shows a programme (
PublicSessionScheduleService.cs:19-193). It implementsIPublicSessionScheduleService. - Depends on:
ISessionUIServiceas the live query (constructor,PublicSessionScheduleService.cs:20), so it composes overSessionServicerather than issuing HTTP itself;ILocalCacheStoreandIConnectivityStatusService(:21-22);OfflineFirstPageSnapshot<TItem>as the snapshot mechanism (:42);SessionSchedulePageRequestas its request record;SessionDTO;Result. - Concept introduced, offline-first as a composition, not a mode. The service is a decorator over
a query, not a second data path: the live call always runs first, and the snapshot is consulted only
when that call did not produce a page. The framework piece it composes,
OfflineFirstPageSnapshot<TItem>, narrows the fallback deliberately:CanServeis true only when the device reports itself offline, the store is available, and the requested page is page 1 (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/OfflineFirstPageSnapshot.cs:44), andRememberAsyncrecords only page 1 (:41-45). That is what keeps the live path unaffected: there is no scenario in which a stale snapshot outranks a live answer.ILocalCacheStorepersists on the MAUI and WebAssembly heads and reports itself unavailable on Blazor Server, where SSR always has the live API (OfflineFirstPageSnapshot.cs:11-12), so the same code is a no-op on the server head rather than a branch. This is the device-capability abstraction of ADR-042 applied to a list surface.[Rubric §29, Resilience & Business Continuity](assesses whether the app degrades usefully when a dependency is gone; a venue with no signal still renders yesterday's first page) and[Rubric §19, State Management](the banner callback keeps the user aware of which data they are looking at). - Concept introduced, only the programme is remembered, and only the programme is answered from.
Page 1 alone is not a sufficient condition for the write-back or the read. The private
IsProgrammePagecheck (PublicSessionScheduleService.cs:145-146) admits a page only when it is not "My Schedule" and carries no filter key other than the event scope (EventId, the keyPublicSessionListwrites). Any other key, such as a title search, a room or a grid column filter, marks a narrowed view that must never overwrite the cached programme, nor be answered from it, while a different sort on page 1 still counts as the programme (doc comment,:138-145). The check gates every snapshot read as well as the write: without the read gate, a failed "My Schedule" fetch would be answered with the whole programme as its own result (comment at:77-80).[Rubric §19, State Management]. - Concept introduced, the snapshot is scoped per page shape and per event. The programme snapshot is
no longer one fixed slot.
SnapshotFor(request)(PublicSessionScheduleService.cs:41) builds anOfflineFirstPageSnapshot<SessionDTO>per call under the keyScheduleCacheKey + ".s" + PageSize(invariant culture), so a page of another size never stands in for this one (L214, doc comment:35-41). The event scope is deliberately not in the key: a public reader whose events lookup failed offline sends no event scope at all and must still get the cached programme (A-09). It is checked on read instead by the private staticMatchesEventScope(:53-55): a request with noEventIdfilter takes the snapshot as is, while one with anEventIdfilter is answered only if every cached session'sEventIdequals the filter value (ordinal compare), so a privileged reader who browsed another event online never gets that event's sessions offline (doc comment:45-52).[Rubric §19, State Management]. - Concept introduced, scoping "My Schedule" server-side. The private
QueryAsyncshows the third idea. When the "My Schedule" view is active, the request carries the attendee's bookmarked session ids, and the service copies the grid's filter dictionary and adds anId IN (...)filter built from those ids (PublicSessionScheduleService.cs:159-164), then lets the server page the result (:167-170). The doc comment records what this replaced and why it matters: pulling a 500-row page and filtering in memory also reported a wrong total past 500 rows (:149-152).[Rubric §12, Performance & Scalability]. - Walkthrough
ScheduleCacheKey = "conference.publicSessions.page1"(PublicSessionScheduleService.cs:29): the device-local cache key prefix, unique to this surface. The comment states the consequence of changing it (:25-29): every already-cached schedule is orphaned;SnapshotForappends the page-size suffix. The uniqueness requirement is the framework's, since a shared key would let one list serve another list's rows (OfflineFirstPageSnapshot.cs:18-22).SnapshotFor(request)(PublicSessionScheduleService.cs:41): a private method (it replaces the old single_snapshotfield) that returns a freshOfflineFirstPageSnapshot<SessionDTO>from the store, the connectivity probe and the page-size-scoped key. The snapshot object is cheap to rebuild because the persisted state lives in the store, not in the object.MatchesEventScope(request, cached)(PublicSessionScheduleService.cs:52-54): the read-time event check described above.FetchPageAsync(request, onCacheStateChanged, ct)(PublicSessionScheduleService.cs:57-96), the first public method, and it has three exits.- Live success:
QueryAsyncreturns a page (:65), the snapshot records it only whenIsProgrammePage(request)holds (:68-71), throughRememberSnapshotAsync(SnapshotFor(request), ...)(:70) rather than on the grid's own token, the page's cached-data banner is switched off through theonCacheStateChanged(false)callback (:73), and the live result is returned (:74). - Live failure with a snapshot: a transport fault arrives as a failed
Result, not an exception, so the fallback is tried on the same terms (:77-80), but only whenIsProgrammePage(request)holds (:81-83), so a My Schedule or narrowed request is never answered with the programme snapshot; when the snapshot answers, the cached page is returned as a success (:84); with nothing cached the original failure travels on to the grid's own handling. - Thrown fault with a snapshot: the
catch (Exception) when (IsProgrammePage(request) && SnapshotFor(request).CanServe(request.Page))filter (:86) still guards the paths that can throw rather than fail, the local cache store itself and a cancelled fetch (:88). If the snapshot has nothing, the exception is rethrown (:90-93) so cancellation and genuine faults are not swallowed.
- Live success:
TryReadOfflineSnapshotAsync(request, onCacheStateChanged, ct)(PublicSessionScheduleService.cs:99-109): the second public method. It reads the snapshot without a live fetch, for a page that cannot run its query at all (its event scope or bookmarks could not be read). It answers only on the fallback's terms:IsProgrammePage(request) && SnapshotFor(request).CanServe(request.Page)(:107), else a completed task holdingnull(:109). It guards a null request withArgumentNullException.ThrowIfNull(:105).RememberSnapshotAsync(snapshot, fetched, page)(PublicSessionScheduleService.cs:120-135): now aprivate staticmethod taking the request's snapshot as its first argument. It writes under its ownCancellationTokenSourcebounded bySnapshotWriteTimeout, a five-secondstatic readonly TimeSpan(:33), not the grid's token (:127). A superseding reload (or the pre-render timeout) that cancels the grid's token after the 200 arrived therefore cannot turn that success into an empty page; anOperationCanceledExceptionis swallowed because the snapshot is best-effort (:131-135, doc comment:112-120).IsProgrammePage(request)(PublicSessionScheduleService.cs:145-146): aprivate staticpredicate,request.MyScheduleSessionIds is null && request.Filters.Keys.All(key => key == "EventId"), the gate for every snapshot write and read described above.QueryAsync(request, ct)(PublicSessionScheduleService.cs:155-170): builds the effective filters described above and callsISessionUIService.GetPagedAsyncwithincludeChildren: true, since the public schedule renders each session's child data (:167-170).ReadSnapshotAsync(request, onCacheStateChanged, ct)(PublicSessionScheduleService.cs:178-192): reads the request's snapshot viaSnapshotFor(request).TryReadAsync(:184) and returnsnullwhen nothing is cached orMatchesEventScoperejects it (:185-188); only when a snapshot actually answers does it raise the "showing cached data" banner and return the page (:190-191).
- Why it's built this way: the offline behavior is a property of this list surface, so it lives in
a service the page injects rather than in the page or in the generic session service. Both the live
service and the snapshot stay independently testable, and no other consumer of
ISessionUIServiceinherits the caching. - Where it's used: registered explicitly as
IPublicSessionScheduleServiceatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:61, under the comment naming ADR-042 Wave 3 (:62), and injected intoPublicSessionList(Pages/Public/Sessions/PublicSessionList.razor.cs:33), whose grid data delegate callsFetchPageAsyncat:321. - Caveats / not-in-source: the snapshot is best-effort. Nothing here expires it, so on a device that
has been offline for a long time the cached first page can be arbitrarily old; the only signal to the
user is the banner the
onCacheStateChangedcallback raises. What the store does on a write failure is the store's concern, not visible in this class.
SessionAssetService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.SessionAssets·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/SessionAssets/SessionAssetService.cs:25· Level 5 · class (sealed)
- What it is: the implementation behind ISessionAssetUIService: list,
add a link, upload a file, conditionally update, and delete, all against the
SessionAssetsendpoint (SessionAssetService.cs:25-159). Nothing here throws for a server answer: every response is read back through ProblemDetailsResultReader with the API'sErrorTypeand machine-readableError.Codeintact, which is what lets the management panel map codes such asSessionAsset.UnsupportedFormatonto localized wording (SessionAssetService.cs:12-23). - Depends on: ISessionAssetUIService (implemented interface);
AuthenticatedServiceBase for the
authenticated client and the inherited
NewIdempotencyKey,SendRequestAsyncandCreateRequestClientAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:65,171,201,232); HttpResultExecutor and ProblemDetailsResultReader for the upload's hand-built request/response plumbing; ConcurrencyETag for theIf-Matchheader; SessionAssetLinkRequest, SessionAssetUpdateRequest, SessionAssetDTO, SessionAssetLimits; BCLIHttpClientFactory,IBrowserFile,MultipartFormDataContent,CultureInfo.InvariantCulture. - Concept: the upload path is the teaching point. Every other method dispatches through the base's
SendRequestAsync, which sends each attempt through the sharedRetryPolicy(AuthenticatedServiceBase.cs:185,213);UploadFileAsyncalone builds its client by hand and posts exactly once, with no retry policy at all (SessionAssetService.cs:79-126). The doc comment explains why: a picked file's stream is single-shot, neither a browser file input nor a native picker rewinds it, so a retried attempt would post an exhausted body. TheIdempotency-Keyit still sends is minted per call and the request goes out once, so it never replays a stored response: a user who retries after a failure makes a new call with a new key, and the file uploads again; the server still records one replay entry per upload (:67-74).[Rubric §29, Resilience & Business Continuity]assesses whether a retry strategy actually fits the operation it wraps; here the right answer is to not retry a single-shot body at all and leave the retry decision to the user.[Rubric §24, Forms/Validation/UX Safety]: the 50 MB cap is declared once, inSessionAssetLimits.MaxFileBytes, and stated toOpenReadStreamso Blazor's own 512 KB default cannot silently truncate a real slide deck (:93-95); the suppressed Sonar rule S5693 onUploadFileAsync(:75-78) documents that the length IS limited, just not by the pattern the rule looks for. - Walkthrough
Endpoint = "SessionAssets"(:28).GetBySessionAsync(sessionId, bypassCache, ct)(:31-47): GETsSessionAssets?sessionId={id}through the base'sSendRequestAsync<SessionAssetDTO[]>with no idempotency key and noIf-Match, since it is a read (:42-44), and maps the array to anIReadOnlyList(:46). WhenbypassCacheistruethe URL gains a&_={Guid.NewGuid():N}parameter (:38-40), so the owner's read is a guaranteed miss against the shared output cache, the same pattern the speaker dashboard uses (:36-37); the public download list keeps the cached read.AddLinkAsync(request, ct)(:54-65): POSTs the SessionAssetLinkRequest toSessionAssets/linkthroughSendRequestAsyncwithidempotencyKey: NewIdempotencyKey()and noIf-Match(:60-64). Adding a link appends a row, so without the key a retried request would publish the same link twice (:50-53).UploadFileAsync(sessionId, title, file, sortOrder, ct)(:79-126): insideHttpResultExecutor.ExecuteAsync, takes a client fromCreateRequestClientAsync(NewIdempotencyKey(), ifMatch: null)(:91); opens the file's stream capped atSessionAssetLimits.MaxFileBytes(:95); copies the file's content type onto the file part when present (:106-109); adds parts namedfile,sessionId,title,sortOrder(:113-116), matching the controller'sIFormFileparameter and its three[FromForm]arguments exactly, since a renamed part fails binding (:111-112); posts directly withhttpClient.PostAsynctoSessionAssets/filerather than throughRetryPolicy(:118-119), for the single-shot-stream reason above; and reads the answer throughProblemDetailsResultReader(:121-122).UpdateAsync(id, rowVersion, request, ct)(:129-146): builds theIf-Matchheader only whenrowVersionis non-empty (:139), so an empty token sends no header and the server answers 428 rather than the write overwriting another editor's change (:137-138); PUTs toSessionAssets/{id}throughSendRequestAsyncwith thatifMatch(:142-145).DeleteAsync(id, ct)(:149-158): DELETEsSessionAssets/{id}through the valuelessSendRequestAsync, with neither header.- The headers themselves are attached by the base's
CreateRequestClientAsync(AuthenticatedServiceBase.cs:232): both are default request headers on a client built once per logical operation, andSendRequestAsyncsends every retry attempt through that one client (AuthenticatedServiceBase.cs:184-185), so each attempt states the same idempotency key and the same precondition: a duplicate arrival dedups at the server, and a write that lost the concurrency race keeps failing the same precondition instead of eventually succeeding against a version the caller never saw.
- Why it's built this way: the interface exists because a session asset is not one CRUD resource,
it is two creation paths (a cheap link POST and an expensive multipart upload) plus a conditional
update, and each earns a method shaped for what it actually sends over the wire rather than a single
generic
Create/Updatepair. - Where it's used: registered against ISessionAssetUIService in
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:50, and injected into SessionAssetsPanel (SessionAssetsPanel.razor.cs:33, the one caller passingbypassCache: true, at line 87) and SessionAssetsDownloadList (SessionAssetsDownloadList.razor.cs:20) (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/SessionAssets/).
EventLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventLookupService.cs:30· Level 6 · class (sealed)
- What it is: the implementation behind IEventLookupService: a paged read of
the whole events collection projected into a dictionary of EventInfo, memoized per
scope by the framework's single-flight memo (
EventLookupService.cs:30-88). It is the most-injected service in this chapter, so the caching is not an optimization detail, it is the reason the pattern scales. - Depends on: EventInfo, EventDTO,
ScopedMemo<T> (the cache),
PagedCollectionResult<T>,
PagedReadAll,
IdempotentReadRetry,
HttpResultExecutor,
ProblemDetailsResultReader; BCL
IHttpClientFactory,TimeProvider,TimeSpan. The primary constructor takes the client factory and aTimeProviderand, like its category-item sibling, no token storage (EventLookupService.cs:30), so this is an unauthenticated read whose clock is injectable (the clock is handed to the memo,:43). - Concept introduced, the scope-lifetime single-flight cache, written once in the framework. The
class remarks state the policy (
EventLookupService.cs:12-29); the mechanics live in ScopedMemo<T>, so this class only declares what to fetch and for how long.- The cached unit is the in-flight fetch, not the result. Two callers in the same scope that ask
while a fetch is running share that one fetch instead of starting one each. The remarks explain why
overlap is the normal case rather than the edge case:
EventFilteredListPageBase<TDto> starts the load before its first
await via
BeginEventsLoad(Pages/Common/EventFilteredListPageBase.cs:144, defined at:152) and a derived page awaits it later (EventLookupService.cs:17-20). - Only a successful read is kept (
:20). The memo stamps its TTL only when the result is a success and noInvalidatehas superseded the fetch (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/ScopedMemo.cs:110), so a faulted task, a cancelled one and a failedResultall expire immediately; a transient outage heals on the next page instead of being remembered for five minutes.CacheTtlis five minutes (:40), matched to the server-side"EventsCache"output-cache policy: for a reader the origin serves from that cache, the entry is no staler than the origin would be, but a privileged reader bypasses the server cache, which is why the memo is also dropped on this scope's own writes (:33-39). - Explicit invalidation with a generation guard.
Invalidate()delegates to the memo (:46), which bumps its generation and drops the entry (ScopedMemo.cs:96-98). An in-flight fetch simply completes unobserved, and the generation check means it cannot stamp a TTL onto the fetch that replaced it. EventService is the caller here (EventService.cs:140-149). - The caller's token never cancels the shared fetch.
FetchAsyncisstaticand takes no caller token, usingCancellationToken.Nonethroughout (:52-72);GetAllAsynchands the caller's token to the memo (:48-50), which awaits the shared task under it withWaitAsync(ScopedMemo.cs:89), so a page disposing mid-load abandons only its own await. - No lock. The service is registered scoped in both heads (
DependencyInjection.cs:65), "which is the lifetime the memo requires" (EventLookupService.cs:20-21): Blazor's renderer dispatches every component callback for one scope on a single logical thread, so the hosting model, not a synchronization primitive, is the safety argument.[Rubric §23, Front-End Performance]assesses redundant network work in a session: a user walking four grids pays one round trip for the event list instead of four.[Rubric §19, State Management]assesses freshness policy: bounding the client cache by the origin's own TTL means the two can never disagree in the direction that matters.[Rubric §12, Performance & Scalability]covers the single-flight collapse under concurrency.
- The cached unit is the in-flight fetch, not the result. Two callers in the same scope that ask
while a fetch is running share that one fetch instead of starting one each. The remarks explain why
overlap is the normal case rather than the edge case:
EventFilteredListPageBase<TDto> starts the load before its first
await via
- Walkthrough
CacheTtl(:40):static readonly TimeSpanof five minutes._memo(:42-43): aScopedMemo<IReadOnlyDictionary<EventIdentifierType, EventInfo>>built from() => FetchAsync(httpClientFactory),CacheTtland the injectedtimeProvider.Invalidate()(:46):_memo.Invalidate().GetAllAsync(ct)(:48-50):_memo.GetAsync(cancellationToken).FetchAsync(httpClientFactory)(:53-75): reads every page through PagedReadAll.ReadAllAsyncuntil the reported total, because the GET-all endpoint ignorespageSizeand stops silently at the API's maximum page size (:56-58). Each page is oneHttpResultExecutor.ExecuteAsynccall that GETsPagedReadAll.LookupPageUrl("events", pageNumber)on the"APIClient"client through IdempotentReadRetry.GetAsync(:62-66) and reads it through ProblemDetailsResultReader (:68-69). The combined list is mapped throughBuildLookup(:74); TTL stamping is the memo's job, not this method's.BuildLookup(events)(:77-87): takes the accumulatedList<EventDTO>and projects each DTO into an EventInfo carrying all seven members includingSponsorshipPacketUrl(:83), keyed byevt.Id.
- Why it's built this way: the projection is the boundary between the transport contract and the
UI's own model, so a change to EventDTO that does not affect
these seven fields never reaches the pages (
[Rubric §15, Best Practices & Code Quality]). Leaving the memo mechanics toScopedMemo<T>keeps the single-flight, success-only, generation-guarded behavior in one framework type instead of a hand-rolled copy in each lookup service. The remarks also record a deliberate non-consolidation: the sibling read paths (LiveEventService,ADCHome, and the Conference service's SelfHttpOutputCacheWarmupTask) keep their own URLs and their own caching because they ask narrower questions of the same controller, and collapsing them onto this URL family would trade one saved round trip for a wider payload on every one of them (EventLookupService.cs:23-28). - Where it's used: registered scoped against IEventLookupService
(
DependencyInjection.cs:65). It is injected across the Conference UI, including EventFilteredListPageBase<TDto> (Pages/Common/EventFilteredListPageBase.cs:27, which is what puts it behind every event-filtered grid), SessionDetail (:33), SessionCreate (:21), RoomDetail (:21), RoomCreate (:13), ActivityDetail (:26), ActivityCreate (:19), SponsorDetail (:25), SponsorCreate (:18), PartnerDetail (:25), PartnerCreate (:18), SpeakerDashboard (:31), SessionSelectionDashboard (:19), OrganizerEventFeedback (:22), PublicEventList (:34), PublicActivityList (:30), PublicSponsorList (:29), PublicSessionDetail (:35), and SessionLookups (Pages/Sessions/SessionLookups.cs:32), and EventService takes it to invalidate (EventService.cs:37). It also crosses a module boundary into Engagement's EventFeedback page (MMCA.ADC/Source/Modules/Engagement/MMCA.ADC.Engagement.UI/Pages/Feedback/EventFeedback.razor.cs:21). The organizer create pages feed the result to EventInfoDefaults to pick their default event. - Caveats / not-in-source: the read has no fixed row ceiling, since
PagedReadAllkeeps requesting pages until the reported total (EventLookupService.cs:56-72); the page size it uses isPagedReadAll's concern, not visible in this class. The cache is per scope, so a Blazor Server circuit and a WebAssembly app instance each hold their own copy.Invalidate()only drops the copy in the scope that called it: an event edited from another circuit or device is not reflected here until the five minutes elapse, and a write through this scope'sEventServiceclears it immediately.
EventService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventService.cs:34· Level 6 · class (sealed)
- What it is: the concrete HTTP service for the
eventsresource. Unlike its plain-CRUD siblings it is not body-less: on top of the inherited CRUD it adds the four event-specific operations that map to dedicated WebAPI endpoints, publish, unpublish, Sessionize refresh, and the composed refresh-with-code gesture (EventService.cs:34-150). It also overrides the inheritedAddAsync,UpdateAsyncandDeleteAsync(:43-59) so that every successful write drops the scope's memoized event lookup (see the cache-invalidation concept below). It implementsIEventUIService, which itself extends the genericIEntityService<EventDTO, EventIdentifierType>(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/IEventUIService.cs:11). - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>for the CRUD surface, theEndpointproperty (EntityServiceBase.cs:42) and the protectedSendRequestAsyncdispatch it inherits fromAuthenticatedServiceBase(AuthenticatedServiceBase.cs:171,201);ConcurrencyETagto render the row version as a weak entity tag (EventService.cs:72,85);AuthenticatedServiceBasefor the inheritedNewIdempotencyKey(), a fresh compact GUID per call (AuthenticatedServiceBase.cs:65), used atEventService.cs:71,84;EventDTO,RefreshFromSessionizeResultDTOandSessionizeRefreshOutcome;Result;ITokenStorageService;IEventLookupService,ISpeakerLookupServiceandICategoryItemLookupService, the three memoized lookups it invalidates (primary constructor,EventService.cs:34-39); BCLCultureInfo.InvariantCulture. - Concept introduced, write-through invalidation of the scope memo. The organizers who write
bypass the server's output cache, so the client-side memo in
EventLookupServicewould be the only staleness they could see (EventService.cs:16-20). Every successful write therefore callseventLookup.Invalidate()through the private generic helperInvalidateEventsOnSuccess<TResult>(TResult result) where TResult : Result(:140-149), which passes the result through untouched and invalidates only whenresult.IsSuccess. It wraps the overriddenAddAsync,UpdateAsyncandDeleteAsync(:43-59) and the publish and unpublish transitions (:65,78). Sessionize refresh is the one call that invalidates three memos: on success it drops the event lookup, the speaker lookup and the category item lookup (:98-104), because the import rewrites the event, its speakers and the categories (:100). A failed call invalidates nothing, so a refused write leaves the cache valid.[Rubric §19, State Management](assesses whether client state is dropped when the server state it mirrors changes). - Concept introduced, the conditional state-transition call. Publish and unpublish are not CRUD:
they are named transitions the server owns, so they POST to
{Endpoint}/{id}/publishand{Endpoint}/{id}/unpublishwith no body at all (EventService.cs:66-69,79-82). What they do carry is anIf-Matchheader holding the event's current row version, rendered byConcurrencyETag.Formatas a weak tag such asW/"AAAAAAAAB9E="(MMCA.Common/Source/Core/MMCA.Common.Shared/Http/ConcurrencyETag.cs:41-45). The tag is weak on purpose: a strong tag would promise byte-for-byte equality of the representation, while all this token answers is "is this still the same version of the resource", which is exactly whatIf-Matchasks (ConcurrencyETag.cs:11-18). So a publish issued against a stale copy of the event is refused by the server rather than silently overwriting a concurrent edit (ADR-035).[Rubric §9, API & Contract Design](assesses whether state changes are modeled as intent-named resources rather than as generic updates) and[Rubric §8, Data Architecture](assesses how concurrent writers are arbitrated; here by a version token on the wire, not by a last-writer-wins update). - Concept introduced, a keyed transition versus an unkeyed import. Publish and unpublish are POSTs
to endpoints marked
[Idempotent](MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/EventLifecycleController.cs:57-58,87-88), so each call also sends anIdempotency-Keyminted byNewIdempotencyKey()(EventService.cs:71,84). The argument is evaluated once, before the retry pipeline runs, so every retry of that one call carries the same key: without a key the retry policy never resends a POST, and with it a retry after a lost response replays the stored answer instead of running the transition twice (EventService.cs:21-26). The Sessionize refresh deliberately sends no key (EventService.cs:91-96), even though its endpoint is also[Idempotent](EventLifecycleController.cs:125-126), so one click is exactly one POST. The reason is in the class remarks (EventService.cs:27-32): the server never stores a failed answer for replay and stamps its refresh throttle before calling Sessionize, so a keyed retry after a 503 would run the handler again, hit that throttle and replace the real failure with "throttled". An organizer retries a failed refresh by clicking again. - Concept introduced, composing a multi-call gesture behind one Result.
RefreshFromSessionizeWithCodeAsyncis the second idea worth teaching here. The organizer's "refresh from Sessionize" button is really three server calls: persist an edited Sessionize code, run the import, reload the event. Doing that in the page would mean three failure branches printing the same message. Instead the service runs the sequence and returns oneResultcarrying aSessionizeRefreshOutcome(EventService.cs:109-138, contract documented atIEventUIService.cs:19-29). The three calls do not weigh the same, though: the persist and the import decide whether the refresh happened and share the one failure branch, while the reload runs after the import committed, so itsResulttravels inside a successful outcome rather than failing it (:132-137).[Rubric §18, UI Architecture](assesses whether orchestration lives in a service rather than in component code) and[Rubric §24, Forms/Validation/UX Safety](one failure branch means one message, and a committed import is never reported as a failed one). - Walkthrough
AddAsync(entity, ct),UpdateAsync(entity, ct),DeleteAsync(id, ct)(EventService.cs:43-59):overrides of the base CRUD, eachInvalidateEventsOnSuccess(await base.XAsync(...)).PublishAsync(id, rowVersion, ct)(EventService.cs:61-72): a body-less POST to{Endpoint}/{id}/publishbuilt withstring.Create(CultureInfo.InvariantCulture, ...)(:67), dispatched through the base's valuelessSendRequestAsyncwithidempotencyKey: NewIdempotencyKey()(:71) andifMatch: ConcurrencyETag.Format(rowVersion)(:72), the whole call wrapped inInvalidateEventsOnSuccess(:65). The base attaches both headers inCreateRequestClientAsync(AuthenticatedServiceBase.cs:232) and turns the response into aResult.UnpublishAsync(id, rowVersion, ct)(EventService.cs:74-85): the exact mirror against{Endpoint}/{id}/unpublish(:80), same idempotency key and conditional header (:84-85), same invalidation (:78).RefreshFromSessionizeAsync(id, ct)(EventService.cs:87-107): POSTs{Endpoint}/{id}/refresh(:91-96) through the value-returningSendRequestAsync<T>and yields the import summary as aResult<RefreshFromSessionizeResultDTO>. NoIf-Matchhere: an import is not a conditional edit of the caller's copy. NoIdempotency-Keyeither, so the call is never retried behind the organizer's back (see the concept above). On success it invalidates the event, speaker and category item lookups (:98-104).RefreshFromSessionizeWithCodeAsync(current, sessionizeCode, ct)(EventService.cs:109-138): guards a null event (:114); compares the edited code against the stored one withStringComparison.Ordinaland, only when they differ, persists it first through the overriddenUpdateAsyncon awith-copy of the DTO, because the import reads the code off the stored event (:116-119); short-circuits on a failed persist (:120-123); runs the import and short-circuits again on failure usingTryGetValue(:126-130); then reloads the event through the inheritedGetByIdAsync(id, true, ct)(:135), because the import rewrites the event's child data and its refresh stamp, so the caller's copy is stale the moment it succeeds (:132-134); and finally returnsResult.Successof aSessionizeRefreshOutcomepairing the summary with the reload's ownResult, whether that reload succeeded or not (:137). The two failure branches return the underlying call's ownErrors, so nothing is re-worded on the way out. Because the persist goes through the overriddenUpdateAsync, the code-change path invalidates the event lookup before the import runs.InvalidateEventsOnSuccess<TResult>(result)(EventService.cs:140-149): the private helper.
- Why it's built this way: publish, unpublish and refresh are server-owned transitions with their own
endpoints and their own authorization, so they are additive methods on the event's interface rather
than flags smuggled through a PUT. The composed method exists because the reload after an import is not
optional: returning a bare summary would leave the page holding an event whose row version no longer
matches, and the next conditional write would fail. Carrying the reload as a
Resultrather than failing on it keeps that need from turning a committed import into a reported failure. - Where it's used: registered by the
AddUIModule<ConferenceUIModule>()entity-service scan (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30), sinceIEventUIServicederives fromIEntityService<,>. It is injected asIEventUIServiceintoEventList(Pages/Events/EventList.razor.cs:21),EventDetail(Pages/Events/EventDetail.razor.cs:28),EventCreate(Pages/Events/EventCreate.razor.cs:15),ADCHome(Pages/Home/ADCHome.razor.cs:51),PublicEventList(Pages/Public/Events/PublicEventList.razor.cs:33),PublicEventDetail(Pages/Public/Events/PublicEventDetail.razor.cs:21),PublicSpeakerDetail(Pages/Public/Speakers/PublicSpeakerDetail.razor.cs:25) andPublicSessionList(Pages/Public/Sessions/PublicSessionList.razor.cs:30), and passed toPublicSessionEventCatalog(Pages/Public/Sessions/PublicSessionEventCatalog.cs:66). The transition methods are called fromEventDetail: publish and unpublish atPages/Events/EventDetail.razor.cs:246-247, and the composed refresh at:316.
EventInfoDefaults
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Events·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventInfoDefaults.cs:11· Level 9 · class (static)
- What it is: a one-method static helper that picks the default event for an organizer create page
from the EventInfo lookup: the event live now, else the next upcoming one, else the most
recently ended (
EventInfoDefaults.cs:11-31). - Depends on: CurrentEventSelector
.SelectCurrentOrNextfor the rule itself, EventInfo for the shape it reads, andEventIdentifierTypefor the answer (EventInfoDefaults.cs:20-30). Its doc comment names CurrentEventDefaults as its counterpart (:5-10). - Concept introduced, one accessor triple written once.
CurrentEventSelectoris generic over the event shape: a caller hands it the events plus three accessors (start date, end date, time zone) and the instant to classify against. The Shared project already wraps that call for EventDTO asCurrentEventDefaults, butEventInfois a UI-only type the Shared project cannot see, so this class is theEventInfocounterpart, "written once, so the organizer create pages pick their default event the same way" (EventInfoDefaults.cs:5-10).[Rubric §15, Best Practices & Code Quality]assesses duplication of logic that must stay in step: five create pages share one selection rule instead of five copies of the same lambdas.[Rubric §18, UI Architecture]assesses whether pages carry domain rules; here the rule stays inCurrentEventSelectorand the pages only ask for an id. - Walkthrough: one member.
SelectCurrentOrNextId(IReadOnlyDictionary<EventIdentifierType, EventInfo>? events, DateTime utcNow)(EventInfoDefaults.cs:20-30): returnsnullwheneventsisnull, which the parameter doc defines as "the lookup failed" (:17,:23-24); otherwise passesevents.Valueswithe => e.StartDate,e => e.EndDateande => e.TimeZoneandutcNowtoSelectCurrentOrNextand returns the selected event'sId, ornullwhen there is no event to pick (:19,:25-30).
- Why it's built this way: the instant is a parameter, not read inside, so the clock stays with the
caller (each page passes
TimeProvider.GetUtcNow().UtcDateTime) and a test can pin it. Accepting anulllookup lets a page call it straight on a failed read and get "no default" instead of a guard at every call site. - Where it's used: the organizer create pages, all under
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/: ActivityCreate (Activities/ActivityCreate.razor.cs:56), PartnerCreate (Partners/PartnerCreate.razor.cs:55), RoomCreate (Rooms/RoomCreate.razor.cs:54) and SponsorCreate (Sponsors/SponsorCreate.razor.cs:55) assign it with??=, so it fills the event only when nothing preset one; SessionCreate (Sessions/SessionCreate.razor.cs:74) pattern-matches the result. Each passes the dictionary it read from IEventLookupService.
SpeakerInfo
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerLookupService.cs:9· Level 0 · record
- What it is: the speaker-side lookup projection, three fields wide:
Id,FullName, and a nullableProfilePicture(ISpeakerLookupService.cs:9-12). It is what pages index when they hold a speaker id and must render a name or an avatar. - Depends on: no first-party types.
SpeakerIdentifierTypeisSystem.Guidin this module (MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:24), unlike the other Conference aliases, which areint, because speakers carry Sessionize-assigned GUIDs (BR-61, noted atMMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:4). - Concept: the UI lookup projection introduced by CategoryItemInfo; see there
for the mechanism and the reason a page pre-loads a dictionary.
[Rubric §18, UI Architecture].ProfilePictureis nullable because not every speaker has an image, so the render path must have a fallback branch. - Walkthrough: a positional record with three members and no body (
ISpeakerLookupService.cs:9-12); it is filled member for member from the speaker DTO in SpeakerLookupService (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerLookupService.cs:82-83). - Where it's used: returned as the dictionary value of
ISpeakerLookupService.GetAllAsync
(
ISpeakerLookupService.cs:19-20), which the session and speaker surfaces inject to enrich speaker ids. - Caveats / not-in-source: the name is reused. A separate, unrelated
SpeakerInforecord exists in the Conference application layer for AI session scoring, documented as SpeakerInfo. They share only a name; the namespaces keep them apart.
SpeakerDetailLookups
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerDetailLookupService.cs:14· Level 1 · record
- What it is: the three display lookups the speaker detail page needs before it can render a
speaker, gathered into one record: the category items assigned to the speaker, the titles of the
categories those items belong to, and the text of the questions the speaker answered
(
ISpeakerDetailLookupService.cs:14-17). - Depends on: CategoryItemInfo as the value type of its first dictionary, plus
the
CategoryItemIdentifierType,ConferenceCategoryIdentifierType, andQuestionIdentifierTypealiases. BCLIReadOnlyDictionary. - Concept introduced, the composite lookup bundle.
[Rubric §19, State Management](assesses how many independent pieces of loaded state a component has to track and invalidate). The interface's doc comment states the problem it removes: the page used to issue the three loads itself and carry three nullable caches with a failure branch each, so this gathers them into one call answering with oneResult<T>, leaving the page a single point of failure to report and a single cache to check (ISpeakerDetailLookupService.cs:19-24).[Rubric §1, SOLID]: the bundle is what makes the single-method composite interface possible at all, since a method can only return one value. - Walkthrough: a positional record with three dictionary members and no body.
CategoryItems(ISpeakerDetailLookupService.cs:15):IReadOnlyDictionary<CategoryItemIdentifierType, CategoryItemInfo>, for the assigned-items panel.CategoryTitles(line 15):IReadOnlyDictionary<ConferenceCategoryIdentifierType, string>, for grouping those items.QuestionTexts(line 16):IReadOnlyDictionary<QuestionIdentifierType, string>, for the answers section.
- Why it's built this way: the three sources keep their own services because other pages share
them; SpeakerDetailLookupService only composes them, reporting the
first failure in item, category, question order (
SpeakerDetailLookupService.cs:29-41) so the caller reports one error instead of branching three times. The three reads themselves run side by side under oneTask.WhenAll(SpeakerDetailLookupService.cs:24-27). - Where it's used: SpeakerDetail holds exactly one nullable field of this type
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDetail.razor.cs:75), loads it once when it is still null (SpeakerDetail.razor.cs:119-127), and readsQuestionTextswhen rendering an answer, falling back to the raw id when a question is missing (SpeakerDetail.razor.cs:180).CategoryTitlesis handed down to SpeakerCategoryItemsPanel as a parameter (SpeakerCategoryItemsPanel.razor.cs:30, read at:36-37).
ActivityFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityFormModel.cs:26· Level 2 · class (abstract)
- What it is: the editable activity fields, declared once, for both the create page and the detail page's inline editor. It carries the DataAnnotations rules for the text fields, the four half-picked schedule values, the computed properties that recombine them, and the one schedule rule both forms ask before sending (
ActivityFormModel.cs:26-112). - Depends on:
System.ComponentModel.DataAnnotations(:1) andActivityDTO(:2), which owns the length constants the rules quote. Its rules are executed throughModelValidationandDataAnnotationsModelValidator.VenueUrlalso carriesAbsoluteUrlAttribute(:53). - Concept introduced, one form model behind two forms. This is the shape every Conference create/edit pair in this unit now uses, and it is worth reading once here.
- Rules declared once, not per control. Each property carries its own
[Required]/[MaxLength]with the length taken from the DTO constant (:35-55), and the pages bridge MudBlazor's per-field validation to those attributes with a single delegate built byModelValidation.For(...)rather than repeatingRequired="true"andRequiredError="..."on everyMudTextField(class doc,:8-14). Because both pages bind the sameActivityFormFieldscomponent to an instance of this type, a name the create page accepts is a name the detail page accepts.[Rubric §24, Forms, Validation & UX Safety](assesses whether validation is expressed once and consistently) and[Rubric §15, Best Practices & Code Quality]: adding a field is one property here plus one control in the shared field block. - Error messages are resource keys, not sentences.
ErrorMessage = "Error.NameMaxLength"(:37) is a key that the page's localizing validator resolves at render time, which is what lets DataAnnotations participate in the localization strategy of ADR-027.[Rubric §27, Internationalization]. TheNameRequiredKeyconstant (:33) exists so the model rule and the field's ownRequiredErroraffordance quote one key instead of two copies of a literal. - The rule DataAnnotations cannot express is a method, not an attribute. The start/end window is four separate properties (
:57-67) because twoDateTimevalues are picked as four controls, and no attribute can state "end after start". So the model exposes the raw parts, the derived answers, andScheduleErrorKey()(:98-111), which answers the refusal as a resource key:Error.StartRequiredwhen the start is incomplete (:100-103),Error.EndRequiredwhen the end is (:105-108),Error.EndBeforeStartwhen the end precedes the start, andnullwhen the window may be sent (:110). An end equal to the start is accepted, matching the server rule inActivityValidationRules(doc,:90-97). BothActivityCreateandActivityDetailask this one method, so the create and edit paths cannot drift on the window; each page still resolves the key through its own localizer and owns where the message renders.[Rubric §1, SOLID]and[Rubric §15, Best Practices & Code Quality]. The class doc's closing paragraph (:19-24) still says the page checks the window itself; the method's own doc (:90-97) is the current account.
- Rules declared once, not per control. Each property carries its own
- Walkthrough
- Text fields (
:35-55):Name(required,ActivityDTO.NameMaxLength),Description,VenueName,VenueAddress,VenueUrl, each capped from the DTO constant;VenueUrlalso runs the shared[AbsoluteUrl(ErrorMessage = "Error.AbsoluteUrl")]rule (:53), rejecting a relative or scheme-less link before it is stored. - Schedule parts (
:57-67):StartDate/StartTimeandEndDate/EndTime, nullable so "not picked yet" is representable. SortOrder(:70): the tie-break between activities starting at the same instant.- Derived (
:72-88):HasStartandHasEndreport whether both halves are present (:73,:76);StartsAtandEndsAtcollapse a date plus aTimeSpaninto oneDateTimeand are documented as valid only once the matchingHas*is true (:78-82,:84-88). ScheduleErrorKey()(:98-111): the window rule above, consulted in that order so the first missing part is the message shown. It readsStartsAt/EndsAtonly after bothHas*checks pass, which is the precondition those properties document.
- Text fields (
- Why it's built this way: the create form and the edit form of the same aggregate diverging is a classic and invisible defect (a field that is required on one and optional on the other, or a window one form accepts and the other refuses). Making the shared base the only declaration site, for the attributes and for the cross-field window rule, removes the possibility rather than testing for it. The window rule is covered directly by
ActivityFormModelScheduleTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Activities/ActivityFormModelScheduleTests.cs). - Where it's used: subclassed by
ActivityCreateModelandActivityEditModel; bound byActivityCreate(ActivityCreate.razor.cs:70) andActivityDetail(ActivityDetail.razor.cs:71) through the sharedActivityFormFieldscomponent.
ISpeakerDetailLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerDetailLookupService.cs:25· Level 3 · interface
- What it is: a one-method composite lookup contract for the speaker detail page. One call gathers
the three display lookups that page needs before it can render a speaker: the category items assigned
to the speaker, the titles of the categories those items belong to, and the text of the questions the
speaker answered (
ISpeakerDetailLookupService.cs:25-30). The file also declares the payload record SpeakerDetailLookups (ISpeakerDetailLookupService.cs:14-17). - Depends on: SpeakerDetailLookups (the gathered shape),
CategoryItemInfo (carried inside it), the
CategoryItemIdentifierType/ConferenceCategoryIdentifierType/QuestionIdentifierTypealiases, and Result fromMMCA.Common.Shared.Abstractions(ISpeakerDetailLookupService.cs:2). - Concept introduced, the composite lookup that collapses a page's failure branches. The three
underlying lookups already exist as separate services, each shared with other pages. What this
contract adds is aggregation of the outcome: the doc comment records the shape it replaced, a page
that issued the three loads itself, carried three nullable caches, and repeated a failure branch for
each (
ISpeakerDetailLookupService.cs:19-24). Gathering them behind oneTask<Result<SpeakerDetailLookups>>gives the page a single point of failure to report and a single cache field to check.[Rubric §18, UI Architecture]assesses whether page code-behind stays a rendering concern rather than an orchestration one; here the orchestration moved down into a service and the page keeps oneif.[Rubric §15, Best Practices & Code Quality]assesses the cost of adding a fourth lookup later: it becomes one more member on the record plus one more step in the implementation, and no new branch on the page. The railway convention itself is taught at Result, and the UI-side branching helpers live on ResultUiExtensions. - Walkthrough: one member.
GetAllAsync(CancellationToken cancellationToken = default)(ISpeakerDetailLookupService.cs:30): returnsTask<Result<SpeakerDetailLookups>>. The contract states the failure rule explicitly, a failure in any one of the three loads fails the whole call (ISpeakerDetailLookupService.cs:27), and names the token's meaning, cancelled when the calling page is disposed (ISpeakerDetailLookupService.cs:28).
- Why it's built this way: the three sources stay independent services because other pages consume
them individually; only the composition is speaker-detail-specific, so only the composition gets a
new type. The implementation returns the first failure in item, category, question order, which is
what makes "one error to report" true rather than aspirational
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerDetailLookupService.cs:29-41). - Where it's used: implemented by SpeakerDetailLookupService,
registered scoped in the Conference UI composition root under a comment that repeats the rationale
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:68-70), and injected into exactly one page, SpeakerDetail (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDetail.razor.cs:29).
ISpeakerLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerLookupService.cs:17· Level 3 · interface
- What it is: the speaker display-enrichment contract. One call returns a speaker-keyed dictionary
of SpeakerInfo so a grid or detail page can turn the speaker ids on a session into
names and avatars without a request per row (
ISpeakerLookupService.cs:17-27). The same file declares the SpeakerInfo record it emits (ISpeakerLookupService.cs:9-12). - Depends on: SpeakerInfo, the
SpeakerIdentifierTypealias, and Result (ISpeakerLookupService.cs:1). - Concept: the bulk-then-index lookup, the same shape as
ICategoryItemLookupService and
IEventLookupService: fetch one flat collection once, project it into a
dictionary keyed by id, and let every consuming row do an O(1)
TryGetValueinstead of a fetch.[Rubric §23, Front-End Performance]assesses whether the front end avoids per-row network work; this contract is the shape that makes that possible.[Rubric §18, UI Architecture]assesses whether pages talk to typed services rather than raw HTTP; the page sees one method and no URL. - Walkthrough: two members.
GetAllAsync(CancellationToken cancellationToken = default)returningTask<Result<IReadOnlyDictionary<SpeakerIdentifierType, SpeakerInfo>>>(ISpeakerLookupService.cs:19-20). TheResultwrapper is what distinguishes this from a naive dictionary-returning helper: a transport fault or a failed response arrives as a failure the page can render, never as an empty dictionary that would look like "this event has no speakers".void Invalidate()(ISpeakerLookupService.cs:26): drops the implementation's memoized lookup so the nextGetAllAsyncrefetches. Its doc comment names the callers: the write services, after a successful create, update, delete or Sessionize refresh (ISpeakerLookupService.cs:22-25). That makes the contract stateful: a consumer may now see a cached answer, and a writer has a way to evict it.
- Why it's built this way: the enrichment payload is deliberately narrower than
SpeakerDTO, just id, full name and profile picture
(
ISpeakerLookupService.cs:9-12), so a change to the transport DTO that does not touch those three fields never reaches the consuming pages. - Where it's used: implemented by SpeakerLookupService and registered
scoped
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:64). Injected into SessionDetail (Pages/Session/SessionDetail.razor.cs:25), SessionList (Pages/Session/SessionList.razor.cs:26), PublicSessionList (Pages/Public/PublicSessionList.razor.cs:33), PublicSessionDetail (Pages/Public/PublicSessionDetail.razor.cs:25), and taken as a constructor argument by the SessionLookups helper that the session pages share (Pages/Session/SessionLookups.cs:31).
ISpeakerDashboardUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerDashboardUIService.cs:10· Level 3 · interface
- What it is: a bespoke, non-CRUD UI-service contract for a speaker's personalized dashboard: the
sessions the speaker presents, the bookmark counts for those sessions in one batched read, and
per-session feedback (
ISpeakerDashboardUIService.cs:10-40). It does not extendIEntityService<TEntityDTO, TIdentifierType>; it is its own read-only interface over the Conference contracts andResult<T>(ISpeakerDashboardUIService.cs:1-3). - Depends on: SessionDTO and
SessionFeedbackDTO, the
SpeakerIdentifierTypealias (aGuidin this module,MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:24) andSessionIdentifierType. - Concept introduced, a cache-bypassing personalized read.
[Rubric §23, Front-End Performance]and[Rubric §19, State Management](assess how the front end balances shared caching against read-your-writes freshness for a personalized view). The doc comment onGetSpeakerSessionsAsync(ISpeakerDashboardUIService.cs:12-17) is explicit and load-bearing: this read is fetched fresh, bypassing the shared sessions output cache, so a just-made speaker assignment is reflected immediately. Without the bypass, a read-populate-after-evict race on the output cache could leave a freshly assigned speaker seeing "no sessions". The contract, not just the implementation, is where that decision is written down; the implementation honors it with a unique_=cache-bust query parameter that makes this one read a guaranteed miss while public list reads keep their cache (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerDashboardService.cs:35-38). - Walkthrough: three read methods, all
SpeakerIdentifierType-scoped.GetSpeakerSessionsAsync(speakerId, ct)(ISpeakerDashboardUIService.cs:18-20): returnsTask<Result<IReadOnlyList<SessionDTO>>>, the speaker's sessions, uncached. The implementation filters server-side on the virtualSpeakerIdkey with a page size capped at 100 and no child collections (SpeakerDashboardService.cs:19,38).GetSessionBookmarkCountsAsync(speakerId, sessionIds, ct)(ISpeakerDashboardUIService.cs:27-30): returnsTask<Result<IReadOnlyDictionary<SessionIdentifierType, int>>>, every requested session's active bookmark count in a single request. The doc comment (:22-26) records that the dashboard never fans out per session, that only sessions assigned to the speaker come back, and that sessions with no bookmarks map to 0. It is the only bookmark-count member: there is no single-session variant on the contract. That is the[Rubric §12, Performance & Scalability]point in one signature: an N+1 of HTTP calls collapsed into one.GetSessionFeedbackAsync(speakerId, sessionId, ct)(ISpeakerDashboardUIService.cs:36-39): returnsTask<Result<SessionFeedbackDTO>>. Its doc comment (:32-35) states the modelling decision: "no feedback captured yet" arrives as an ErrorType.NotFoundfailure, not as a success carrying null, so the page tells that legitimate domain state apart from a real load failure (SpeakerDashboardService.cs:59-63).
- Why it's built this way: keeping these on a dedicated interface, rather than folding them into
ISessionUIService, isolates the cache-bypass semantics to the personalized
surface and keeps the generic session CRUD cache-friendly. It also keeps the speaker-scoped
authorization story simple: every method takes the speaker id explicitly, so the server has the
subject it needs to check ownership on every call
[Rubric §11, Security]. - Where it's used: implemented by SpeakerDashboardService
(
SpeakerDashboardService.cs:14-16) and registered explicitly atMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:38(an explicitAddScopedbecause it is not anIEntityService<,>and the assembly scan would not find it); injected into SpeakerDashboard (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDashboard.razor.cs:30), which calls all three methods (SpeakerDashboard.razor.cs:179,:218,:345).
ActivityCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityCreateModel.cs:11· Level 3 · class (sealed)
- What it is: the create page's binding target. It adds nothing to
ActivityFormModelexcept the mapping onto the DTO that gets posted. - Depends on:
ActivityFormModel(:11),ActivityDTOand theEventIdentifierTypealias (:1,19). - Concept introduced: none new. It is the create half of the shared-form-model pattern
ActivityFormModelteaches. - Walkthrough:
ToNew(EventIdentifierType eventId)(:19-32) is the only member. It sendsId = default(:22) and lets the server mint the key, setsStartTime/EndTimefrom the base's combinedStartsAt/EndsAt(:25-26), and stamps the owning event from the argument (:31).[Rubric §8, Data Architecture](assesses a deliberate identity strategy): compareSpeakerCreateModel, which mints its ownGuidclient-side because a speaker's key is a GUID rather than a server-assigned int. - Why it's built this way: the owning event is a create-time-only decision (the class doc says so at
:5-9), so it is a parameter of the mapping rather than a property on the shared base that the edit form would also have to bind. - Where it's used:
ActivityCreateholds one instance (ActivityCreate.razor.cs:70) and callsToNewon the save path (ActivityCreate.razor.cs:143).
ActivityEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityEditModel.cs:12· Level 3 · class (sealed)
- What it is: the detail page's inline-editor binding target: the same shared fields plus the two mappings an edit needs, load-from-record and build-the-update.
- Depends on:
ActivityFormModel(:12) andActivityDTO(:1). - Concept introduced, the edit buffer as a typed object. The older shape of these pages kept a row of loose
_edit*fields on the code-behind; folding them into a model class means the buffer has a name, the copy-in and copy-out are two methods rather than twenty assignments, and the same DataAnnotations that guard the create form guard the editor. The loadedActivityDTOis never mutated: cancelling an edit simply abandons this object.[Rubric §19, State Management & Data Flow](assesses where mutable state lives and how long it lives).ToUpdatedalso carries the concurrency token forward:RowVersion = activity.RowVersion(:45) is the client half of the optimistic-concurrency contract in ADR-035, so a stale editor loses the write instead of silently overwriting a newer one.[Rubric §8, Data Architecture]. - Walkthrough
LoadFrom(ActivityDTO)(:16-34): null-guards, then copies the ten editable values off the loaded record, splitting the two instants back into the four picker halves (:22-25).ToUpdated(ActivityDTO)(:38-56): rebuilds the DTO from the edited values over three preserved fields,Id(:44),RowVersion(:45) andEventId(:54). Preserving the event id here, rather than binding it, is what enforces the class doc's rule (:6-10) that moving an activity between events is a create plus a delete.
- Why it's built this way: an unmapped field is the failure mode of a hand-rolled edit form; keeping copy-in and copy-out adjacent in one small file makes the two halves reviewable against each other.
- Where it's used:
ActivityDetailholds one instance (ActivityDetail.razor.cs:71), seeds it inStartEditing(ActivityDetail.razor.cs:130) and postsToUpdatedfromSaveChangesAsync(ActivityDetail.razor.cs:184).
ISpeakerUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerUIService.cs:10· Level 4 · interface
- What it is: the UI-service contract for the
speakersresource, extending generic CRUD with two user-linking operations (ISpeakerUIService.cs:10-15). - Depends on: IEntityService<TEntityDTO, TIdentifierType>
bound to SpeakerDTO,
Result (
ISpeakerUIService.cs:2), and theSpeakerIdentifierType/UserIdentifierTypealiases (the second crosses into Identity's vocabulary as a scalar, never as a project reference). - Concept:
[Rubric §9, API & Contract Design], state-transition verbs over generic update, the same rationale as IEventUIService. Linking a speaker to a user account is a distinct operation, not a field edit, so it getsLinkUserAsync/UnlinkUserAsync.[Rubric §7, Microservices Readiness]assesses whether cross-module consistency travels over decoupled edges: the UI issues one call against Conference, and the Identity side of the association is reconciled asynchronously by theSpeakerLinkedToUser/SpeakerUnlinkedFromUserintegration events, so this contract deliberately says nothing about Identity.[Rubric §18, UI Architecture]. - Walkthrough: two added members, both returning Result.
LinkUserAsync(SpeakerIdentifierType speakerId, UserIdentifierType userId, CancellationToken)(ISpeakerUIService.cs:12).UnlinkUserAsync(SpeakerIdentifierType speakerId, CancellationToken)(ISpeakerUIService.cs:14); unlink needs only the speaker id, because the association is single-valued from the speaker's side.
- Why it's built this way: a valueless
Resultis the right return shape for a confirm-only call. There is no payload worth deserializing, but the failure still has to carry the server's ErrorType so the page can tell "already linked" from "not permitted". - Where it's used: implemented by SpeakerService; injected into
SpeakerList (
Pages/Speaker/SpeakerList.razor.cs:23), SpeakerDetail's link-to-user control (Pages/Speaker/SpeakerDetail.razor.cs:27), SpeakerCreate (Pages/Speaker/SpeakerCreate.razor.cs:17), SpeakerDashboard (Pages/Speaker/SpeakerDashboard.razor.cs:23) and the public speaker pages (PublicSpeakerList:42, PublicSpeakerDetail:22).
SpeakerDashboardService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerDashboardService.cs:14· Level 4 · class (sealed)
- What it is: the bespoke authenticated HTTP service behind the speaker's own dashboard. It exposes
three speaker-scoped reads: the sessions this speaker presents, how many attendees bookmarked each of
those sessions (one batched read), and the aggregated feedback for a session. It extends
AuthenticatedServiceBasedirectly rather than the CRUD base, and implementsISpeakerDashboardUIService(SpeakerDashboardService.cs:14-16). - Depends on:
AuthenticatedServiceBasefor its protectedSendRequestAsync<T>dispatch (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:171-189), which runs the call through the shared static PollyRetryPolicy(AuthenticatedServiceBase.cs:41,:185) insideHttpResultExecutor(:179) and reads the answer withProblemDetailsResultReader(:186);PagedCollectionResult<T>;SessionDTOandSessionFeedbackDTO;ITokenStorageService; theSpeakerIdentifierType/SessionIdentifierTypealiases; BCLIHttpClientFactory,CultureInfo.InvariantCulture,Guid. - Concept introduced, the server-filtered, cache-bypassing dashboard read. These are computed,
actor-scoped reads, not an entity surface, so the class drops to the thinner authenticated base and
hand-builds each request. Two mechanisms inside
GetSpeakerSessionsAsyncare load-bearing, and the inline comment block (SpeakerDashboardService.cs:25-34) explains both.- Filter on the server, not in memory. The URL sends
filters[SpeakerId].operator=equalsandfilters[SpeakerId].value={speakerId}(SpeakerDashboardService.cs:38), a virtual filter key.Sessionhas noSpeakerIdcolumn, soSessionsControllerremoves the key from the filter dictionary, parses it withTryParseunder the invariant culture, and resolves it through the SessionSpeaker join before ANDing the result with the public-session specification (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Sessions/SessionsController.cs:122-131, documented at:90-94). The request also asks forincludeFKs=false&includeChildren=falseand caps the page atMaxSpeakerSessions = 100(SpeakerDashboardService.cs:19,38). The comment records what this replaced: fetching the whole catalog with every child collection and filtering client-side.[Rubric §12, Performance & Scalability](assesses whether work happens where the data is; the predicate and the paging both run in the database) and[Rubric §23, Front-End Performance](assesses payload size on the wire; the dashboard renders no child collections, so it asks for none). - A deliberate cache bust. A unique
_={Guid:N}query parameter (SpeakerDashboardService.cs:35,38) makes this one read a guaranteed miss against the shared output cache. The reason is a read-populate-after-evict race: a read that began before a session assignment can populate the cache after the assignment's eviction fired, so the cached list lags a change the speaker just made and must see. Public and anonymous list reads keep their caching (SpeakerDashboardService.cs:31-34).[Rubric §19, State Management](assesses how the UI keeps what it shows consistent with the server, and at what cost). The bookmark counts are produced server-side from the Engagement service across the gRPC boundary (ADR-007); the UI sees only this one typed contract, which is what lets Engagement move without touching this file.[Rubric §7, Microservices Readiness].
- Filter on the server, not in memory. The URL sends
- Walkthrough
MaxSpeakerSessions = 100(SpeakerDashboardService.cs:19): an upper bound, on the stated reasoning that a conference speaker presents a handful of sessions (:18).GetSpeakerSessionsAsync(speakerId, ct)(SpeakerDashboardService.cs:21-43) mints the cache bust (:35), builds the paged URL withstring.Create(CultureInfo.InvariantCulture, ...)sortedStartsAt asc(:36-38), dispatches through the privateSendGetRequestAsync<T>into aPagedCollectionResult<SessionDTO>because the paged endpoint answers with an envelope rather than a bare array (:40-41), thenMaps the envelope to the item list, substituting an empty list for a nullItems(:42).Mapruns only on success and a failure passes through untouched, which is what makes the one-line projection safe.GetSessionBookmarkCountsAsync(speakerId, sessionIds, ct)(SpeakerDashboardService.cs:45-57) is the one bookmark read; there is no per-session count method. It short-circuits an empty id list into a successful empty dictionary with no round trip (:50-51), joins one repeatedsessionIds=parameter per id ontospeakers/{speakerId}/sessions/bookmarks/counts(:53-54), and maps the concreteDictionaryup to the read-only interface the caller declares (:55-56). One request for a whole grid instead of one per row.GetSessionFeedbackAsync(speakerId, sessionId, ct)(SpeakerDashboardService.cs:64-71) GETsspeakers/{speakerId}/sessions/{sessionId}/feedback(:69). "No feedback captured yet" is a legitimate domain state and arrives as anErrorType.NotFoundfailure, which the caller tells apart from a real load failure withIsNotFound(), as the doc comment states (:59-63). The typed error is the branch; there is no sentinel value to interpret.SendGetRequestAsync<T>(url, ct)(SpeakerDashboardService.cs:83-88) is the GET adapter every read goes through. It is one expression that hands a relative-URIGetAsyncto the inheritedSendRequestAsync<T>(:86-88). The base does the rest: it opens the authenticated client, runs the GET through the PollyRetryPolicy, and turns the response into aResult<T>withProblemDetailsResultReader, all insideHttpResultExecutor.ExecuteAsync(AuthenticatedServiceBase.cs:179-188).- Every URL is built with
string.Create(CultureInfo.InvariantCulture, ...)and every call leads withspeakerId, so the server scopes the read to the calling speaker rather than trusting a filter.[Rubric §11, Security](assesses whether authorization scope is enforced by the resource shape rather than by client-side filtering).
- Why it's built this way: aggregate dashboard reads fit neither the entity-CRUD nor the lookup shape, so they get their own narrow service. The cache bust trades one extra origin fetch for correctness on the one surface where staleness is unacceptable, while the anonymous public list keeps its output cache.
- Where it's used: registered explicitly as
ISpeakerDashboardUIServiceatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:38, and injected intoSpeakerDashboard, the speaker's "My Sessions" page (Pages/Speakers/SpeakerDashboard.razor.cs:30). - Caveats / not-in-source: the doc comment on
SendGetRequestAsync(SpeakerDashboardService.cs:73-82) still says the base does not carry aSendRequestAsyncand that the dispatch semantics therefore live here; the body now delegates to the base'sSendRequestAsync<T>(:86-88), so the code, not that comment, is the current account. The 100-session page cap (:19,38) is an upper bound, not a paging mechanism: a speaker with more sessions would silently see only the first 100.
SpeakerLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerLookupService.cs:29· Level 4 · class (sealed)
- What it is: a read service that fetches every speaker and builds a speaker-keyed lookup
dictionary (
SpeakerIdentifierTypetoSpeakerInfo), so pages holding raw speaker ids can render display names and profile pictures (SpeakerLookupService.cs:29-88). It memoizes that lookup per DI scope for five minutes (SpeakerLookupService.cs:39). It implementsISpeakerLookupService. - Depends on:
SpeakerInfo, the three-field projection it emits (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/ISpeakerLookupService.cs:9-12);SpeakerDTOas the wire shape;PagedCollectionResult<T>;PagedReadAllfor the page loop and the page URL;IdempotentReadRetryfor the GET;HttpResultExecutorandProblemDetailsResultReader; BCLIHttpClientFactory.ScopedMemo<T>holds the per-scope memo (SpeakerLookupService.cs:41-42), and BCLTimeProvideris handed to it as the clock for the memo's expiry (SpeakerLookupService.cs:29,:42). Note what is absent: the primary constructor takes onlyIHttpClientFactoryandTimeProvider(SpeakerLookupService.cs:29), with noITokenStorageServiceand noAuthenticatedServiceBasebase. This is an unauthenticated public read. It still gets that base's Polly retry, but by composition:IdempotentReadRetry.Policyis the sameAuthenticatedServiceBase.SharedRetryPolicyobject (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/IdempotentReadRetry.cs:24). - Concept introduced, the client-side denormalizing lookup. Session and event pages hold speaker
ids but must show speaker names. Rather than issue one fetch per referenced speaker, this service
pulls the whole speaker set in a short run of 500-row pages and hands back an in-memory dictionary the
page indexes locally; the doc comment states exactly that use (
SpeakerLookupService.cs:8-11). The second idea is the per-scope single-flight memo, the same shape asEventLookupService(remarks,SpeakerLookupService.cs:12-28). The memo is the framework'sScopedMemo<T>, held in one field (_memo,:41-42): concurrent callers in one scope share one in-flight fetch and only a successful read is kept (remarks,:18-20). The public session list and detail pages both read the full speaker list, so without the memo an attendee moving between them on conference day would pay one identical read per navigation, each counted against the gateway's per-client-IP window that a whole venue Wi-Fi shares (remarks,:15-18). It is per scope rather than per process because the payload is role-dependent (BR-239: a privileged caller sees speakers the public projection hides), so it must never be shared across users (:23-26).[Rubric §23, Front-End Performance](assesses whether a view avoids N per-item round trips; one paged sweep serves a whole grid).[Rubric §9, API & Contract Design]shows up in the URLPagedReadAll.LookupPageUrlbuilds:speakers/paged?...&pageSize=500&sortColumn=Id&sortDirection=asc&includeFKs=false&includeChildren=false(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:48-51). The stable id order keeps consecutive pages from skipping or repeating a row, and the twoincludeflags ask for the flat rows only, so the bulk read stays cheap on both ends. The dictionary is keyed by the identifier alias rather than a bare primitive, which is what makes a wrong-id lookup a compile error (ADR-048). - Walkthrough
GetAllAsync(ct)(SpeakerLookupService.cs:47-49) is a memo front, not the fetch itself: one expression returning_memo.GetAsync(cancellationToken). The memo reuses an in-flight fetch (single-flight) or a completed one still inside its time-to-live, and otherwise starts a new fetch (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/ScopedMemo.cs:78-87). The shared fetch runs WITHOUT the caller's token; a cancelable caller token is applied withentry.WaitAsync(token)instead (ScopedMemo.cs:89), so a page disposing mid-load abandons only its own await and never cancels the fetch other callers share.Invalidate()(SpeakerLookupService.cs:45) forwards to_memo.Invalidate(), which bumps a generation counter and drops the cached entry; an in-flight fetch completes unobserved (ScopedMemo.cs:96-101). The memo stamps the expiry only when theResultsucceeded and the generation is still current (ScopedMemo.cs:105-113), so a faulted, canceled or failed read expires at once and a fetch a write superseded cannot stamp the entry that replaced it.CacheTtlis five minutes (SpeakerLookupService.cs:39), matched to the server's "SpeakersCache" output-cache policy (:32-38); a privileged reader bypasses that server cache, which is why the write services callInvalidate.FetchAsync(httpClientFactory)(:51-74) is a private static the memo calls with no caller token (comment,:51). The inline comment (:55-56) names why it pages: the GET-all endpoint ignorespageSizeand stops silently at the API's maximum page size. It handsPagedReadAll.ReadAllAsynca per-page delegate (:57-71), every token argumentCancellationToken.None. Each page runs insideHttpResultExecutor.ExecuteAsync(:58), so a dead network becomes a transport failure rather than a thrown exception. The delegate resolves the named"APIClient"client from the factory (:61), GETsLookupPageUrl("speakers", pageNumber)throughIdempotentReadRetry.GetAsync(:62-65), which re-sends on a transient failure up to three times with exponential backoff (IdempotentReadRetry.cs:10-12), and reads the response into aResult<PagedCollectionResult<SpeakerDTO>>throughProblemDetailsResultReader(:67-68).ReadAllAsyncloops pages from 1, stopping on an empty page or once the accumulated count reaches the reportedTotalItemCount, and returns the first failing page's errors unchanged (PagedReadAll.cs:66-96). The method thenMaps the accumulatedList<SpeakerDTO>throughBuildLookup(SpeakerLookupService.cs:73). Mapping rather than unwrapping is the point: the projection runs only on success, and an API-described failure travels out with itsErrorTypeintact. Beingstaticand taking the factory as a parameter, the fetch touches no instance state; the memo owns all of it.BuildLookup(speakers)(SpeakerLookupService.cs:76-87) is a private static taking the flattenedList<SpeakerDTO>; the null-Itemsguard lives inReadAllAsync(PagedReadAll.cs:84). It fills aDictionary<SpeakerIdentifierType, SpeakerInfo>withId,FullNameandProfilePictureper speaker (SpeakerLookupService.cs:80-84) and returns it as anIReadOnlyDictionary(:86). Beingstaticis not decoration: it proves the projection touches no instance state, so it reads in isolation.
- Why it's built this way: one paged sweep plus a local index is far cheaper than per-id lookups when
a page renders many speaker references, and the projection to
SpeakerInfokeeps only the three display fields the UI needs rather than the fullSpeakerDTO, so what a page holds in memory stays small. Paging to the reported total, instead of asking for one oversized page, is the only route that does not truncate silently at the API's page-size clamp (PagedReadAll.cs:11-16). - Where it's used: registered as
ISpeakerLookupServiceamong the "cross-module lookup services" (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:64), and injected intoSessionList(Pages/Sessions/SessionList.razor.cs:29),SessionDetail(Pages/Sessions/SessionDetail.razor.cs:30, passed on toSessionLookupsat:58, whose constructor takes it atPages/Sessions/SessionLookups.cs:34),PublicSessionList(Pages/Public/Sessions/PublicSessionList.razor.cs:35) andPublicSessionDetail(Pages/Public/Sessions/PublicSessionDetail.razor.cs:25). The Conference service'sSelfHttpOutputCacheWarmupTaskreplays this service's first page URL as a literal (MMCA.ADC/Source/Services/MMCA.ADC.Conference.Service/SelfHttpOutputCacheWarmupTask.cs:56), so the output cache is warm for it. - Caveats / not-in-source:
ReadAllAsyncstops after 40 pages of 500 (20,000 rows) whatever the server reports (PagedReadAll.cs:21,:29-33), and then fails withTruncatedCode(PagedReadAll.Truncated,:27) rather than returning a partial list (:98-104), so a speaker set past that surfaces as a failed lookup, not a silently short one. The warm-up literal must matchLookupPageUrlbyte for byte (PagedReadAll.cs:38-39); a change to the URL format silently turns the warm-up into a miss. The service is registered Scoped in both heads, which is the lifetime the memo requires (remarks,SpeakerLookupService.cs:25-26), so the class must stay Scoped. A write made outside this scope (another organizer, or a Sessionize refresh the caller did not trigger) is not seen until the five-minute TTL lapses, becauseInvalidateis only called by this scope's own write services. This class sends no token itself, so what the payload contains depends on the named"APIClient"configuration and the server's role-dependent projection (BR-239), not on anything here.
SpeakerDetailLookupService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerDetailLookupService.cs:13· Level 5 · class (sealed)
- What it is: a composite read service that gathers the three display lookups the speaker detail
page needs (the category items a speaker can be tagged with, the titles of the categories those
items belong to, and the text of the questions a speaker answered) behind one call, answering with a
single
Resultthat carries either all three or the first failure (SpeakerDetailLookupService.cs:13-47). It implementsISpeakerDetailLookupServiceand its success value is theSpeakerDetailLookupsrecord. - Depends on: three services injected through the primary constructor
(
SpeakerDetailLookupService.cs:13-17):ICategoryItemLookupService(implemented byCategoryItemLookupService),IConferenceCategoryUIServiceandIQuestionUIService, the last two being plainIEntityService<TEntityDTO, TIdentifierType>CRUD contracts (IConferenceCategoryUIService.cs:9-11,IQuestionUIService.cs:9-11). AlsoResultand itsMap(MMCA.Common/Source/Core/MMCA.Common.Shared/Abstractions/Result.cs:285-289), theTryGetValueextension fromResultUiExtensions(MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ResultUiExtensions.cs:104),CategoryItemInfo,ConferenceCategoryDTOandQuestionDTO. - Concept introduced, the composite lookup service. Most Conference pages load their reference data
one service at a time, and every extra load costs the page a nullable cache field, a call site and a
failure branch. A composite lookup collapses that into one interface, one call, one value object and
one failure branch. The load-bearing detail is that it composes, it does not replace: each
underlying lookup keeps its own service because other pages use them independently, and this class
holds no state and no cache of its own (
SpeakerDetailLookupService.cs:13-18declares nothing but the three injected dependencies).[Rubric §1, SOLID](assesses whether a type has one reason to change): the page's job is rendering, and the gathering of its reference data now lives in one substitutable class, so a fourth lookup is a change here rather than a fourth branch in the page.[Rubric §18, UI Architecture](assesses how presentation is layered above data access): the page depends on one narrow interface instead of three.[Rubric §2, Design Patterns](assesses whether a recognized pattern is applied where it earns its keep): this is a facade over three collaborators, deliberately thin enough that it adds no behavior beyond running the reads together and choosing which failure to report. - Walkthrough (
SpeakerDetailLookupService.cs:20-47, one method)GetAllAsync(cancellationToken)starts all three reads before awaiting any of them:categoryItemLookupService.GetAllAsync(cancellationToken),categoryService.GetAllAsync(cancellationToken: cancellationToken)andquestionService.GetAllAsync(cancellationToken: cancellationToken)(:24-26), thenawait Task.WhenAll(...)over the three tasks (:27). The inline comment (:22-23) states why: the reads are independent, so they run side by side, and awaiting them afterwards in a fixed order keeps the first-failure precedence. The named argument on the two entity-service calls is required because the contract's first two parameters are theincludeFKsandincludeChildrenflags (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/Interfaces/IEntityService.cs:25-28), so those calls take both defaults and ask only for the flat rows.- The category items are inspected first:
await itemsTask(:29), unwrap with theTryGetValueUI extension (:30), and on failure re-wrap the errors into a failure of the composite type,Result.Failure<SpeakerDetailLookups>(itemsResult.Errors)(:32), so the error list travels intact and nothing is invented at this layer. - The categories repeat the shape:
await categoriesTask(:35), unwrap (:36), propagate errors (:38). - The questions are last, so they need no early return:
await questionsTask(:41), thenquestionsResult.Map(...)(:43) either projects the success value or passes the errors through unchanged (Result.cs:285-289). - The projection builds the
SpeakerDetailLookupsrecord (:43-46). The category-item dictionary arrives already keyed fromICategoryItemLookupService(ICategoryItemLookupService.cs:20-21), while the other two are lists indexed here:categories.ToDictionary(c => c.Id, c => c.Title)(:45) andquestions.ToDictionary(q => q.Id, q => q.QuestionText)(:46). Both projections keep only the single display string the page renders, so the DTOs do not travel further into the UI.
- Why it's built this way: the three loads are a set, not three independent concerns, because the
page cannot render its category panel or its answers section until all three are present. Making
them one call means one place decides the order and one place decides what a partial failure means,
and here that decision is strict: a failure in any one of them fails the whole call
(
ISpeakerDetailLookupService.cs:27-30). ReturningResultrather than throwing follows the framework-wide error contract (ADR-013). - Where it's used: registered explicitly rather than by the entity-service scan, because it
implements no
IEntityService<,>:services.AddScoped<ISpeakerDetailLookupService, SpeakerDetailLookupService>()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:70). Its one consumer isSpeakerDetail, which injects it (Pages/Speakers/SpeakerDetail.razor.cs:29), holds the value in a single nullable field for the life of the page (SpeakerDetail.razor.cs:75), calls it once inside the guarded load when that field is still null (SpeakerDetail.razor.cs:119), rendersQuestionTextsthroughGetQuestionText(SpeakerDetail.razor.cs:179-180) and handsCategoryItemsplusCategoryTitlestoSpeakerCategoryItemsPanel(Pages/Speakers/SpeakerDetail.razor:169-172). The interface is also whatSpeakerDetailTestsmocks (MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Speakers/SpeakerDetailTests.cs:36), which is the practical payoff of the facade: oneMock<ISpeakerDetailLookupService>stands in for three collaborators.[Rubric §14, Testability](assesses whether collaborators can be substituted at a narrow boundary). - Caveats / not-in-source: the three loads run concurrently under one
Task.WhenAll(:27), so the page waits for the longest of the three round trips rather than their sum.[Rubric §23, Front-End Performance](assesses how much latency the first render waits on). The consequence of running them together is that all three requests are always made: a category-item failure no longer saves the other two calls, it only decides which error is reported, and the page still reports one cause even when several are broken.ToDictionary(:45-46) throws on duplicate keys and nothing here guards that; uniqueness comes from the server, since both keys are entity primary keys. Nothing in this class caches: the "cached for the life of the page" behavior is the page's own null check on its field (SpeakerDetail.razor.cs:119), not something this service does.
SpeakerService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Speakers/SpeakerService.cs:18· Level 5 · class (sealed)
- What it is: the concrete HTTP service for the
speakersWebAPI resource. It inherits the whole CRUD surface fromEntityServiceBase<TEntityDTO, TIdentifierType>, overrides the three write verbs (AddAsync,UpdateAsync,DeleteAsync) to evict the scope's memoized speaker lookup after a success, and adds the two operations specific to speakers: linking a user account to a speaker record and unlinking it again (SpeakerService.cs:18-73). It implementsISpeakerUIService. - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>and, through it,AuthenticatedServiceBase; the base'sEndpointproperty (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/EntityServiceBase.cs:42) and the valuelessSendRequestAsyncoverload it inherits fromAuthenticatedServiceBase(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:201-217);ITokenStorageService;SpeakerDTO;LinkUserRequest;ISpeakerLookupService, whoseInvalidate()it calls (SpeakerService.cs:21,:69);ISpeakerUIService;Result; theSpeakerIdentifierTypeandUserIdentifierTypealiases; BCLIHttpClientFactoryandSystem.Net.Http.Json(SpeakerService.cs:1-5). - Concept: the thin-leaf CRUD service is taught at
ActivityService; this is that shape plus a two-method extension, and the extension is the standard recipe for adding a non-CRUD verb to an entity service. Build the relative URI from the inheritedEndpointso the resource name still lives in exactly one place, and dispatch through the base's protectedSendRequestAsyncinstead of anHttpClientof your own, which is what buys the call the authenticated client, the Polly retry pipeline and theResultconversion throughProblemDetailsResultReader(AuthenticatedServiceBase.cs:201-217).[Rubric §9, API & Contract Design](assesses whether the client speaks the server's contract exactly rather than an assumed one): link is aPUTto{id}/linkcarrying aLinkUserRequestbody and unlink is aDELETEto the same path, which is precisely what the controller declares (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Speakers/SpeakerLinksController.cs:43,:59).[Rubric §2, Design Patterns](assesses use of template-method style bases): the subclass supplies only what varies, the resource name and the two extra verbs. - Walkthrough
- The primary constructor takes
IHttpClientFactory,ITokenStorageServiceandISpeakerLookupService; the first two are forwarded with the resource name to the base:EntityServiceBase<SpeakerDTO, SpeakerIdentifierType>("speakers", httpClientFactory, tokenStorageService)(SpeakerService.cs:18-23). The lookup service is held only for eviction. The base takes exactly those three arguments and holds no client-side read cache (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/EntityServiceBase.cs:35-38), so every read here goes to the API. AddAsync,UpdateAsyncandDeleteAsync(SpeakerService.cs:26-29,:33-36,:39-42) are expression-bodied overrides that await the base call and pass its result through the private genericInvalidateOnSuccess<TResult>(:64-73), constrained toResult. OnIsSuccessit callsspeakerLookup.Invalidate()(:67-70); a failure leaves the memo alone. The class remarks say why it matters: organizers who write bypass the server's output cache, so the client memo was the only thing that would keep a new speaker out of the pickers and render a deleted one as present. Link and unlink do not change the lookup's rows, so they do not evict.LinkUserAsync(speakerId, userId, cancellationToken)(SpeakerService.cs:43-52): calls the valuelessSendRequestAsyncwith a lambda thatPutAsJsonAsynces anew LinkUserRequest { UserId = userId }tonew Uri($"{Endpoint}/{speakerId}/link", UriKind.Relative)(:49-52). The URI is relative because the base resolves the named API client, and its configured base address, insideCreateAuthenticatedClientAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:73-75), which is also where the bearer token is attached (AuthenticatedServiceBase.cs:79-83). The interpolatedspeakerIdis culture-safe becauseSpeakerIdentifierTypealiasesSystem.Guid(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:24, ADR-048).UnlinkUserAsync(speakerId, cancellationToken)(SpeakerService.cs:54-61): the same dispatch withDeleteAsyncagainst the identical path and no body (:59-61). Both methods return theResultthe base produced, success for any 2xx and otherwise the errors the ProblemDetails response described (AuthenticatedServiceBase.cs:200-217); the server answersNoContenton both success paths (SpeakerLinksController.cs:57,:73).- Neither call passes an
idempotencyKeyor anifMatch, both optional parameters of that overload (AuthenticatedServiceBase.cs:201-205). That matches the contract the base documents: a key is for non-idempotent writes (creates, and updates so a replayed attempt is answered from the stored outcome) and is left null for naturally idempotent writes, and link and unlink are aPUTand aDELETEwhose repetition lands on the same state (AuthenticatedServiceBase.cs:155-160, ADR-017).
- The primary constructor takes
- Why it's built this way: linking a user to a speaker is a relationship operation, not a field
edit, so it is its own endpoint rather than a
PUTof the wholeSpeakerDTO, and the client mirrors that. Keeping the two methods on the subclass, and onISpeakerUIServicewhich extends the generic contract (ISpeakerUIService.cs:10-15), means pages doing plain CRUD never see them while the organizer page that needs them gets them without a cast. - Where it's used: registered by the assembly scan inside
AddUIModule<ConferenceUIModule>()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30, which scans the module assembly forIEntityService<,>implementations atMMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:493-497), so no explicitAddScopedline exists for it. Injected asISpeakerUIServiceintoSpeakerList(Pages/Speaker/SpeakerList.razor.cs:23),SpeakerDetail(Pages/Speaker/SpeakerDetail.razor.cs:27),SpeakerCreate(Pages/Speaker/SpeakerCreate.razor.cs:17),SpeakerDashboard(Pages/Speaker/SpeakerDashboard.razor.cs:23),PublicSpeakerList(Pages/Public/PublicSpeakerList.razor.cs:42) andPublicSpeakerDetail(Pages/Public/PublicSpeakerDetail.razor.cs:22). The two link verbs have exactly one caller each, both onSpeakerDetail(SpeakerDetail.razor.cs:302and:327). - Caveats / not-in-source: the only client-side state this service evicts is the speaker lookup
memo, through its own private generic
InvalidateOnSuccess(SpeakerService.cs:63); the base keeps no read cache to evict (EntityServiceBase.cs:35-38), so the two link verbs here evict nothing on the client. The server-side output cache is evicted by the controller itself on both paths (SpeakerLinksController.cs:56,:72, ADR-040). Authorization for both endpoints is enforced server side with[HasPermission(ConferencePermissions.SpeakersManage)](SpeakerLinksController.cs:42,:60, ADR-020): the client sends the bearer token and reports whatever the server decides.
ActivityDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityDetail.razor.cs:21· Level 6 · class (Blazor code-behind)
- What it is: the organizer's activity record page. It loads one activity by route id, inline-edits every field except the owning event, and deletes with confirmation (class doc,
:14-18). - Depends on:
DetailPageBase(ActivityDetail.razor:7), which suppliesPageToken,IsEditing/IsDirtyand theBeginEdit/EndEdittransitions plus disposal of its ownCancellationTokenSource. AlsoIActivityUIService(:25),IEventLookupServicereturningEventInfo(:26,66),IToastService(:28),ActivityEditModel(:71),ActivityDTO(:67),CommittedWriteReload(:74),ModelValidationwithDataAnnotationsModelValidator(:62),ErrorMessages(:180,186), andConferenceRoutePaths(:57,258), plus the sharedDeleteConfirmationcomponent (:78). Through the base it also uses the load-state pairBeginLoad()/CompleteLoad(generation, result)(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:48,67), which drive the protectedDetailLoadStatepropertyLoadState(DetailPageBase.cs:41) over aLatestLoadGuardexposed asLoadGuard(DetailPageBase.cs:34). Externals:System.Globalization, MudBlazor'sMudForm, and theIStringLocalizer<ActivityDetail>from the template. - Concept introduced, culture-formatted display and the field that is deliberately not editable. The detail-page mechanics are the ones
SpeakerDetailteaches (load-once guard on_loadedId,:84-93; edit buffer; confirm-then-delete). This page extendsDetailPageBase(ActivityDetail.razor:7) for the load state, the edit-lifecycle plumbing and theCancellationTokenSource; it declares noIsLoading,_ctsor_isEditingfield of its own, andStartEditingAsyncandCancelEditing/SaveChangesAsynccall the base'sBeginEdit()/EndEdit()(:144,155,232) instead of setting flags directly. Four things are specific here.- Two computed display properties.
EventName(:37-40) resolves the activity'sEventIdagainst the lookup and falls back to the invariant-culture id, so the read-only event line never renders blank.TimeRange(:43-49) formats the window as one localized sentence by passing the start ("f", full date and time) and the end ("t", short time) rendered inCultureInfo.CurrentCultureinto theText.TimeRangeresource; the joining wording lives in the.resx, not in the code, so a locale can reorder or reword the range.[Rubric §27, Internationalization](assesses whether user-visible text and formats follow the request culture, ADR-027). - The immutable field on an editable record.
ActivityEditModelhas no event property and re-sendsEventIdfrom the loaded record, so this form cannot even express a move between events, which is the rule the class doc states (:15-17).[Rubric §24, Forms, Validation & UX Safety]. - A stale-response guard on the load, with the outcome stated by the page body.
LoadAsyncopens withvar (token, generation) = BeginLoad()(:98), which supersedes any load already in flight, puts the base'sLoadStateback toLoading, and hands back that load's own token and generation number (DetailPageBase.cs:48-53). The fetch result then goes throughCompleteLoad(generation, result)(:106): a superseded generation returnsfalseand leaves the page state alone, so a slow response for a previous route id cannot overwrite the record a newer navigation loaded; a current failure setsLoadStatetoNotFoundorFailed(DetailPageBase.cs:71-83). The page raises no toast for either: the comment (:104-105) records that the body (DetailLoadStateContent, with Retry for a failure) states a not-found or failed load.[Rubric §29, Resilience & Business Continuity]. - A committed write whose reload fails. The page holds a
CommittedWriteReload(:73-74, tagged M246 in the source). AfterUpdateAsyncsucceeds the update is committed, so the edit ends even if the re-fetch fails: a failed reload no longer returns early with the form still open. Entering edit mode also goes through the helper (seeStartEditingAsyncbelow), so a record left stale by a failed reload is re-read before the next edit begins.[Rubric §19, State Management]. The window check reappears here asValidateSchedule(:163-168), which asks the model's sharedScheduleErrorKey()and localizes the key it answers into_scheduleError(:165-167), exactly asActivityCreatedoes. The rule itself lives once onActivityFormModel, so the create and edit paths validate a window identically by construction; each page keeps only the two lines that turn the key into its own message.[Rubric §15, Best Practices & Code Quality].
- Two computed display properties.
- Walkthrough
OnInitialized(:51-63): breadcrumbs plus the validation delegate.OnParametersSetAsync(:84-93, a non-asyncmethod that returnsTask.CompletedTaskor theLoadAsynctask directly) thenLoadAsync(:95-125): begin the guarded load (:98), fetch with children through the guard'stoken(:102), and return unlessCompleteLoadreports a current success and the value unwraps (:106-109), which covers a superseded, not-found or failed load without a toast. It then adopts the activity (:111) and hydrates the event lookup once, again throughtoken(:115-119), with the comment noting that a failed lookup is reported throughNotifyOnFailureand stops the load exactly as it did when the same failure arrived as an exception (:113-114). AnOperationCanceledExceptionis swallowed (:121-124); there is nofinally, since the base owns the load state.StartEditingAsync(:127-150): asynchronous. It captures the shown record, then asks_writeReload.EnsureCurrentAsync(:136) to re-read it throughGetByIdAsync(shown.Id, true, PageToken)when a prior reload failed, and returns without entering edit mode if no current record comes back. Otherwise it adopts the current record, seeds the edit model from it, clears_scheduleErrorand calls the base'sBeginEdit()(:144). AnOperationCanceledExceptionis swallowed as the expected disposal case (:146-149).CancelEditing(:152-156): clears_scheduleErrorand calls the base'sEndEdit()(:155) so neither a stale cross-field error nor the unsaved-changes guard can fire after a cancel.SaveChangesAsync(:170-225): validate the form (:177-182), runValidateScheduleand toast its message on a refusal (:184-188), post_model.ToUpdated(Activity)(:193), then re-fetch (:201). Save and re-fetch run on the base'sPageToken, not on the load guard. The reload has two handled outcomes and a silent third.IsNotFound()setsActivityto null and toasts success (:202-208, with the comment recording that this matches the previous null answer). A value is adopted through_writeReload.TryAdopt(reloaded, Toast, L["Snackbar.SavedRefreshFailed"], out var refreshed)(:209), which refreshes the page and toasts success (:211-212). WhenTryAdoptdeclines, it has already reported the failure with the saved-but-refresh-failed message, and the page keeps the old record. In every caseEndEdit()runs (:215), because the update committed (M246 comment,:200).DeleteActivityAsync(:227-256): confirm through_deleteConfirm.ShowAsync(Activity.Name)(:234), which answers a plainbool(MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), return when it isfalse(:235), delete, toast, and navigate back to the list (:249-250,NavigateToListat:258).- No disposal code remains on the page itself:
DetailPageBaseowns theCancellationTokenSourceand its guardedDispose(bool)pair, soActivityDetailno longer declaresIDisposable.
- Why it's built this way: an activity is a per-event programme item, so its name, window, order and venue are freely editable while its owning event is not. The re-fetch after save keeps the concurrency token current for the next edit, and handling the reload's not-found branch means a record deleted by someone else mid-edit resolves to the same not-found body the page shows on a bad id: the template maps a loaded state with a null
ActivitytoDetailLoadState.NotFound(ActivityDetail.razor:17-20). - Where it's used: the
/activities/{Id:int}route gated by[HasPagePermission(ConferencePermissions.ActivitiesManage)](ActivityDetail.razor:1-2; seeHasPagePermissionAttributeandConferencePermissions), reached fromActivityListrows and fromActivityCreate's success redirect. It edits the aggregate theActivityentity models.
ActivityCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityCreate.razor.cs:16· Level 9 · class (Blazor code-behind)
- What it is: the organizer and content-editor form that schedules an activity, meaning the non-session items on a programme (registration, breaks, receptions, after-parties). It collects the name, the owning event, the start and end of the window as separate date and time pickers, the display order, and an optional off-site venue (class doc,
:10-15). - Depends on:
CreatePageBase(ActivityCreate.razor:8), which suppliesToast,Form,IsSaving,IsDirty,SaveResult,MarkDirtyandSubmitAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:24-39,53) and, throughCancellablePageBase, the disposal-safePageToken(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CancellablePageBase.cs:27). AlsoCreateSubmitOptions(:195),IActivityUIService(:18),IEventLookupServicereturningEventInfo(:19,67),ActivityCreateModel(:70),EventInfoDefaults(:56, which wrapsCurrentEventSelector),ModelValidationwithDataAnnotationsModelValidator(:38),ConferenceRoutePaths(:33,193,197), andErrorMessages(:180,183). Externals:NavigationManager(:20),TimeProvider(:21), MudBlazor'sMudForm(bound as@ref="Form") andBreadcrumbItem, and theIStringLocalizer<ActivityCreate>from the template (ActivityCreate.razor:7). - Concept introduced, the cross-field rule that lives outside the form. Every other rule on this page is declared on
ActivityFormModeland executed by MudBlazor through the shared_validatedelegate. The schedule window cannot be: no DataAnnotation states "end after start" across four controls.ValidateSchedule(:165-170) therefore asks the model's sharedActivityFormModel.ScheduleErrorKey()(the same rule the detail page's editor asks) and puts the localized message for the key it answers in_scheduleError(:168) instead of the form's error list, and the markup renders that string in its ownMudAlertabove the shared error summary (ActivityCreate.razor:32-35, summary at:43). A cross-field failure therefore reads like every other validation error to the organizer even thoughMudFormknows nothing about it.[Rubric §24, Forms, Validation & UX Safety](assesses whether a form can express only legal input and explains a rejection in place): the check runs as the base's pre-check, after the form validates and before anything is posted (PreCheckCreate,:176-184;CreatePageBase.cs:75-80), and the snackbar quotes the specific message rather than a generic one (:183, toasted atCreatePageBase.cs:78). The second idea is the two-stage smart default, which removes the two most common clicks without hiding either field.- The event picker is seeded by
EventInfoDefaults.SelectCurrentOrNextIdagainstTimeProvider.GetUtcNow().UtcDateTime(:56), rather than the weaker "auto-select when exactly one exists" rule. That helper is the accessor triple overCurrentEventSelector.SelectCurrentOrNextwritten once (each event's start date, end date and IANA time zone,EventInfoDefaults.cs:20-30), so the organizer create pages pick their default event the same way (EventInfoDefaults.cs:5-10); it answersnullwhen the lookup failed or there is no event to pick. The clock is the injectedTimeProvider(:21), not the staticDateTime.UtcNow, so "current or next" is a dependency a test can control. The event stage uses??=(:56), so an event already set is kept, and the choice is remembered in_defaultEventId(:57, field:80). ApplyEventDateDefaults(:139-158) then seeds both date pickers with the selected event's first day (:146-155), and re-runs on every event change throughOnEventSelected(:123-127). It remembers the day it last seeded in_seededDay(:133, set at:157), and overwrites a picker only when it is empty or still holds that seeded day (:147,:152). So an untouched date follows the next event the organizer picks, while a date the organizer chose is kept (doc,:135-138).[Rubric §24, Forms, Validation & UX Safety]. The event lookup is explicitly non-critical (comment,:47-48): a failed load leaves the picker empty and the required-event check inPreCheckCreate(:178-181) guides the user, rather than blocking the page.[Rubric §29, Resilience & Business Continuity]. The third idea is the seeded form is not a dirty form. The defaults above land after the first render and echo back through the pickers' change notifications, so a naive "any change marks dirty" rule would prompt about unsaved changes on a form the user never touched (doc,:82-87). The field block raisesOnFieldChanged(ActivityFormFields.razor:116,139; wired atActivityCreate.razor:27) intoOnFormFieldChanged(:88-94), which calls the base'sMarkDirtyonly whenIsAsSeeded(:100-107) is false: the event still equals_defaultEventId, every text field is empty (AreTextFieldsEmpty,:109-114), both dates are empty or the seeded day (IsSeededOrEmpty,:116), both times are unset and the sort order is0. Cancel on an untouched form therefore leaves without theUnsavedChangesGuardprompt (ActivityCreate.razor:12).[Rubric §24, Forms, Validation & UX Safety]. The fourth idea is the shared create pipeline.CreateActivityAsync(:188-195) is one call to the base'sSubmitAsync, passing the save (ActivityService.AddAsync(_model.ToNew(_eventId!.Value), ct),:189), the success step (toast and navigate,:192-193) andnew CreateSubmitOptions { Localizer = L, PreCheck = PreCheckCreate }(:195). The base owns everything the page used to repeat: it ignores a submit with no form or one already saving (CreatePageBase.cs:61-64), clearsSaveResultand validates (:67-73), runs the pre-check (:75-80), saves onPageToken(:85), on success clearsSaveResultandIsDirtybefore calling the success step (:86-91), on failure keeps the result for the template'sErrorSummary(ActivityCreate.razor:43) and toasts it throughNotifyOnFailurewith the page's localizer (CreatePageBase.cs:94-98), swallowsOperationCanceledException(:102-105), and always clearsIsSaving(:106-109). The page holds noCancellationTokenSourceand no dispose code of its own:CancellablePageBasecancels and disposes its source exactly once and returns an already-cancelled token after dispose (CancellablePageBase.cs:16-27). See ADR-146.[Rubric §15, Best Practices & Code Quality],[Rubric §29, Resilience & Business Continuity].
- The event picker is seeded by
- Walkthrough
OnInitialized(:27-39): three breadcrumbs, then the validation delegate over_model(:38).OnInitializedAsync(:41-65): loads the events throughPageToken(:49), resolves and records the default event (:56-57), applies the date defaults (:59), and swallowsOperationCanceledExceptionas the expected disposal or InteractiveAuto transition outcome (:61-64, ADR-056).PreCheckCreate(:176-184): a missing event answers withErrorMessages.ValidationError(:180); otherwiseValidateScheduledecides, and its specific message is returned on failure (:183).CreateActivityAsync(:188-195): theSubmitAsynccall above; on success it toastsSnackbar.Createdand routes toConferenceRoutePaths.ActivityDetails(created.Id)(:192-193) using the key the server assigned.NavigateToList(:197): the Cancel button's target (ActivityCreate.razor:52).
- Why it's built this way: an activity belongs to exactly one event and its schedule is a window rather than a point, so the form's job is to make the window easy to enter and impossible to invert. Defaulting the event and both dates from the selected conference removes the routine clicks, comparing against those defaults keeps them from counting as edits, and keeping the window check in the page's pre-check lets one message name the actual problem (a missing part versus an inverted window) instead of a generic "invalid form".
- Where it's used: the
/activities/createroute gated by[HasPagePermission(ConferencePermissions.ActivitiesManage)](ActivityCreate.razor:1-2; permission constant atMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Authorization/ConferencePermissions.cs:39, seeHasPagePermissionAttributeandConferencePermissions), reached fromActivityList's create button; on success it hands off toActivityDetail. - Caveats / not-in-source:
StartsAtandEndsAtcompose localDateTimevalues from the pickers with no time-zone conversion, even though the event'sTimeZoneis available onEventInfoand is used for the default-event choice. How the postedStartTimeandEndTimeare interpreted downstream is decided by the command handler, not by this page.
ActivityList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Activities/ActivityList.razor.cs:19· Level 10 · class (Blazor code-behind)
- What it is: the organizer and content-editor browse page for activities: a server-paged
MudDataGridwith a name search, start-time, venue and display-order columns, an event filter, a mobile card layout, and delete-with-confirmation (class doc,:13-18). - Depends on: extends
EventFilteredListPageBase<TDto>closed overActivityDTO(:19), which itself extendsDataGridListPageBase<TDto>and suppliesToast,IsMobile,LoadServerDataAsync,MobilePageFetcher,ReloadActiveLayoutAsync, the event lookup and the persisted event filter. It injectsIActivityUIService(:24) and renders inside aListPageShell<TItem>(_shell,:27; markup atActivityList.razor:10), which owns the grid, theMobileInfiniteScrollList<TItem>, the delete dialog and the inline retry. It also usesListPageActions(:78),ErrorMessages(:84),ConferenceRoutePaths(:87-88), andResult<T>as the fetch's return type (:55,71). - Concept introduced, the event-filtered list page as a thin override set. Once the base class owns the event lookup, the persisted
eventIdfilter and the current-or-next default, and the shell owns the layouts, a list page is reduced to a handful of small overrides, and this page is the clearest place to read them.SavePageFilters/RestorePageFilters(:36-40) persist only the page's own filter, the search string; the event choice is the base's business.ReloadForEventFilterAsync(:45) tells the base how to refresh this page, which here means "reload whichever layout is on screen" through the base'sReloadActiveLayoutAsync(_shell?.MobileList)(:42-43;MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879).ApplyFilters(:62-67) adds the search term as acontainsfilter onNameand then calls the base'sApplyEventFilter(:66), which addsEventIdequals when a scope is selected (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:216-220). For activities that key needs no special handling:EventIdis a real Activity column, so it travels straight through the generic filter pipeline (class doc,:15-16). ContrastSpeakerList.GridRefandMobileListRef(:28-29) hand the base the shell'sGridandMobileList(MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Lists/ListPageShell.razor.cs:153,156), each null while the other layout is rendered.[Rubric §15, Best Practices & Code Quality](assesses whether shared behavior is factored rather than repeated) and[Rubric §1, SOLID]: the base defines the algorithm, the page supplies the varying steps (ADR-146). The startup race is now solved entirely in the base: every fetch the base runs, grid or mobile, awaitsOnBeforeFetchAsyncfirst (DataGridListPageBase.cs:1077,1121), whichEventFilteredListPageBaseoverrides to wait for the event load (EventFilteredListPageBase.cs:213), because the grid's firstServerDatacall can run ahead of initialization andApplyFiltersreads the selected event (in-code comment,:53-54). The page no longer awaits anything itself. Both layouts share one fetch,FetchActivitiesAsync(:55-57): the grid passes it toLoadServerDataAsync(:59-60) and the phone list gets it wrapped byMobilePageFetcher(:71-72). What is specific to activities is the mobile sort:FetchMobilePagepins"StartTime"with the default ascending direction (:72;DataGridListPageBase.cs:1101-1117) because, as the comment says, the programme reads chronologically (:70), while the desktop grid lets the organizer re-sort any sortable column. The two layouts share filters and a data contract but not ordering.[Rubric §22, Responsive & Cross-Browser]: one DTO feeds the desktop grid and the mobile infinite-scroll list, switched on the base'sIsMobile.[Rubric §12, Performance & Scalability]: paging, searching, sorting and filtering all happen server-side.
- Walkthrough
FormatStartTime(:34): the grid's start-time cell rendered in the viewer's culture ("g", short date plus short time).[Rubric §27, Internationalization].OnSearchChanged(:47-51): store the term, reload the active layout.LoadServerData(:59-60): hand the base the shared fetch andApplyFilters.FetchMobilePage(:71-72): the same fetch and filters throughMobilePageFetcher, with the chronological sort pinned.OnMobileCardClick(:74): a card opens the activity's detail page.DeleteActivityAsync(:77-85): delegates the whole confirm, delete, toast and reload sequence toListPageActions, passing the shell'sDeleteDialog(:79), the activity name, the delete call, the success message and the reload.NavigateToCreate/NavigateToDetails(:87-88): route constants, never literals.[Rubric §25, Navigation & Information Architecture].- The inline error state's retry is the shell's own
RetryAsync(ListPageShell.razor.cs:171), so the page declares none.
- Why it's built this way: an organizer works one conference at a time, so scoping to an event is the default rather than an option, and the base class makes that scoping identical on every list page in the module; the shell keeps the layout markup identical too.
- Where it's used: the
/activitiesroute gated by[HasPagePermission(ConferencePermissions.ActivitiesManage)](ActivityList.razor:1-2), linking on toActivityCreateandActivityDetail.
ConferenceCategoryItemEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryItemEditModel.cs:19· Level 2 · class (sealed form model)
- What it is: the one-field form model behind the inline "add category item" form that
ConferenceCategoryItemsPanelhosts. It carries a singleNameproperty and the rules that property must satisfy. - Depends on:
CategoryItemDTOfor the length cap (.../Pages/ConferenceCategory/ConferenceCategoryItemEditModel.cs:2,30);System.ComponentModel.DataAnnotations. It is consumed throughModelValidationandDataAnnotationsModelValidator. - Concept introduced, the page form model as the single declaration of a form's rules. Every editable
surface in this unit follows the same three-part arrangement, and this is the smallest instance of it,
so it is the clearest place to read the mechanism.
- The rules live on a plain C# model, as DataAnnotations.
[Required(ErrorMessage = NameRequiredKey)]and[MaxLength(CategoryItemDTO.NameMaxLength, ErrorMessage = "Validation.NameMaxLength")]sit on theNameproperty (lines 29-31). The cap is not a literal: it readsCategoryItemDTO.NameMaxLength, which is500and is declared once on the DTO (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Categories/CategoryItemDTO.cs:16), so the client cap and the contract cap cannot drift. - The markup bridges to those rules instead of restating them. The panel builds one delegate with
ModelValidation.For(_model, new DataAnnotationsModelValidator(L))(.../Pages/ConferenceCategory/ConferenceCategoryItemsPanel.razor.cs:57) and hands it to the field'sValidationparameter (.../Pages/ConferenceCategory/ConferenceCategoryItemsPanel.razor:30). MudBlazor invokes that delegate with(model, member path)and the model's own annotations decide the outcome (MMCA.Common/Source/Presentation/MMCA.Common.UI/Validation/ModelValidation.cs:43-49), so one delegate serves every field on the form and no rule is written twice. - Every
ErrorMessageis a resource key, not a sentence.NameRequiredKeyis the constant"Validation.NameRequired"(line 26), and the localizing validator resolves the key at render time (ADR-027). The constant exists so the model's[Required]rule and the field'sRequiredErroraffordance quote the same key rather than two copies of one string literal (lines 21-25).[Rubric §24, Forms, Validation & UX Safety](assesses whether a form's rules are declared once and enforced before submit): the annotation is the only declaration, and the field renders its asterisk and message from it.[Rubric §15, Best Practices & Code Quality](assesses whether a change has one landing site): raising the item-name cap is a one-line DTO edit that the model, the input'sMaxLength, and the character counter all inherit.[Rubric §27, Internationalization]: the message is a key, so the wording is a resource concern rather than a code concern.
- The rules live on a plain C# model, as DataAnnotations.
- Walkthrough
NameRequiredKey(line 26): the shared resource key described above.Name(line 31):stringinitialized tostring.Empty, so a fresh model binds cleanly to a text field, carrying the required and max-length rules (lines 29-30).
- Why it's built this way: there is no standalone item-creation page to mirror, so unlike its siblings
this model has no abstract base and no
ToNew(the doc comment says so explicitly, lines 6-18). The panel builds theCategoryItemDTOitself. The sort order is a plain numeric field with nothing to validate, so it stays on the panel rather than joining the model. - Where it's used: held as the private
_modelofConferenceCategoryItemsPanel(.../Pages/ConferenceCategory/ConferenceCategoryItemsPanel.razor.cs:36), reset on every "add item" click (line 62) and read when the new item is posted (line 87).
PartnerFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerFormModel.cs:18· Level 2 · class (abstract base form model)
- What it is: the editable partner fields shared by the create page and the detail page's inline editor: name, description, logo URL, website URL, partner type, and display order.
- Depends on:
PartnerDTOfor the four length caps (lines 35,39,44,49) andAbsoluteUrlAttributefor the two URL fields (lines 43,48).PartnerType(its default ofPartnerType.Community, line 56). Its subclasses arePartnerCreateModelandPartnerEditModel. - Concept introduced: none new. This is the partner-side instance of the shared-base form model
taught on
ConferenceCategoryFormModelandQuestionFormModel: the create and edit pages bind one type so neither form can add a rule the other lacks.[Rubric §24, Forms, Validation & UX Safety]and[Rubric §15, Best Practices & Code Quality]apply for the same reasons. - Walkthrough
NameRequiredKey(line 31): the resource key"Error.NameRequired", quoted byName's[Required](line 34) and, per the doc comment (lines 27-30), by the field'sRequiredError.Name(line 36): required, capped atPartnerDTO.NameMaxLength.Description(line 40): optional, capped atPartnerDTO.DescriptionMaxLength.LogoUrl(line 45) andWebsiteUrl(line 50): optional, each validated by[AbsoluteUrl(ErrorMessage = "Error.AbsoluteUrl")]plus its ownPartnerDTOlength cap. UnlikeNameandDescription, these two fields carry a format rule as well as a length rule.PartnerType(line 56): defaults toPartnerType.Community, the doc comment explaining that this is deliberately harmless because, unlike a sponsorship tier, a partner type carries no commercial weight (lines 52-55).Sort(line 59): plainint, display order within the partner type.
- Why it's built this way: the same anti-drift argument as
ConferenceCategoryFormModel: one field block, bound by both consuming pages, cannot fall out of sync with itself. - Where it's used: base of
PartnerCreateModelandPartnerEditModel; bound byPartnerCreateandPartnerDetailthrough their respective model fields.
PublicAiAssistant
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.AiAssistant·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/AiAssistant/PublicAiAssistant.razor.cs:20· Level 2 · class (Blazor code-behind)
- What it is: the public "use the schedule in your AI assistant" page (ADR-138, doc comment lines 9-14). It shows the Conference MCP server's URL with a copy button, the setup steps for Claude Desktop, Claude Code and ChatGPT connectors, the server's six read-only tools in plain words, and a privacy line. It is anonymous because the MCP endpoint itself is anonymous and serves public schedule data only.
- Depends on:
IConfiguration(line 49) for the URL,IClipboardService(line 51) for the copy,IToastService(line 53) andToastSeverity(line 101) for the outcome. Externals: Blazor (ComponentBase,[Inject],OnInitialized),IDisposable, MudBlazor cards and buttons, and theIStringLocalizer<PublicAiAssistant>the template injects asL(.../Pages/Public/AiAssistant/PublicAiAssistant.razor:4). - Concept introduced, a discovery page driven by configuration. The page owns no data; it explains how
to point an external AI assistant at an endpoint whose address differs per environment.
- The URL is configuration, never a literal.
ServerUrlKeyis the constant"Mcp:ServerUrl"(line 28), read once inOnInitialized(line 71). The remarks (lines 15-19) record where the value comes from on each head: the Web head reads its own settings and forwards the value to the WebAssembly client through/client-config, and the MAUI head embeds the production value, so each environment shows its own gateway's/mcp. A missing value degrades rather than breaks: the card rendersServerUrl.Unavailable(.../PublicAiAssistant.razor:20-23),CopyUrlAsyncreturns early (lines 91-94), andClaudeCodeCommand(lines 58-59) falls back to a<url>placeholder insideclaude mcp add --transport http adc ..., the command rendered at.../PublicAiAssistant.razor:54. - The tool list is resource keys, not text.
ToolKeys(lines 33-41) holds the six keys (Tools.ListEventsthroughTools.NowNext) in the order the MCP server declares its tools, and the markup renders each throughL(.../PublicAiAssistant.razor:69-74).[Rubric §27, Internationalization]: every heading, step, tool description and toast reads throughL. - The copy is cancelled when the page goes away. A private
CancellationTokenSource(line 43) is read throughLifetimeToken(_cts.LifetimeToken(), line 63), whose comment (lines 61-62) records why: readingTokenoff a disposed source throws, andDispose(bool)(lines 73-87) cancels before it disposes.CopyUrlAsync(lines 89-107) passes that token toSetTextAsync(line 98), showsSnackbar.Copiedas a success orSnackbar.CopyFailedas a warning from the returned flag (lines 99-101), and ignoresOperationCanceledException(lines 103-106). The page derives fromComponentBasedirectly (line 20), so it carries this pattern itself rather than inheriting it.[Rubric §23, Front-End Performance & Rendering].[Rubric §11, Security]: the route carries@attribute [AllowAnonymous](.../PublicAiAssistant.razor:3), and the type is named in the anonymous allowlist checked byMMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Api/AnonymousEndpointTests.cs:133, so making another page anonymous is a reviewed change rather than a silent one.
- The URL is configuration, never a literal.
- Walkthrough
Title(line 55): the localized page title.OnInitialized(line 71): the only lifecycle override; it readsServerUrlKeyinto_serverUrl(line 45).- Markup: four cards (URL and copy button, setup steps per assistant, the tools, the privacy line;
.../PublicAiAssistant.razor:12-88), each card heading rendered as anh2and each assistant's heading as anh3(lines 16,45,49), the copy button with its ownaria-label(line 31), anddata-testidhooks on the URL, copy button, command, tool list and privacy text (lines 28,32,54,69,86) forPublicAiAssistantTests.
- Why it's built this way: the MCP server's address is a deployment fact, so the page reads it from configuration on every head instead of carrying one gateway's address into every environment; and the tool list lives in resources so the page can describe the server in each supported culture without code changes.
- Where it's used: the
/conference/ai-assistantroute (.../PublicAiAssistant.razor:1), named asConferenceRoutePaths.PublicAiAssistant(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:55) and reached from theNav.AiAssistantmenu entry thatConferenceUIModuleregisters (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceUIModule.cs:67). Covered byMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Public/PublicAiAssistantTests.cs.
ConferenceCategoryFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryFormModel.cs:24· Level 3 · class (abstract base form model)
- What it is: the editable conference-category fields shared by the create page and the detail page's inline editor: the title with its rules, the display order, and the optional type discriminator.
- Depends on:
ConferenceCategoryDTOfor the title cap (lines 2,35). Its subclasses areConferenceCategoryCreateModelandConferenceCategoryEditModel. - Concept introduced: none new. This is the category-side twin of
QuestionFormModel; read that section for the shared-base rationale, andConferenceCategoryItemEditModelfor the annotations-to-MudBlazor bridge.[Rubric §24, Forms, Validation & UX Safety]and[Rubric §15, Best Practices & Code Quality]apply for the same reasons. - Walkthrough
CategoryTitleRequiredKey(line 31): the resource key"Validation.TitleRequired", quoted by the model's[Required](line 34) and by the field'sRequiredError(.../Pages/ConferenceCategory/ConferenceCategoryFormFields.razor:18).CategoryTitle(line 36): required and capped atConferenceCategoryDTO.TitleMaxLength, which is255(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Categories/ConferenceCategoryDTO.cs:17). The name is deliberate and the doc comment says why (line 33): a property namedTitleon a page class would read as the page title, and the pages already expose a localizedTitle.Sort(line 39) andType(line 42): plain properties with no annotation.Typeis nullable and optional (for example"session"or"speaker"); its input caps itself atConferenceCategoryDTO.TypeMaxLengthin markup (.../Pages/ConferenceCategory/ConferenceCategoryFormFields.razor:23) rather than through an annotation.
- Why it's built this way: the same anti-drift argument as
QuestionFormModel. The sharedConferenceCategoryFormFieldscomponent takes this type as itsModel(.../Pages/ConferenceCategory/ConferenceCategoryFormFields.razor:28), so both consuming pages render the identical field block and neither can add a rule the other lacks. - Where it's used: base of
ConferenceCategoryCreateModelandConferenceCategoryEditModel; bound byConferenceCategoryCreate(.../Pages/ConferenceCategory/ConferenceCategoryCreate.razor:23) andConferenceCategoryDetail(.../Pages/ConferenceCategory/ConferenceCategoryDetail.razor:34).
PartnerCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerCreateModel.cs:10· Level 3 · class (sealed form model)
- What it is: the form model for the partner-creation page. It adds nothing to
PartnerFormModelexcept the shape of the post. - Depends on:
PartnerFormModel(base) andPartnerDTO;EventIdentifierType(the module's identifier-type alias). - Concept introduced: none new.
ToNewis the mapping-on-the-model idea introduced onQuestionCreateModel. - Walkthrough
ToNew(EventIdentifierType eventId)(lines 18-29) builds aPartnerDTOwithId = default(line 21) plus the five entered values, stamped with the caller-suppliedeventId. UnlikeConferenceCategoryCreateModel.ToNew, the owning event is not on the model itself: it is chosen on the create page and passed in, because the page holds the event picker's selected value, not the form.
- Why it's built this way: keeping the create model empty apart from
ToNewmirrorsConferenceCategoryCreateModel: every field a reader could look for is on the shared base. - Where it's used: the
_modelfield ofPartnerCreate, read at the post.
PartnerEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerEditModel.cs:10· Level 3 · class (sealed form model)
- What it is: the edit buffer for the inline partner editor on the detail page: it loads from the fetched partner and projects back onto an updated DTO.
- Depends on:
PartnerFormModel(base) andPartnerDTO. - Concept introduced: none new. The load-into-buffer and
RowVersionround-trip mechanics are taught onQuestionEditModel.[Rubric §8, Data Architecture]:ToUpdatedcarriesRowVersion = partner.RowVersion(line 37 of the source), so the partner edit participates in optimistic concurrency (ADR-035), the same as the category edit and unlike the category's item edits. - Walkthrough
LoadFrom(PartnerDTO partner)(lines 14-24): null-guards, then copiesName,PartnerType,Sort,Description,LogoUrl, andWebsiteUrlonto the form fields.ToUpdated(PartnerDTO partner)(lines 32-48): null-guards, then rebuilds the DTO with the loadedId,RowVersion, andEventIdalongside the edited name, type, logo, description, website, and sort.
- Why it's built this way: the shared-base split lets the edit form reuse every validation rule the
create form declares, and
ToUpdatedis the one place identity, concurrency token, and the owning event are carried forward from the loaded record rather than re-entered. - Where it's used: the
_modelfield ofPartnerDetail, loaded atStartEditingand read at the save.
ConferenceCategoryCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryCreateModel.cs:10· Level 4 · class (sealed form model)
- What it is: the form model for the category-creation page. It adds nothing to
ConferenceCategoryFormModelexcept the shape of the post. - Depends on:
ConferenceCategoryFormModel(base) andConferenceCategoryDTO. - Concept introduced: none new.
ToNewis the mapping-on-the-model idea introduced onQuestionCreateModel. - Walkthrough
ToNew()(lines 17-24) builds aConferenceCategoryDTOwithId = default(line 20) plus the three entered values. Note the contrast withQuestionCreateModel.ToNew, which takes an id: a category leaves identity assignment entirely to the server, and the page navigates on the id read back from the response.[Rubric §8, Data Architecture](assesses a deliberate identity strategy): the two entities in this unit make opposite choices, and each is visible right here in the mapping method.
- Why it's built this way: keeping the create model empty apart from
ToNewis the point. Every field a reader could look for is on the shared base, which is the same base the detail page's editor binds, so the two forms cannot drift apart (doc comment, lines 5-9). - Where it's used: the
_modelfield ofConferenceCategoryCreate(.../Pages/ConferenceCategory/ConferenceCategoryCreate.razor.cs:39), read at the post (line 67).
ConferenceCategoryEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryEditModel.cs:11· Level 4 · class (sealed form model)
- What it is: the edit buffer for the inline category editor on the detail page: it loads from the fetched category and projects back onto an updated DTO.
- Depends on:
ConferenceCategoryFormModel(base) andConferenceCategoryDTO. - Concept introduced: none new. The load-into-buffer and
RowVersionround-trip mechanics are taught onQuestionEditModel.[Rubric §8, Data Architecture]:ToUpdatedcarriesRowVersion = category.RowVersion(line 37), so the category edit participates in optimistic concurrency (ADR-035). Worth contrasting with the item edits inConferenceCategoryItemsPanel, which carry no token. - Walkthrough
LoadFrom(ConferenceCategoryDTO category)(lines 15-22): null-guards, then copiesTitleintoCategoryTitle, plusSortandType.ToUpdated(ConferenceCategoryDTO category)(lines 30-42): null-guards, then rebuilds the DTO with the loadedIdandRowVersionand the edited title, sort, and type.
- Why it's built this way: the class doc records the deliberate omission (lines 5-10): the category
items are absent from this model because they are edited in their own panel, not in this form. That is
what lets the page's save path be a single
UpdateAsyncwith no child reconciliation. - Where it's used: the
_modelfield ofConferenceCategoryDetail(.../Pages/ConferenceCategory/ConferenceCategoryDetail.razor.cs:53), loaded atStartEditing(line 108) and read at the save (line 129).
ConferenceCategoryCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryCreate.razor.cs:9· Level 5 · class (Blazor code-behind)
- What it is: the organizer's category-creation form. It renders the shared field block over a
ConferenceCategoryCreateModel, posts oneConferenceCategoryDTOthrough the UI service, and redirects to the detail page for the record it just made. - Depends on: extends
CreatePageBase(.../Pages/Categories/ConferenceCategoryCreate.razor:8), which itself extendsCancellablePageBase;IConferenceCategoryUIService(line 11),CreateSubmitOptions(line 48),ConferenceRoutePaths(lines 24,46,50),ModelValidationandDataAnnotationsModelValidator(line 29). The toast service, theForm,IsSaving,IsDirty,SaveResultandMarkDirtyall come from the base. Externals: Blazor ([Inject],NavigationManager,OnInitialized), MudBlazor (MudForm,BreadcrumbItem,Icons.Material.Filled.Home), the sharedUnsavedChangesGuardandErrorSummarycomponents fromMMCA.Common.UI, and theIStringLocalizer<ConferenceCategoryCreate>the template injects asL. - Concept introduced, the create-page shape and its three safety rails. This is the smallest create
form in the group, which makes it the clearest place to read the shape the others repeat. The page
declares only its fields, its save call and its success step; the three rails live once in
CreatePageBase.SubmitAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:53-110), whichCreateCategoryAsynccalls (lines 41-48).- Validate before you mutate.
SubmitAsyncignores a submit while one is in flight (CreatePageBase.cs:61), clearsSaveResult(CreatePageBase.cs:67), validates the form and returns with a warning toast when it is invalid (CreatePageBase.cs:68-73), all before the service call. The server validates again; this pass keeps a round trip off the wire and puts the message next to the field. Errors are then collapsed and localized once by the sharedErrorSummary(.../Pages/Categories/ConferenceCategoryCreate.razor:36), whose comment (lines 30-35) records why de-duplication is needed: MudBlazor runs a field's annotations throughForas well as through the shared delegate, so one empty field can report the same rule twice.[Rubric §24, Forms, Validation & UX Safety]. A failed save is kept onSaveResult(CreatePageBase.cs:94) for that summary and toasted throughNotifyOnFailurewith the page's localizer (CreatePageBase.cs:95-98, the localizer passed asnew CreateSubmitOptions { Localizer = L }at line 48), so the wording survives a snackbar timing out while the user is still reading the form (the comment at lines 39-40). - Dirty tracking that cannot block its own redirect. Every field change raises the base's
MarkDirty()(wired through the field block'sOnFieldChanged,.../Pages/Categories/ConferenceCategoryCreate.razor:26) and the markup mounts<UnsavedChangesGuard IsDirty="IsDirty" IsDirtyAccessor="() => IsDirty" />(.../Pages/Categories/ConferenceCategoryCreate.razor:12). The accessor is the load-bearing half: the guard prefers the live accessor over the parameter snapshot, because clearing the flag and callingNavigateTowithout an intervening render would otherwise still prompt. On success the base clearsIsDirty(CreatePageBase.cs:89) before it runs the page's success step (CreatePageBase.cs:90), which is where the navigation happens. - Cancel on disposal. The save delegate receives the base's
PageToken(CreatePageBase.cs:85), defined onCancellablePageBaseas_cts.LifetimeToken()(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CancellablePageBase.cs:27) rather than_cts.Token, because readingTokenoff a disposed source throwsObjectDisposedException; a save that resumes after disposal gets a cancelled token instead.SubmitAsynctreatsOperationCanceledExceptionas a quietfalse(CreatePageBase.cs:102-105), the expected teardown or InteractiveAuto render-mode transition outcome (ADR-056).[Rubric §23, Front-End Performance & Rendering]: an abandoned form does not keep a response alive for a component that no longer exists.[Rubric §11, Security](assesses authorization at the boundary the user actually reaches): the route carries@attribute [HasPagePermission(ConferencePermissions.CategoriesManage)](.../Pages/Categories/ConferenceCategoryCreate.razor:2), a permission check rather than a role name (seeConferencePermissions).[Rubric §27, Internationalization]: every label, breadcrumb, and toast reads throughL.
- Validate before you mutate.
- Walkthrough
OnInitialized(lines 18-30) builds the Home / Categories / Create breadcrumb trail (lines 21-26) and then builds the validation delegate once (line 29), so the bridge is created per page instance rather than per render.- The page's own form state is two fields: the
_model(line 33) and the_validatedelegate (line 37). The capturedMudFormis the base'sForm, bound with@ref="Form"(.../Pages/Categories/ConferenceCategoryCreate.razor:24). CreateCategoryAsync(lines 41-48) is oneSubmitAsynccall: the save posts_model.ToNew()with the token the base supplies (line 42), and the success step toastsSnackbar.Created(line 45) and redirects toConferenceRoutePaths.ConferenceCategoryDetails(created.Id)using the id the server returned (line 46). The base'sfinallyalways clearsIsSaving(CreatePageBase.cs:106-109), so a failed save leaves the create and cancel buttons enabled (both bound toDisabled="IsSaving",.../Pages/Categories/ConferenceCategoryCreate.razor:41,43) rather than a stuck spinner.NavigateToList(line 50) is the cancel action, routed throughConferenceRoutePathsrather than a literal.[Rubric §25, Navigation & Information Architecture]: every route in the module is a named constant in one file.
- Why it's built this way: one create shape repeated per entity keeps the organizer's mental model
constant (fill, validate, save, land on the new record) while each page varies only in the fields it
collects. With the fields declared once on
ConferenceCategoryFormModeland the submit rails declared once onCreatePageBase, the page is left with its route, its model, its save call and its success step. - Where it's used: the
/conferencecategories/createroute (.../Pages/Categories/ConferenceCategoryCreate.razor:1-2), reached fromConferenceCategoryList's create button; on success it hands off toConferenceCategoryDetail.
ConferenceCategoryDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryDetail.razor.cs:19· Level 5 · class (Blazor code-behind)
- What it is: the container half of the organizer's category console. It loads one
ConferenceCategoryDTOwith its children by route id, runs the inline category editor and the delete flow, and hosts the item panel that owns the child-entity CRUD. - Depends on:
DetailPageBase(via@inherits,.../Pages/Categories/ConferenceCategoryDetail.razor:3) forBeginLoad,CompleteLoad,LoadState,PageToken,BeginEditandEndEdit,IConferenceCategoryUIService(line 23),IToastService(line 25),ConferenceCategoryEditModel(line 52),CommittedWriteReload(line 55),ConferenceCategoryItemsPanel(.../Pages/Categories/ConferenceCategoryDetail.razor:74),ResultUiExtensionsforNotifyOnFailure(lines 141,183),ConferenceRoutePaths(lines 39,200), andErrorMessages(line 131). Externals: MudBlazorMudForm, plus theUnsavedChangesGuard,DetailLoadStateContent,ErrorSummary, andDeleteConfirmationcomponents fromMMCA.Common.UI(.../Pages/Categories/ConferenceCategoryDetail.razor:13,20,45,83). - Concept introduced, the container/presentational split of a parent-with-children editor. The class
doc states the division (lines 14-18): this page owns the loaded aggregate, the inline category editor,
and the delete flow; the item CRUD lives in the presentational
ConferenceCategoryItemsPanel, which reloads the aggregate itself and hands the refreshed copy back through a callback that this page adopts in one line (OnCategoryReloaded, line 198). The page therefore has exactly one mutation entry point for child data and no child-collection logic at all.[Rubric §18, UI Architecture & Component Design](assesses decomposition) and[Rubric §19, State Management & Data Flow](assesses single ownership of state): the category has one owner (this page) and one place it can be replaced. Four further mechanisms are worth reading.- Load once on parameters. The route
Idis a typedConferenceCategoryIdentifierTypeparameter (line 27), so there is no string parse;OnParametersSetAsynccompares it against_loadedId(lines 66-69) and returns theLoadAsynctask directly (line 72), so a re-render does not refetch. - The load state belongs to the base, not the page.
LoadAsyncopens withBeginLoad()(line 78) and hands the fetch result toCompleteLoad(generation, result)(line 86), which recordsLoaded,NotFound, orFailedon the base'sLoadStateand drops a superseded response (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:67). The page adopts the category only when that call answerstrue. A not-found or failed load raises no toast: the comment at lines 84-85 states that the page body (DetailLoadStateContent,.../Pages/Categories/ConferenceCategoryDetail.razor:20) states it, with Retry for a failure.[Rubric §29, Resilience & Business Continuity]: not-found and failed are distinct rendered states. - Refetch, do not patch. A successful update is followed by a fresh
GetByIdAsync(line 146) and the page renders the server's answer. That costs one extra read and removes an entire class of drift between what was saved and what is shown. - A committed save ends the edit even when the reload fails (M246). The page holds a
CommittedWriteReload(line 55).TryAdopt(line 147) adopts the refreshed record and toasts success only when the reload worked; otherwise it reports theSnackbar.SavedRefreshFailedmessage, andEndEdit()(line 153) runs either way, because the update already committed. The stale page is then repaired lazily:StartEditingAsync(lines 97-119) callsEnsureCurrentAsync(line 106) to re-read before the next edit begins.[Rubric §8, Data Architecture]: the save posts_model.ToUpdated(Category), which round-trips theRowVersion(ADR-035).[Rubric §11, Security]: organizer-only route (.../Pages/Categories/ConferenceCategoryDetail.razor:2).
- Load once on parameters. The route
- Walkthrough
OnInitialized(lines 33-45): breadcrumbs (lines 36-41) and the validation delegate (line 44).OnParametersSetAsync(lines 64-73): the_loadedIdguard (lines 66-69), thenreturn LoadAsync()(line 72).LoadAsync(lines 75-95):BeginLoad()(line 78) supersedes any load already in flight and puts the base back inLoading;GetByIdAsync(Id, true, token)(line 82) fetches with children on the guard's token;CompleteLoad(generation, result) && result.TryGetValue(out var category)(line 86) adopts the category;OperationCanceledExceptionis swallowed (lines 91-94). There is nofinallyand no pageIsLoadingflag: the spinner is the base'sLoadState, which only the current generation can move, and the page itself never declares aCancellationTokenSource.StartEditingAsync(lines 97-119): re-reads the category through_writeReload.EnsureCurrentAsync(line 106) and returns without editing if that yields nothing, then adopts the current record (line 111), copies it into the edit model (line 112) and calls the base'sBeginEdit()(line 113), which setsIsEditingand clearsIsDirtyin one place. A cancelled token is swallowed (lines 115-118).SaveChangesAsync(lines 121-163): validate the form (lines 128-133),UpdateAsync(_model.ToUpdated(Category))(line 138), report a failure throughNotifyOnFailure(line 141), refetch (line 146), adopt the refreshed record throughTryAdopt(lines 147-151), toast, and callEndEdit()(line 153) so the dirty flag can never be left set behind a closed editor.DeleteCategoryAsync(lines 165-194): confirm through the sharedDeleteConfirmationdialog seeded with the category title (line 172), whoseShowAsyncanswers a plainTask<bool>(MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), so a cancel returns onif (!confirmed)(line 173); delete (line 180), then navigate back to the list (line 188).OnCategoryReloaded(line 198) andNavigateToList(line 200) are one-liners.
- Why it's built this way: a category is only meaningful together with its items (a topic list, a session-level list, a locality list), so editing them on two routes would be worse than one composite page. Splitting the panel out keeps that composite page readable: the container is now roughly the size of any other detail page, and the child-entity concerns are in a component that can be read on its own.
- Where it's used: the
/conferencecategories/{Id:int}route (.../Pages/Categories/ConferenceCategoryDetail.razor:1-2), reached fromConferenceCategoryListrows andConferenceCategoryCreate's redirect. The items authored here are whatICategoryItemLookupServiceresolves for the session and speaker pages.
ConferenceCategoryList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryList.razor.cs:11· Level 5 · class (Blazor code-behind)
- What it is: the organizer's category browse page: a server-paged grid with a single title search box, delete-with-confirmation, and a mobile card layout. It is a thin binding over the shared list-page base and the shared list shell.
- Depends on: extends
DataGridListPageBase<TDto>closed overConferenceCategoryDTO(line 11, declared in markup at.../Pages/Categories/ConferenceCategoryList.razor:5);IConferenceCategoryUIService(line 16),ListPageShell<TItem>(line 19, mounted at.../Pages/Categories/ConferenceCategoryList.razor:10-70), which renders the grid, theMobileInfiniteScrollList<TItem>and the sharedDeleteConfirmation;ListPageActions(line 63),ErrorMessages(line 69),ConferenceRoutePaths(lines 59,72), andResult(line 41). - Concept introduced, the list page as a set of overrides. The base owns the machinery: the abstract
Title, the grid and mobile-list reference plumbing, theIsMobileswitch, the mobile paging, the filter save/restore contract, the inlineLoadFailedstate, theOnBeforeFetchAsynchook,LoadServerDataAsync,MobilePageFetcherandReloadActiveLayoutAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs). The shell owns the markup both layouts share, including the inline failure content and its Retry button. This page supplies the following and nothing else.- The captured shell (line 19) and, through it, the
GridRefandMobileListRefoverrides (lines 20-21), which is how the base restores rows-per-page and the current page after a back-navigation and knows which layout is live. SaveFilters/RestoreFiltersfor the one search term (lines 25-29).[Rubric §25, Navigation & Information Architecture]: a reader who opens a record and comes back finds the same view, not a reset grid.- One fetch,
FetchCategoriesAsync(lines 41-43), used by both layouts, and one filter builder,ApplyFilters(lines 48-52), which turns the search string into a server-sideTitle containsfilter (line 51).LoadServerDatahands both to the base'sLoadServerDataAsync(lines 45-46);FetchMobilePageis the base'sMobilePageFetcher(FetchCategoriesAsync, ApplyFilters, "Title")(lines 55-56), which defaults the card list toTitleascending (DataGridListPageBase.cs:1101-1117).[Rubric §12, Performance & Scalability]and[Rubric §23, Front-End Performance & Rendering]: search, sort, and paging all execute where the data is, so the client never materializes a whole table.[Rubric §22, Responsive & Cross-Browser](assesses a genuine mobile layout rather than a shrunk grid): the same service call backs both branches, selected by the base'sIsMobile. Two details separate this page from its siblings. The shared fetch passesincludeChildren: true(line 43), because both layouts render the child item count from the loaded collection (.../Pages/Categories/ConferenceCategoryList.razor:26,59); this is the one list page in the module that pays for children. And deletion is not reimplemented:ListPageActions.DeleteWithConfirmationAsync(lines 62-70) takes the shell'sDeleteDialog, the label to show, the delete call, the toast service, the localized success text, an error formatter, and the reload callback.[Rubric §1, SOLID]and[Rubric §15, Best Practices & Code Quality]: confirm, delete, toast, reload has one implementation for every list page in the app.[Rubric §29, Resilience & Business Continuity]: a failed load offers the shell's Retry instead of a dead grid.
- The captured shell (line 19) and, through it, the
- Walkthrough:
ReloadActiveLayoutAsync(lines 31-32) passes the shell's mobile list to the base'sReloadActiveLayoutAsync(MobileInfiniteScrollList<TDto>?)(DataGridListPageBase.cs:1879), which reloads whichever of the two layouts is live; it is the single reload entry point shared by search changes and post-delete refreshes.OnSearchChanged(lines 34-38) stores the term and returns that reload task directly rather than awaiting it;OnMobileCardClick(lines 58-59) andNavigateToCreate(line 72) route throughConferenceRoutePaths. The grid's columns arePropertyColumns overTitle,Sort,TypeandCategoryItemCount(.../Pages/Categories/ConferenceCategoryList.razor:37,42,48,56), all sortable, the last sorting on a count mapped server-side (comment at line 53), with the actions in a non-sortableTemplateColumn(line 62). - Why it's built this way: several near-identical organizer browse surfaces are exactly the case a base class is for. Because each page is only its overrides, a change to paging, scroll restoration, the failure state, or the mobile switch lands in one place and every list inherits it.
- Where it's used: the
/conferencecategoriesorganizer route (.../Pages/Categories/ConferenceCategoryList.razor:1-2, gated byHasPagePermission(ConferencePermissions.CategoriesManage)). Rows and cards navigate toConferenceCategoryDetail; the create button opensConferenceCategoryCreate.
ConferenceCategoryItemsPanel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Categories·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Categories/ConferenceCategoryItemsPanel.razor.cs:22· Level 7 · class (Blazor component code-behind)
- What it is: the category-item half of the category detail page: the item-count header, the inline add form, and the item table with its inline edit row and delete action. It performs the child-entity mutations itself and hands the reloaded parent category back to the page.
- Depends on:
ICategoryItemUIService(line 25) for the mutations andIConferenceCategoryUIService(line 24) for the reload;ConferenceCategoryDTOandCategoryItemDTO; theCategoryItemIdentifierTypealias (line 60);ConferenceCategoryItemEditModel(line 45) withModelValidationandDataAnnotationsModelValidator(line 74);CommittedWriteReload(line 49);IToastService(line 26);ErrorMessages(line 97); and the CommonActionErrorMessageresult extension (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ResultUiExtensions.cs:317, lines 116,188). The localizedEntityNamenoun (line 37, resource keyCategoryItem.EntityName) is declared for the delete confirmation (ADR-027). Externals: MudBlazorMudForm, the sharedErrorSummaryandDeleteConfirmationcomponents (.../Pages/Categories/ConferenceCategoryItemsPanel.razor:53,107). - Concept introduced, the presentational child that owns its own writes. This is a different split
from the filter-bar style of presentational component. The panel takes the category as a
[Parameter](line 29) and never mutates it; instead, every committed mutation re-reads the aggregate throughReloadCategoryAsync(lines 242-249) and raises the refreshed copy on theCategoryChangedcallback (line 247), which the page adopts. State therefore still has exactly one owner (ConferenceCategoryDetail) while the write logic lives next to the markup that triggers it.[Rubric §18, UI Architecture & Component Design]and[Rubric §19, State Management & Data Flow]. Three details reward a close read.- A committed item write is reported even when the reload fails (M252). The panel holds its own
CommittedWriteReload(line 49). After a successful add, update, or delete it toasts success and closes the editor first, then callsReloadCategoryAsync(lines 121-123, 193-195, 230-231), whoseTryAdopt(line 245) either hands the refreshed category to the page or reportsSnackbar.SavedRefreshFailedand marks the panel stale. Every later item edit or write starts withEnsureCurrentCategoryAsync(lines 254-268): when nothing is stale it answers the shownCategory(line 258); otherwise it re-reads throughEnsureCurrentAsync(line 261), hands the result to the page (line 266), and answersnullon a failed re-read so the write does not run.StartEditingItemAsyncopens the row on the re-read category's copy of the item and does not open an item the re-read no longer contains (lines 142-146), so an update posts what the server holds.[Rubric §29, Resilience & Business Continuity]. - The panel injects the page's localizer. Its template declares
@inject IStringLocalizer<ConferenceCategoryDetail> L(.../Pages/Categories/ConferenceCategoryItemsPanel.razor:4), so every string keeps the exact wording it had before the split and no second resource file appears.[Rubric §27, Internationalization]. - The two editors are mutually exclusive by construction.
StartAddingItemcloses any open row edit (line 82) andStartEditingItemAsynccloses the add form (line 152), so the panel can never show two open editors at once.[Rubric §24, Forms, Validation & UX Safety].[Rubric §21, Accessibility]: every icon-only action carries anaria-labelread from the localizer (.../Pages/Categories/ConferenceCategoryItemsPanel.razor:79,81,92,94).[Rubric §8, Data Architecture]: the item update is an optimistic-concurrency write.StartEditingItemAsynccaptures the item'sRowVersionas the row opens (line 151, into the field declared at line 66), andUpdateItemAsyncputs it on the posted DTO (line 183); the comment at lines 64-65 states that the update sends it asIf-Match(ADR-035), so a save over another organizer's newer edit of the same item answers 412 instead of overwriting.CategoryItemDTOimplementsIConcurrencyAware(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Categories/CategoryItemDTO.cs:13) and carries the token (line 22 of that file). The add carries none (line 109), because there is no prior version of a new item to conflict with.
- A committed item write is reported even when the reload fails (M252). The panel holds its own
- Walkthrough
OnInitialized(lines 69-75) builds the validation delegate over the panel's ownConferenceCategoryItemEditModel(line 74).- Add:
StartAddingItem(lines 77-83) clears the model and the sort field and opens the form;AddItemAsync(lines 87-133) validates its ownMudForm(lines 94-99), runsEnsureCurrentCategoryAsync(line 104), builds aCategoryItemDTOstamped with the parentCategoryId(line 109), posts (line 110), and on a failed add toastsaddResult.ActionErrorMessage(L, L["Snackbar.ItemSaveFailed"].Value)(line 116). That Common extension answers the fixed fallback for anUnexpectederror, otherwise the API's own localized refusal, and the fallback again when that composes to nothing (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ResultUiExtensions.cs:302-317), which is the O-07 carve-out to ADR-027 Decision 9 (comment, lines 113-115). On success it toasts (line 121), closes the form (line 122), and reloads (line 123). - Edit:
StartEditingItemAsync(lines 135-158) seeds the row-edit fields, the row version included, from the re-read copy of the clicked item (lines 148-151), andUpdateItemAsync(lines 162-205) is the one path that does not use aMudForm: it hand-checksstring.IsNullOrWhiteSpace(_editItemName)and warns with the same resource key the model declares (lines 169-173), because the row editor is inline in the table rather than a form. AfterEnsureCurrentCategoryAsync(line 178) it builds the DTO with the capturedRowVersion(line 183) and posts (line 184); a failed update surfaces through the sameActionErrorMessagecallAddItemAsyncuses (lines 185-190, line 188 for the call; BR-138 rename conflict), and a committed one toasts, closes the row, and reloads (lines 193-195). - Delete:
DeleteItemAsync(lines 207-237) confirms through theDeleteConfirmationdialog seeded with the item name (line 209) and returns onif (!confirmed)(line 210) when the organizer backs out, runsEnsureCurrentCategoryAsync(line 217), deletes (line 222), reportsSnackbar.ItemDeleteFailedonly for a failed delete (lines 223-227), then toasts and reloads (lines 230-231). ReloadCategoryAsync(lines 242-249): re-reads the category with children (line 244) and raisesCategoryChangedonly whenTryAdoptsucceeds; the comment at lines 239-241 states that a failed reload is not a failed write.EnsureCurrentCategoryAsync(lines 254-268): the stale-repair step described above; the comment at lines 251-253 states its contract.- Disposal (lines 270-296): the panel owns its own
CancellationTokenSource(line 34) and implements the standardDispose(bool)pattern, because it is a component rather than a page and so does not inheritDetailPageBase'sLoadGuard. Every service call (add, update, delete, and the category reload) takes theLifetimeTokenproperty (_cts.LifetimeToken()) instead of_cts.Token, so a call resuming after disposal sees a cancelled token rather than anObjectDisposedException.
- Why it's built this way: the item CRUD is the bulk of what a category console does, and keeping it in the page made that page the largest in the module. Extracting it as a presentational panel that reloads the aggregate itself preserves the previous behavior exactly (the doc comment says so, lines 13-20) while leaving the page with one aggregate, one editor, and one callback.
- Where it's used: rendered once by
ConferenceCategoryDetailas<ConferenceCategoryItemsPanel Category="Category" CategoryChanged="OnCategoryReloaded" />(.../Pages/Categories/ConferenceCategoryDetail.razor:74).
PartnerCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerCreate.razor.cs:15· Level 10 · class (Blazor code-behind)
- What it is: the partner-creation form (the doc comment names Organizer and ContentEditor). It picks
the owning event, renders the shared field block over a
PartnerCreateModel, posts onePartnerDTOthrough the UI service, and redirects to the detail page for the record it just made. - Depends on: extends
CreatePageBase(.../Pages/Partners/PartnerCreate.razor:8);IPartnerUIService(line 17) for the post,IEventLookupService(line 18) for the event picker, the injectedTimeProvider(line 20) as the clock for the event default,EventInfoDefaultsfor the default event (line 55), which in turn callsCurrentEventSelector,CreateSubmitOptions(lines 81-85),ErrorMessages(line 84),ConferenceRoutePaths(lines 32,79,87),ModelValidationandDataAnnotationsModelValidator(line 37). Externals: Blazor ([Inject],NavigationManager,OnInitialized/OnInitializedAsync), MudBlazor (MudForm,BreadcrumbItem,Icons.Material.Filled.Home), .NETTimeProvider. - Concept introduced: none new. This is the same create-page shape taught on
ConferenceCategoryCreate, with the rails inherited fromCreatePageBase.SubmitAsync: validate before mutate, a failed save kept onSaveResultfor theErrorSummary(.../Pages/Partners/PartnerCreate.razor:36) and toasted with the page's localizer,IsDirtycleared before the success step navigates, and the save run on the base'sPageToken(ADR-056 for the cancellation outcome). One addition over that shape: an event picker.- The event defaults, it does not require a click.
OnInitializedAsyncloads the event lookup onPageToken(line 48) and then, if no event id is already chosen, callsEventInfoDefaults.SelectCurrentOrNextId(_events, TimeProvider.GetUtcNow().UtcDateTime)(line 55). That helper answersnullwhen the lookup failed and otherwise runsCurrentEventSelector.SelectCurrentOrNextover the events' start, end, and time-zone accessors (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventInfoDefaults.cs:20-30), the one accessor triple the organizer create pages share. "Now" comes from the injectedTimeProvider(line 20) rather than the static clock, so a test can pin which event counts as current or next. A failed lookup is treated as non-critical: it leaves the picker empty and the required-field error guides the user (comment, lines 46-47). - The save guards on the event, not only the form.
CreatePartnerAsyncpassesPreCheck = () => _eventId is null ? ErrorMessages.ValidationError : null(line 84), whichSubmitAsyncruns after form validation and before the service call, warning and returning on a non-null message (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:75-80). A partner therefore cannot be created without an owning event even though the event is not one ofPartnerFormModel's own fields, and the missing event answers with the same generic warning an invalid form does (comment, lines 71-73).[Rubric §24, Forms, Validation & UX Safety]and[Rubric §29, Resilience & Business Continuity]: an event-lookup failure degrades to a guided empty picker rather than an unhandled error.[Rubric §11, Security]: the route is gated byHasPagePermission(ConferencePermissions.PartnersManage)(.../Pages/Partners/PartnerCreate.razor:2).[Rubric §27, Internationalization]: every label, breadcrumb, and toast reads throughL.
- The event defaults, it does not require a click.
- Walkthrough
OnInitialized(lines 26-38) builds the Home / Partners / Create breadcrumb trail (lines 29-34) and builds the validation delegate (line 37).OnInitializedAsync(lines 40-61): loads_eventsfromIEventLookupService(line 48), then defaults_eventIdthroughEventInfoDefaultsagainstTimeProvider.GetUtcNow().UtcDateTime(line 55), withOperationCanceledExceptionswallowed (lines 57-60).- Form state:
_events(line 63), the_model(line 64),_eventId(line 65), and_validate(line 69). TheMudForm,IsSaving,IsDirtyandSaveResultbelong to the base. CreatePartnerAsync(lines 74-85): oneSubmitAsynccall that posts_model.ToNew(_eventId!.Value)with the base's token (line 75), and on success toastsSnackbar.Created(line 78) and redirects toConferenceRoutePaths.PartnerDetails(created.Id)(line 79); the options carry the localizer and the event pre-check (lines 81-85).NavigateToList(line 87) routes throughConferenceRoutePaths.
- Why it's built this way: one create shape repeated per entity, with the event picker as the one genuinely new piece a partner (and a sponsor) needs that a category or a question does not, because both are scoped to a single event rather than global to the conference. The pre-check hook lets that extra guard ride the shared submit pipeline instead of reopening it.
- Where it's used: the
/partners/createroute (.../Pages/Partners/PartnerCreate.razor:1), reached fromPartnerList's create button (NavigateToCreate); on success it hands off toPartnerDetail. Covered byMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Partners/PartnerCreateTests.cs.
PartnerDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerDetail.razor.cs:20· Level 9 · class (Blazor code-behind)
- What it is: the organizer's partner console: it loads one
PartnerDTOby route id, runs the inline editor and the delete flow, and resolves the owning event's display name for the read view. - Depends on:
IPartnerUIService(line 24) for load/save/delete,IEventLookupService(line 25) for the event name,IToastService(line 27),PartnerEditModel(line 63),CommittedWriteReload(line 66), andErrorMessages(line 153). Externals: MudBlazorMudForm, plus the sharedDetailLoadStateContentandDeleteConfirmationcomponents (.../Pages/Partners/PartnerDetail.razor:19,105). - Concept introduced: none new. This is the same load/edit/save/delete container shape taught on
ConferenceCategoryDetail: load-once on parameters (OnParametersSetAsynccomparingIdto_loadedId, lines 74-83, returning theLoadAsynctask directly), the load state recorded by the base'sCompleteLoadso not-found and failed render throughDetailLoadStateContentwith no toast (line 96), refetch rather than patch after a save (a freshGetByIdAsyncat line 168, adopted throughTryAdoptat line 169), and validate-before-mutate onSaveChangesAsync(lines 150-155). The M246 committed-write contract is the same as on that page: the update has committed, soEndEdit()(line 175) runs even when the reload fails, andStartEditingAsyncre-reads throughEnsureCurrentAsync(line 126) before the next edit. One addition: the event name is resolved for display rather than edited.- The event name is a computed property over the loaded lookup, not a field.
EventName(lines 39-42) reads the partner'sEventIdout of_eventswhen the lookup succeeded, and falls back to the raw id formatted withInvariantCultureotherwise, so the page degrades gracefully rather than blanking the row.[Rubric §29, Resilience & Business Continuity]. - A failed event lookup stops the load, not the render. Inside
LoadAsync, once the partner is fetched and adopted (line 101), a failed event lookup is reported throughNotifyOnFailureand returns (lines 105-109, the comment at lines 103-104 records that the partner itself is already loaded). It runs only once per page instance (_events is nullguard, line 105) since the lookup does not change per partner.[Rubric §8, Data Architecture]:SaveChangesAsyncposts_model.ToUpdated(Partner), round-tripping theRowVersion(ADR-035).
- The event name is a computed property over the loaded lookup, not a field.
- Walkthrough
OnInitialized(lines 44-56): breadcrumbs and the validation delegate.OnParametersSetAsync(lines 74-83) andLoadAsync(lines 85-115):BeginLoad()(line 88) supersedes any load in flight,GetByIdAsync(Id, true, token)(line 92) fetches the partner,!CompleteLoad(generation, partnerResult) || !partnerResult.TryGetValue(out var partner)returns early for a superseded, not-found, or failed load (lines 96-99), the partner is adopted (line 101), then the event-lookup guard runs on the same token (lines 105-109) andOperationCanceledExceptionis swallowed (lines 111-114). There is nofinallyand no pageIsLoadingflag: the base'sLoadStatecarries the spinner.StartEditingAsync(lines 117-139): re-reads the partner through_writeReload.EnsureCurrentAsync(line 126), returns without editing if that yields nothing, otherwise adopts the current record, loads the edit model from it (line 132) and callsBeginEdit()(line 133).CancelEditing(line 141) isEndEdit().SaveChangesAsync(lines 143-185): validate,UpdateAsync(_model.ToUpdated(Partner))(line 160), report a failure (line 163), refetch (line 168), adopt the refreshed record and toast only whenTryAdoptsucceeds (lines 169-173), andEndEdit()(line 175).DeletePartnerAsync(lines 187-216): confirm throughDeleteConfirmationseeded with the partner name (line 194), return onif (!confirmed)(line 195) when cancelled, delete (line 202), toast, and navigate back to the list.TypeLabel(PartnerType type)(line 36) andNavigateToList(line 218) are one-liners.
- Why it's built this way: the same container shape as every other detail page in the module, with the one variation the entity requires: a read-only lookup of the owning event's name rather than a second editable field, because the owning event is fixed at creation.
- Where it's used: reached from
PartnerListrows andPartnerCreate's redirect.
PartnerList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Partners/PartnerList.razor.cs:18· Level 10 · class (Blazor code-behind)
- What it is: the organizer's partner browse page: a server-paged grid and mobile card list, scoped to one event, with a name search box and delete-with-confirmation.
- Depends on: extends
EventFilteredListPageBase<TDto>closed overPartnerDTO(line 18);IPartnerUIService(line 23),ListPageShell<TItem>(line 26, mounted at.../Pages/Partners/PartnerList.razor:10-70) for the grid, the mobile card list and theDeleteConfirmation,ListPageActions(line 76),ErrorMessages(line 82), andConferenceRoutePaths(lines 85,86). - Concept introduced: none new. This is the event-scoped variant of the list-page-as-overrides shape
taught on
ConferenceCategoryList, built overEventFilteredListPageBase<TDto>rather than the plain data-grid base: the extra base contributes the event picker state andApplyEventFilter, and it overrides the data-grid base'sOnBeforeFetchAsynchook to wait for the event load (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:213).- Every fetch waits for the event filter first, without the page saying so. The page has one fetch,
FetchPartnersAsync(lines 54-56), handed toLoadServerDataAsync(lines 58-59) and toMobilePageFetcher(FetchPartnersAsync, ApplyFilters, "Name")(lines 69-70). Both base paths awaitOnBeforeFetchAsyncbefore they build the filters, so the default event filter is resolved by the timeApplyFiltersreads it; the comment above the fetch says so (lines 52-53). - The reload path also answers to the event filter, not only the search box.
ReloadForEventFilterAsync(line 44) overrides the base's hook by delegating to the sameReloadActiveLayoutAsyncthatOnSearchChangeduses (lines 41-50), so changing the selected event (the picker at.../Pages/Partners/PartnerList.razor:25) reloads whichever layout (grid or mobile list) is on screen exactly the way a changed search term does.[Rubric §12, Performance & Scalability]and[Rubric §23, Front-End Performance & Rendering]: search, event filter, sort, and paging all execute server-side.
- Every fetch waits for the event filter first, without the page saying so. The page has one fetch,
- Walkthrough
EntityName(line 20) andTitle(line 21): localized labels;TypeLabel(line 33) localizes aPartnerType.- The captured shell (line 26) with the
GridRefandMobileListRefoverrides (lines 27-28): the same grid-reference plumbing as every other list page; the shell supplies the inline-error Retry. SavePageFilters/RestorePageFilters(lines 35-39): the one search term.ReloadActiveLayoutAsync(lines 41-42) passes the shell's mobile list to the base's reload;OnSearchChanged(lines 46-50) stores the term and returns that reload task directly rather than awaiting it.FetchPartnersAsync(lines 54-56),LoadServerData(lines 58-59) andFetchMobilePage(lines 69-70): the paired server and mobile fetch paths over the one service call, both delegating field-level filtering toApplyFilters(lines 61-66), which adds aNamecontains filter when the search box is non-empty and then callsApplyEventFilter.OnMobileCardClick(line 72),DeletePartnerAsync(PartnerDTO)(lines 75-83, routed throughListPageActions.DeleteWithConfirmationAsyncwith the shell'sDeleteDialog),NavigateToCreate(line 85), andNavigateToDetails(line 86).
- Why it's built this way: a partner belongs to exactly one event, so browsing it without an event filter would either show every event's partners at once or force a manual filter on every visit; the shared base makes the filter the default instead, and its fetch hook means no page can forget to wait for it.
- Where it's used: the
/partnersroute (.../Pages/Partners/PartnerList.razor:1-2, gated byHasPagePermission(ConferencePermissions.PartnersManage)). Rows and cards navigate toPartnerDetail; the create button opensPartnerCreate.
QuestionFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionFormModel.cs:24· Level 2 · class (abstract base form model)
- What it is: the editable question fields that the create page and the detail page's inline editor have in common: the question text with its rules, the display order, and the required flag. It is abstract, and the two concrete models derive from it.
- Depends on:
QuestionDTOfor the text cap (lines 2,35);System.ComponentModel.DataAnnotations. Its subclasses areQuestionCreateModelandQuestionEditModel. - Concept introduced, one shared model as the anti-drift device between a create form and an edit
form. The form-model mechanism itself is introduced on
ConferenceCategoryItemEditModel; what this type adds is the abstract base. Two pages edit a question:/questions/createand the inline editor on/questions/{Id}. Both bind the sameQuestionFormFieldscomponent (.../Pages/Questions/QuestionCreate.razor:25,.../Pages/Questions/QuestionDetail.razor:33), and that component'sModelparameter is typed asQuestionFormModel(.../Pages/Questions/QuestionFormFields.razor:42). The consequence is structural rather than conventional: a question text the create page accepts is a question text the detail page accepts, because there is exactly one[MaxLength]and one[Required]in the codebase for that field, and neither page can add a rule the other lacks.[Rubric §24, Forms, Validation & UX Safety]: a create form and an edit form that disagree on a rule is a classic source of "it saved yesterday and will not save today"; the shared base removes the possibility.[Rubric §1, SOLID](assesses whether shared behavior is factored to one owner): the base holds what is common, the subclasses hold only what differs (what a post looks like).[Rubric §15, Best Practices & Code Quality]:QuestionDTO.QuestionTextMaxLengthis1000(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Questions/QuestionDTO.cs:17) and is referenced, never copied. - Walkthrough
QuestionTextRequiredKey(line 31): the resource key"Validation.QuestionTextRequired", quoted both by the model's[Required](line 34) and by the field'sRequiredError(.../Pages/Questions/QuestionFormFields.razor:17).QuestionText(line 36): required, capped atQuestionDTO.QuestionTextMaxLength(line 35), rendered as a two-line text field whoseCounterreads the same constant (.../Pages/Questions/QuestionFormFields.razor:18-19).Sort(line 39) andIsRequired(line 42): plain properties. The doc comment records why they live here at all (lines 18-22): DataAnnotations cannot express either rule, but keeping them on the model lets one object carry the whole form instead of a parallel set of loose page fields.
- Why it's built this way: the alternative (each page owning its own fields plus its own copy of the rules) is how the Conference pages were written before the shared field block existed, and it makes every rule change a two-file edit with no compiler help. Abstract rather than concrete because there is no scenario that binds "just the shared part": every use is a create or an edit.
- Where it's used: as the base of
QuestionCreateModelandQuestionEditModel, and as the declared parameter type of the sharedQuestionFormFieldscomponent (.../Pages/Questions/QuestionFormFields.razor:42).
RoomFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomFormModel.cs:24· Level 2 · abstract class
- What it is: the editable half of a room, expressed once as a plain C# class with DataAnnotations
on it. It is
abstract(line 24) because nobody binds it directly: the create page bindsRoomCreateModeland the detail page's inline editor bindsRoomEditModel, and both inherit exactly these six properties. One declaration of the rules means a name the create form accepts is a name the edit form accepts (class doc, lines 6-13). - Depends on:
RoomDTOfor the length caps (lines 35, 45, 49, 53) and nothing else first-party. Externals:System.ComponentModel.DataAnnotations(RequiredAttribute,MaxLengthAttribute, line 1). It is consumed byModelValidationandDataAnnotationsModelValidator, named in the class doc at lines 9-10 and 16. - Concept introduced, the shared form model. A Blazor page could hold a loose field per input and
a
RequiredErrorstring per control. This codebase does the opposite: the fields live on one model, the rules live on that model as attributes, and the MudBlazor controls carry onlyForplus a single sharedValidationdelegate (seeMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomFormFields.razor:14-16). The delegate is built once per page byModelValidation.Forover aDataAnnotationsModelValidator(.../Pages/Room/RoomCreate.razor.cs:46,.../Pages/Room/RoomDetail.razor.cs:42), so a rule is declared exactly once and evaluated by both forms. Even the required affordance is derived rather than restated: the field asksModelValidation.IsRequired(Model, nameof(RoomFormModel.Name))(.../Pages/Room/RoomFormFields.razor:16) instead of hard-codingRequired="true".[Rubric §24, Forms, Validation & UX Safety]assesses whether a form can express only legal input and explains a rejection in place; here the model is the only rule declaration, so create and edit cannot diverge on what "legal" means.[Rubric §27, Internationalization]assesses whether user-facing text is externalized: everyErrorMessageon this model is a resource key, not a sentence (lines 31, 35, 45, 49, 53), and the page's localizing validator resolves it (class doc, lines 15-17; see ADR-027).[Rubric §15, Best Practices & Code Quality]assesses whether a number lives in one place: the caps are not literals here, they areRoomDTO.NameMaxLength(255),RoomDTO.FloorMaxLength(100),RoomDTO.LocationMaxLength(255) andRoomDTO.AccessibilityInfoMaxLength(500), declared atMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Rooms/RoomDTO.cs:16,19,22,25, the lowest layer the domain invariants, the EF configuration and this UI can all reach (RoomDTO.cs:7-11). - Walkthrough
NameRequiredKey = "Validation.NameRequired"(line 31) is aconstrather than a literal so that the model's[Required]rule and any field-levelRequiredErroraffordance quote the same key instead of two copies drifting apart (doc, lines 26-30).Name(line 36) is the only mandatory field:[Required(ErrorMessage = NameRequiredKey)]plus[MaxLength(RoomDTO.NameMaxLength, ...)](lines 34-35), defaulted tostring.Emptyso an unbound model still validates rather than null-references.Sort(line 39) andCapacity(line 42) are plain properties with no attributes. The class doc is explicit about why (lines 18-22): DataAnnotations cannot express what they need, but keeping them on the model lets one object carry the whole form instead of a parallel set of loose page fields.Capacityisint?, so "unknown capacity" and "zero seats" stay distinguishable.Floor(line 46),Location(line 50) andAccessibilityInfo(line 54) are nullable strings carrying only a[MaxLength]each, each with its own resource key.
- Why it's built this way: a room has one hard rule (it needs a name) and five soft ones (nothing may exceed the column width). Encoding that as attributes on a shared base is the cheapest way to make the create page and the inline editor provably agree, and it keeps the caps traceable to the single constant the persistence layer also uses, so widening a column is one edit, not four.
- Where it's used: subclassed by
RoomCreateModelandRoomEditModel; bound as theModelparameter of the sharedRoomFormFieldscomponent (.../Pages/Room/RoomFormFields.razor:50), which bothRoomCreateandRoomDetailrender. - Caveats / not-in-source: nothing on this model constrains
SortorCapacityto be non-negative. Whether the server rejects a negative capacity is decided by the domain invariants and the command validator, not here.
QuestionCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionCreateModel.cs:11· Level 3 · class (sealed form model)
- What it is: the form model for the organizer question-creation page. It adds the two fields that are
chosen once at creation and never edited afterwards (the target entity and the input type) and knows how
to turn itself into the
QuestionDTOthe create posts. - Depends on:
QuestionFormModel(base),QuestionDTO, and theQuestionIdentifierTypealias (ADR-048). - Concept introduced, the model owns the shape of the post. The page validates and calls the service;
it does not build the DTO field by field.
ToNew(lines 23-33) is the one place that maps form state onto the wire contract, which keeps the page's save handler down to "validate, map, post, navigate".[Rubric §18, UI Architecture & Component Design](assesses whether logic sits outside the component where it can be reasoned about alone): mapping is a pure function of the model, testable without a renderer.[Rubric §9, API & Contract Design](assesses how the client fills the contract): the create post is a fullQuestionDTO, not a partial patch. - Walkthrough
QuestionEntity(line 14) defaults to"Session"andQuestionType(line 17) defaults to"Rating", the common combination, so the organizer's most frequent case needs no interaction. Both render asMudSelectpickers only on the create leg, gated by the field block'sShowTargetPickersswitch (.../Pages/Questions/QuestionFormFields.razor:21, parameter at:63).ToNew()(lines 23-33) projects the model onto aQuestionDTOwithId = default(line 27); the in-code comment (line 26) records that the create handler always allocates the id inside the reserved range. Neither the model norQuestionCreatecarries any identifier policy:CreateQuestionHandlerowns it.
- Why it's built this way: an entity/type pair chosen at creation determines how every answer to the
question will be captured, so it belongs to the create form only; putting it on the create model rather
than the shared base is what makes
QuestionEditModelstructurally unable to change it. - Where it's used: the
_modelfield ofQuestionCreate(.../Pages/Questions/QuestionCreate.razor.cs:33), read at the post (.../Pages/Questions/QuestionCreate.razor.cs:42).
QuestionEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionEditModel.cs:12· Level 3 · class (sealed form model)
- What it is: the form model for the inline editor on the question detail page. It loads itself from
the question that was fetched and projects itself back onto an updated
QuestionDTO. - Depends on:
QuestionFormModel(base) andQuestionDTO. - Concept introduced, the edit buffer plus the concurrency round trip. Two mechanisms are worth
reading closely.
- The loaded record is never mutated.
LoadFrom(lines 16-23) copies the three editable values off the fetched DTO into the model, and the page renders from the DTO throughout. Cancelling an edit therefore needs no undo: the model is simply abandoned, and what is on screen is still exactly what the server last returned.[Rubric §19, State Management & Data Flow](assesses where mutable state lives and how long it lives): the edit buffer is a separate object with a scope of one editing session. ToUpdatedround-trips what it must not change. The new DTO (lines 34-44) carries the editedQuestionText,Sort, andIsRequiredover the loaded record'sId,RowVersion,QuestionEntity, andQuestionType.RowVersionis the client half of the optimistic-concurrency contract in ADR-035: a stale editor loses the write instead of silently overwriting a newer one.QuestionEntityandQuestionTypeare re-sent unchanged because the update contract is a full replacement, not a patch.[Rubric §8, Data Architecture](assesses how concurrent writes are reconciled and how immutable fields are protected). Both methods open withArgumentNullException.ThrowIfNull(lines 18,33), so a null argument fails at the call rather than as aNullReferenceExceptionseveral lines later.[Rubric §15, Best Practices & Code Quality].
- The loaded record is never mutated.
- Walkthrough
LoadFrom(QuestionDTO question)(lines 16-23): copiesQuestionText,Sort,IsRequired.ToUpdated(QuestionDTO question)(lines 31-45): builds the replacement DTO as described above.
- Why it's built this way: the class doc records the reasoning for the omission (lines 5-11). Retargeting a question or changing how it is answered would invalidate the answers already collected, so both fields are displayed but never edited; leaving them off the model makes that a compile-time fact rather than a markup discipline.
- Where it's used: the
_modelfield ofQuestionDetail(.../Pages/Questions/QuestionDetail.razor.cs:61), loaded atStartEditingAsync(line 105, theLoadFromcall at line 120) and read at the save (line 148).
RoomCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomCreateModel.cs:11· Level 3 · sealed class
- What it is: the create-page binding target. It adds no fields to
RoomFormModel(line 12), only the one method that turns the entered values into theRoomDTOthe page posts. - Depends on:
RoomFormModel(base),RoomDTOfromMMCA.ADC.Conference.Shared.Rooms(line 1), and the solution-wideEventIdentifierTypealias. No externals. - Concept introduced, the server-allocated key for an app-assigned identity. Room identity is
app-assigned, not database-generated, because the
intprimary key is the Sessionize room id (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Domain/Events/Room.cs:13, class at:13), which is how an imported room keeps a stable identity across refreshes. An organizer-created room has no Sessionize id, so someone has to pick one, and that someone is the server, not this page.ToNewpostsId = default(line 22, with the in-code note at line 21), exactly likeSponsorCreateModel(.../Pages/Sponsors/SponsorCreateModel.cs:22).RoomService.AddAsyncthen sends a default id asnullin the request'sRoomIdfield, because an explicit0would otherwise read as a client-chosen id (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Rooms/RoomService.cs:29-31). The controller passesrequest.RoomIdintoAddRoomCommand(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/RoomsController.cs:225), andAddRoomHandler, oncommand.RoomId is null, takes the highest id already in the reserved rangeEventInvariants.RoomManualIdRangeStarttoRoomManualIdRangeEnd(999_999_000 to 999_999_999,EventInvariantsat.../MMCA.ADC.Conference.Domain/Events/EventInvariants.cs:66,69) plus one, or the range start when it is empty, failing withRoom.ManualIdRangeExhaustedpast the end (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Events/UseCases/AddRoom/AddRoomHandler.cs:108-121).RoomSyncStrategyskips any Sessionize room whose id falls in that range (.../Events/UseCases/RefreshFromSessionize/RoomSyncStrategy.cs:95-97), so organizer rooms and imported rooms cannot collide.[Rubric §8, Data Architecture]assesses how identity is allocated and whether it stays stable: this is a deliberate trade of database-generated keys for import-stable ones, with allocation of the non-imported keys kept in one place on the server. - Walkthrough
ToNew(EventIdentifierType eventId)(lines 18-30) is an expression-bodied factory returning a freshRoomDTO.Idis left atdefault(line 22) and every editable property is copied straight off the base (lines 23, 25-29).EventId = eventId(line 24) comes in as a parameter rather than living on the model: the owning event is picked on the page and never changed afterwards, so it is not a form field (class doc, lines 5-10).
- Why it's built this way: keeping the create-only concern (build the posted DTO, stamp the owning
event) on the create model and every shared field on the base is what lets
RoomEditModelreuse the rules without inheriting aToNewit must not call. Leaving the key to the handler means the reserved-range rule lives only in the application layer. - Where it's used: instantiated once as
_modelonRoomCreate(.../Pages/Rooms/RoomCreate.razor.cs:26) and consumed inCreateRoomAsync(.../Pages/Rooms/RoomCreate.razor.cs:95). Covered byMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Rooms/RoomCreateModelTests.cs. - Caveats / not-in-source: the next id is computed as max-plus-one from a read of the reserved range
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Common/ManualIdAllocator.cs:28-44), so two organizer creates racing each other can compute the same id. The handler absorbs that: an organizer create runs throughManualIdAllocator.RetryOnCollisionAsync(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Events/UseCases/AddRoom/AddRoomHandler.cs:69-74), which re-runs the whole attempt in a fresh DI scope on a duplicate-key violation of the room id, up toMaxAttempts = 3(ManualIdAllocator.cs:16,60-90); a room-name uniqueness violation is deliberately not treated as a collision (AddRoomHandler.cs:147-167).
RoomEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomEditModel.cs:11· Level 3 · sealed class
- What it is: the binding target for the inline editor on
RoomDetail. Like its create sibling it adds no fields toRoomFormModel(line 11), only the two methods that move values between the loaded room and the form. - Depends on:
RoomFormModel(base) andRoomDTO(line 1). No externals beyondArgumentNullException. - Concept introduced, load-then-project as the edit contract. A create model needs one direction
(form to DTO); an edit model needs both, and the pair is deliberately asymmetric about which fields
survive.
LoadFromcopies only editable values in;ToUpdatedputs the edited values back over the identity, the owning event and the row version taken from the originally loaded DTO, never from the form. That is what makes "the event is displayed but never edited here" (class doc, lines 8-9) structurally true rather than a UI convention: there is no path by which a form field could changeEventId.[Rubric §24, Forms, Validation & UX Safety]assesses whether a form can express only legal input: moving a room between events is defined as a create plus a delete (doc, lines 8-9), so the edit model simply cannot express the illegal operation. - Walkthrough
LoadFrom(RoomDTO room)(lines 15-25) null-guards withArgumentNullException.ThrowIfNull(line 17), then assigns the six editable properties (lines 19-24). It does not touchId,EventIdorRowVersion, because the model has no such properties.ToUpdated(RoomDTO room)(lines 34-49) null-guards again (line 36) and returns a newRoomDTOwhoseId(line 40),RowVersion(line 41) andEventId(line 43) come from the passed-in loaded room while everything else comes from the form (lines 42, 44-48).- The row version is the client half of optimistic concurrency.
RoomDTOimplementsIConcurrencyAwareand declaresRowVersion(.../MMCA.ADC.Conference.Shared/Rooms/RoomDTO.cs:13,31), the same shape asSponsorDTO, so this model carries the token exactly asSponsorEditModeldoes. The method's doc comment (lines 27-31) states the contract: the row version travels as the PUT'sIf-Matchprecondition (ADR-035), so a save over another organizer's newer edit answers 412 instead of silently overwriting it.[Rubric §8, Data Architecture].
- Why it's built this way: the DTO is a
record classwithinit-only members (RoomDTO.cs:13,28), so "edit" cannot mean mutating the loaded object. Projecting a new DTO from the form over the loaded identity and version is the shape immutability forces, and it makes the set of fields an edit is allowed to change readable at a glance. - Where it's used: instantiated once as
_modelonRoomDetail(.../Pages/Rooms/RoomDetail.razor.cs:65);LoadFromruns inStartEditingAsync(.../Pages/Rooms/RoomDetail.razor.cs:175) andToUpdatedinSaveChangesAsync(.../Pages/Rooms/RoomDetail.razor.cs:203). Covered byMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Rooms/RoomEditModelTests.cs.
QuestionCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionCreate.razor.cs:9· Level 7 · class (Blazor code-behind)
- What it is: the organizer form that defines a feedback question: its text, the entity it attaches to
(
EventorSession), its input type (Rating,Text, orEmail), its sort order, and whether an answer is required. - Depends on: extends
CreatePageBase(declared in markup at.../Pages/Questions/QuestionCreate.razor:8), which supplies the injectedIToastServiceToast, theFormreference,IsSaving,IsDirty,SaveResult,MarkDirtyandSubmitAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:21-56);IQuestionUIService(line 11),QuestionCreateModel(line 33),CreateSubmitOptions(line 48),ConferenceRoutePaths(lines 24, 46, 50),ModelValidationandDataAnnotationsModelValidator(line 29). Externals: MudBlazor (BreadcrumbItem,Icons), theUnsavedChangesGuardandErrorSummarycomponents (.../Pages/Questions/QuestionCreate.razor:12,38), and theIStringLocalizer<QuestionCreate>injected asL(.../Pages/Questions/QuestionCreate.razor:7). - Concept introduced, the server-allocated identifier in a reserved range.
QuestionDTO.Idis a non-nullable alias overint, but the page does not choose it: it posts_model.ToNew()(line 42), which leavesIdat its default (QuestionCreateModel). Identity is assigned on the server.CreateQuestionHandleralways allocates the next free id in the user-created question band,QuestionInvariants.ManualIdRangeStarttoManualIdRangeEnd(999_999_000 to 999_999_999,QuestionInvariants,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Domain/Questions/QuestionInvariants.cs:70,73), the range that sits above every Sessionize-assigned id, and overwrites the request with it, with "Caller-provided IDs are ignored" written on the line (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Questions/UseCases/Create/CreateQuestionHandler.cs:52-64). Two concurrent creates that compute the same id are retried in a fresh scope on the unique-key violation (CreateQuestionHandler.cs:36-44). The page therefore navigates usingcreated.Idread back from the response (line 46). This is the same shape asConferenceCategoryCreateandRoomCreate, which also post a default id.[Rubric §8, Data Architecture](assesses who owns identifier assignment): identity is server-owned inside a reserved range, because the same table also holds rows imported from Sessionize under externally assigned ids.[Rubric §24, Forms, Validation & UX Safety]: the validate-then-submit, dirty-guard, and cancel-on-disposal rails are not written on this page at all; they live once inCreatePageBase, andCreateQuestionAsync(lines 41-48) is a singleSubmitAsynccall. The base ignores a submit while the form is unbound or a save is in flight, clearsSaveResult, validates and toastsErrorMessages.ValidationErroron an invalid form (.../Pages/Common/CreatePageBase.cs:61-73), runs the optional pre-check (lines 75-80), setsIsSavingand calls the page's save delegate with the inheritedPageToken(lines 82-85). On success it clearsSaveResultandIsDirtybefore it runs the page's success step (lines 86-91), so theUnsavedChangesGuarddoes not fire on the page's own redirect. On failure it keeps the result inSaveResult, which the page binds to itsErrorSummaryalongside the form's own validation messages (.../Pages/Questions/QuestionCreate.razor:38), and also raisesNotifyOnFailurewith the options' localizer (.../Pages/Common/CreatePageBase.cs:94-98), so the wording survives a snackbar that times out while the organizer is still reading the form. AnOperationCanceledException(the page token is cancelled when the component is disposed) ends the submit withfalse(lines 102-105), andIsSavingis cleared in thefinally(lines 106-109). - Walkthrough
OnInitialized(lines 18-30): the Home / Questions / Create breadcrumb trail (lines 21-26), then the validation delegate (line 29, with the ADR-027 comment at line 28).- The page's own form state is the
_model(line 33) and the_validatedelegate (line 37); the form reference, the dirty and saving flags and the last failedResultare inherited fromCreatePageBase. The defaults for target entity and type live on the model, not the page (seeQuestionCreateModel). CreateQuestionAsync(lines 41-48) returnsTask<bool>. Its save delegate posts_model.ToNew()with the token the base hands it (line 42); its success step toastsSnackbar.Created(line 45) and redirects toConferenceRoutePaths.QuestionDetails(created.Id)(line 46); its options setLocalizer = L(line 48). The in-code comment (lines 39-40) notes that a failed save is kept for theErrorSummaryand toasted.NavigateToList(line 50) is the cancel path back to/questions.
- Why it's built this way: questions are the schema behind every feedback screen in both the Conference and Engagement modules, so they are organizer-authored data rather than configuration. The reserved id band is what lets hand-authored questions and imported ones share a table without collisions.
- Where it's used: the
/questions/createorganizer route, gated byHasPagePermission(ConferencePermissions.QuestionsManage)(.../Pages/Questions/QuestionCreate.razor:1-2), reached fromQuestionList's create button; on success it hands off toQuestionDetail. It has a bUnit component test class (as doesRoomCreate),QuestionCreateTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Questions/QuestionCreateTests.cs:19), which asserts that a blank submit shows the model's own required message without MudBlazor's duplicate, that the required field keeps itsaria-requiredaffordance, that an overlong text shows the model's max-length message and does not post, and that a valid submit callsAddAsyncwith the defaults and navigates to the detail page.[Rubric §28, Front-End Testing].
QuestionList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionList.razor.cs:11· Level 6 · class (Blazor code-behind)
- What it is: the organizer browse page for feedback questions. Structurally the twin of
ConferenceCategoryList: same base class, same two layouts, same delete flow, with the search bound to the question text. - Depends on: extends
DataGridListPageBase<TDto>overQuestionDTO(line 11, declared in markup at.../Pages/Questions/QuestionList.razor:5);IQuestionUIService(line 31);ListPageShell<TItem>(line 34, mounted at.../Pages/Questions/QuestionList.razor:10), which owns the grid, the mobile list and the delete dialog that the page reads back throughGridRefandMobileListRef(lines 35-36) and_shell!.DeleteDialog!(line 79);MobileInfiniteScrollList<TItem>(line 36),ListPageActions(line 78),ErrorMessages(line 84),ConferenceRoutePaths(lines 74, 87), andResult(line 56). - Concept introduced: none new. See
ConferenceCategoryListfor the base-class contract (the grid reference override, filter persistence, the fetch delegates, the inline retry, and the shared delete action). - Walkthrough (only the differences from
ConferenceCategoryList):- One fetch,
FetchQuestionsAsync(lines 55-58), serves both layouts.LoadServerDatahands it to the base'sLoadServerDataAsynctogether withApplyFilters(lines 60-61), andFetchMobilePage(lines 70-71) is built by the base'sMobilePageFetcherfrom the same fetch and the same filters, sorting byQuestionText(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1101).ApplyFilters(lines 63-67) addsQuestionText contains <search>when a search string is present. - The fetch passes no
includeChildren: a question has no children to count, so the list stays a plain paged read (line 58).[Rubric §12, Performance & Scalability]. ReloadActiveLayoutAsync(lines 46-47) forwards the shell's mobile list to the base overload (.../Pages/Common/DataGridListPageBase.cs:1746), which reloads whichever layout is mounted.OptionLabel(lines 21-30, documented at lines 16-20) is the one addition over the category twin: it maps a stored question entity, type or source string to a localized label through theOption.{raw}resource keys the question form also uses (ADR-027), returning an empty string for null or empty input and falling back to the raw value whenResourceNotFoundis set, so a missing resource never surfaces the key.DeleteQuestionAsync(lines 77-85) passes the shell's delete dialog (line 79) andquestion.QuestionTextas the confirmation label (line 80), so the dialog names the question being removed rather than showing a bare id.[Rubric §24, Forms, Validation & UX Safety].
- One fetch,
- Why it's built this way: questions are low-volume reference data, so the page needs browse, search, and delete but no filters or enrichment; keeping it on the same base means it inherits URL-persisted paging, sorting, and the inline retry state for free.
- Where it's used: the
/questionsorganizer route, gated byHasPagePermission(ConferencePermissions.QuestionsManage)(.../Pages/Questions/QuestionList.razor:1-2); the create button opensQuestionCreate(line 87) and rows openQuestionDetail(line 74).
RoomCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomCreate.razor.cs:10· Level 10 · class (Blazor code-behind)
- What it is: the organizer form that adds a room to an event's venue. It collects the name, the
owning event, the display order, an optional capacity, floor, location and accessibility note, then
posts one
RoomDTOand routes to the new room's detail page. The route is/rooms/create, gated byHasPagePermission(ConferencePermissions.RoomsManage)(.../Pages/Rooms/RoomCreate.razor:1-2). - Depends on: extends
CreatePageBase(declared in markup at.../Pages/Rooms/RoomCreate.razor:7), which suppliesToast,Form,IsSaving,IsDirty,SaveResult,MarkDirtyandSubmitAsync, and throughCancellablePageBasethePageToken(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:21-56);IRoomUIService(line 12),IEventLookupServicereturningEventInfo(lines 13, 26),EventInfoDefaults(line 54),ConferenceRoutePaths(lines 37, 82, 93),ModelValidationandDataAnnotationsModelValidator(line 42),RoomCreateModel(line 21), andCreateSubmitOptions(lines 84-88). Externals: Blazor ([Inject],NavigationManager),TimeProvider(line 14), MudBlazor (BreadcrumbItem,Icons), and theIStringLocalizer<RoomCreate>injected by the template (.../Pages/Rooms/RoomCreate.razor:6). The markup also usesUnsavedChangesGuardandErrorSummaryfromMMCA.Common.UI.Components(.../Pages/Rooms/RoomCreate.razor:11,:34) and the ADC-localRoomFormFields(.../Pages/Rooms/RoomCreate.razor:23-26). - Concept introduced, the shared field block plus the shared validation delegate. The form model
taught the "declare the rules once" half; this page shows the other half at work. The page owns no
markup for the fields at all: it renders
RoomFormFieldsinside aMudForm(.../Pages/Rooms/RoomCreate.razor:22-27), passes the model, the delegate and the localizer, and that same component is rendered byRoomDetail's editor (.../Pages/Rooms/RoomDetail.razor:32-35). The delegate itself is one field on the page,Func<object, string, IEnumerable<string>> _validate(line 30), built at line 42 from the model and a localizing validator. MudBlazor calls it with(model, memberPath)and the model's own DataAnnotations decide the outcome, which the in-code comment states directly (lines 28-29).[Rubric §18, UI Architecture]assesses whether presentation is decomposed so that a change lands in one place: the create page and the edit page share the fields, the rules and the localizer wiring, and differ only in whether the event picker is offered.[Rubric §24, Forms, Validation & UX Safety]also applies, and the mechanics now come fromCreatePageBaserather than the page. The base validates before it posts and reports with a localized toast rather than a silent no-op (.../Pages/Common/CreatePageBase.cs:68-73).IsDirty, set byMarkDirtybound to the field block'sOnFieldChanged(.../Pages/Rooms/RoomCreate.razor:24), drivesUnsavedChangesGuard(.../Pages/Rooms/RoomCreate.razor:11) so navigating away mid-edit prompts; the base clears it before it runs the page's success step (.../Pages/Common/CreatePageBase.cs:88-90), which is what stops the guard from firing on the page's own redirect. A failed save is kept inSaveResult, bound to the page'sErrorSummaryalongside the form's own validation messages (.../Pages/Rooms/RoomCreate.razor:34), and still raises the snackbar throughNotifyOnFailure(.../Pages/Common/CreatePageBase.cs:94-98), so the wording survives a snackbar that times out while the organizer is still reading the form. - Walkthrough
OnInitializedAsync(lines 32-60) builds the three breadcrumbs (Home, Rooms, Create, with the lastdisabled: trueso it renders as the current page, lines 34-39), then builds the validation delegate (line 42, with the ADR-027 comment at line 41).- It then loads the event lookup through the inherited
PageToken(line 46). A failed lookup is fatal to initialization here: it toastsSnackbar.LoadEventsFailedand returns (lines 48-49). ContrastSponsorCreate, which treats the same failure as non-critical. - The default event is the current or next one:
_eventId ??= EventInfoDefaults.SelectCurrentOrNextId(_eventLookup, TimeProvider.GetUtcNow().UtcDateTime)(line 54, with the in-code comment at lines 52-53), the same ruleSponsorCreateapplies (.../Pages/Sponsors/SponsorCreate.razor.cs:55).EventInfoDefaultspicks the event live now, else the next upcoming, else the most recently ended, and returnsnullwhen there is no event to pick (.../Services/Events/EventInfoDefaults.cs:14-20). Reading the clock through the injectedTimeProviderkeeps the choice testable. The??=leaves an already chosen event alone. - The picker is only rendered when there is a real choice:
ShowEventPickeris bound to_eventLookup is not null && _eventLookup.Count > 1(.../Pages/Rooms/RoomCreate.razor:25), so a single-event deployment never shows a one-option dropdown; with two or more events the picker opens on the defaulted one. _eventIdis a nullableEventIdentifierType?(line 24, with the in-code comment at lines 22-23): it staysnulluntil an event is picked or defaulted, so a failed lookup or an untouched picker cannot post the default id 0.CreateRoomAsync(lines 68-89) returnsTask<bool>; the in-code comment (lines 62-67) states its order. When no event is chosen, the form is bound and no save is in flight, it validates the form itself so the field errors show inline, toastsEventRequiredMessage(the localizedValidation.EventRequired, line 91) and returnsfalse(lines 70-75): the missing event is reported ahead of the form's own validity, because the required picker makes the form invalid too. Otherwise it hands off toSubmitAsync(lines 77-88): the save delegate posts_model.ToNew(_eventId!.Value)throughIRoomUIService.AddAsyncwith the token the base passes (line 78), the success step toastsSnackbar.Createdand navigates toConferenceRoutePaths.RoomDetails(created.Id)(lines 81-82), and the options carryLocalizer = Lplus aPreCheckthat returnsEventRequiredMessagewhen_eventIdis null (lines 84-88). The base runs that pre-check after its own validation await (.../Pages/Common/CreatePageBase.cs:75-80), so it guards the_eventId!.Valueread against a value that changed during the await.OperationCanceledExceptionis swallowed inOnInitializedAsync(lines 56-59) and insideSubmitAsync(.../Pages/Common/CreatePageBase.cs:102-105) as expected during disposal or anInteractiveAutorender-mode transition (see ADR-056).IsSavingis cleared in the base'sfinally(.../Pages/Common/CreatePageBase.cs:106-109), which re-enables the submit button after a failure.NavigateToList(line 93) is the cancel path. The page declares noDisposeof its own: the lifetime token and its cancellation belong toCancellablePageBase.
- Why it's built this way: a room is a small entity with one required field, so the page carries no cross-field rules and no staged workflow. The two pieces of discipline every create page in this group needs, a cancellation token tied to component lifetime and a dirty flag that is cleared only on a successful save, come from the shared base instead of being re-implemented on the page.
- Where it's used: reached from
RoomList's create button (.../Pages/Rooms/RoomList.razor.cs:77); on success it hands off toRoomDetail. - Caveats / not-in-source: the page never chooses the room id.
ToNewposts a default id and the server allocates one in the reserved manual range (seeRoomCreateModel), so the page navigates with thecreated.Idread back from the response (line 82).
QuestionDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Questions/QuestionDetail.razor.cs:14· Level 8 · class (Blazor code-behind)
- What it is: the organizer's view, edit, and delete page for a single feedback question. It is the smallest detail page in the group: three editable fields, no lookups, and no child entities.
- Depends on:
DetailPageBase(base class,.../Pages/Questions/QuestionDetail.razor:7),IQuestionUIService(line 18),QuestionEditModel(line 61),IToastService(line 20),ResultUiExtensionsforNotifyOnFailure(lines 151,193),CommittedWriteReload(field at line 64),ConferenceRoutePaths(lines 49,206),ErrorMessages(line 141), andModelValidation(line 54). Externals: MudBlazorMudForm, plus theDetailLoadStateContent,ErrorSummary,UnsavedChangesGuard, andDeleteConfirmationcomponents (.../Pages/Questions/QuestionDetail.razor:19,42,12,81). - Concept introduced: none new. Typed route-id binding, load-once-on-parameters, the edit buffer, the
RowVersionround trip, and refetch-after-save are all covered onConferenceCategoryDetailandQuestionEditModel. The page-scopedCancellationTokenSource(PageToken), the load state machine (LoadState,BeginLoad,CompleteLoad), theIsEditing/IsDirtypair, andBeginEdit/EndEditare inherited fromDetailPageBase(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:38,52,59,78,98,101,120,127) rather than declared here, so the code-behind carries none of that plumbing itself.[Rubric Section 8, Data Architecture]: the immutable-after-create fields (QuestionEntity,QuestionType) are round-tripped byQuestionEditModel.ToUpdatedrather than omitted, so the update contract stays a full replacement.[Rubric Section 11, Security]: organizer-only route (.../Pages/Questions/QuestionDetail.razor:2). - Walkthrough
OptionLabel(lines 31-40) localizes a stored question entity, type or source through theOption.{raw}resource keys shared with the question form (ADR-027): empty input yields an empty string, and a value with no resource falls back to the raw value rather than the missing key.OnInitialized(lines 43-55): the Home / Questions / Details breadcrumb trail, then the validation delegate (line 54).- The route id is already typed:
[Parameter] public QuestionIdentifierType Id(line 22) and_loadedIdis aQuestionIdentifierType?, so the page does no string parsing. OnParametersSetAsync(lines 72-81) is synchronous: the_loadedIdguard returnsTask.CompletedTask(lines 74-77), otherwise it records the id and returnsLoadAsync()(line 80).LoadAsync(lines 83-103) is a separate method so the markup's Retry can call it again (.../Pages/Questions/QuestionDetail.razor:22). It calls the inheritedBeginLoad()(line 86), which supersedes any load already in flight, resetsLoadStatetoLoading, and returns a(token, generation)pair (.../Pages/Common/DetailPageBase.cs:59-64).GetByIdAsync(Id, ...)runs with thattokeninstead ofPageToken(line 90), and the page adopts the question only whenCompleteLoad(generation, result)returns true and the value unwraps (line 94).CompleteLoadignores a superseded generation and otherwise setsLoadStatetoLoaded,NotFound, orFailed(.../Pages/Common/DetailPageBase.cs:78-95). A not-found or failed load raises no toast: the template'sDetailLoadStateContentstates it, with Retry for a failure (.../Pages/Questions/QuestionDetail.razor:17-23).StartEditingAsync(lines 105-127) is asynchronous. It asksCommittedWriteReload.EnsureCurrentAsync(line 114) to re-read the question when an earlier committed save's reload failed, and returns without opening the editor if that yields nothing. Otherwise it adopts the current record intoQuestion, loads the edit model from it (line 120) and opens the editor with the inheritedBeginEdit(line 121);OperationCanceledExceptionis swallowed (lines 123-126).CancelEditing(line 129) is a one-line forward to the inheritedEndEdit.SaveChangesAsync(lines 131-173): validate (lines 138-143),UpdateAsync(_model.ToUpdated(Question))(line 148), then refetch (line 156). The update has already committed at that point, so_writeReload.TryAdopt(line 157) adopts the refreshed record and toastsSnackbar.Updatedon success (lines 159-160), or toastsSnackbar.SavedRefreshFailedwhen the reload fails; either way the editor closes withEndEdit(line 163), so a failed reload does not strand the organizer in edit mode.DeleteQuestionAsync(lines 175-204): confirm with the question text as the label (line 182) and return when it is declined (!confirmed, lines 183-186;DeleteConfirmation.ShowAsyncyields a plainbool,MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), delete (line 190), and navigate back to the list (line 198).
- Why it's built this way: a question's entity and type determine how every existing answer was captured, so changing them after answers exist would invalidate stored data; restricting the edit surface to text, order, and required-ness is the simplest way to keep answers interpretable.
- Where it's used: the
/questions/{Id}organizer route (.../Pages/Questions/QuestionDetail.razor:1-2), reached fromQuestionListrows and fromQuestionCreate's success redirect.
RoomDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomDetail.razor.cs:16· Level 8 · class (Blazor code-behind)
- What it is: the organizer's single-room page at
/rooms/{Id:int}(.../Pages/Rooms/RoomDetail.razor:1,HasPagePermission(ConferencePermissions.RoomsManage)at:2). It loads one room, renders it read-only, flips into an inline editor bound toRoomEditModel, deletes behind a confirmation dialog, and manages the room's door check-in code: its QR code, whether the server requires it, and a confirmed rotation. - Depends on:
DetailPageBase(base class,.../Pages/Rooms/RoomDetail.razor:7),IRoomUIService(line 20),IEventLookupService(line 21),IToastService(line 23),IAppDialogService(line 24) for the rotation confirmation,RoomEditModel(line 65),RoomDTO(line 47),RoomCheckInCodeDTO(returned byGetCheckInCodeAsyncandRotateCheckInCodeAsync,.../Services/Rooms/IRoomUIService.cs:16,19),CommittedWriteReload(field at line 68),ConferenceRoutePaths(lines 38, 303 and.../Pages/Rooms/RoomDetail.razor:64),ErrorMessages(line 196),ResultUiExtensionsforNotifyOnFailure(lines 113, 131, 206, 248, 283), andModelValidation(line 43). Externals: Blazor ([Parameter],NavigationManager), MudBlazor (MudForm,MudSimpleTable,BreadcrumbItem),System.Globalization.CultureInfo(line 161). The markup composesDetailLoadStateContent,ErrorSummary,UnsavedChangesGuard,QrCodeButtonandDeleteConfirmationfromMMCA.Common.UI.Components(.../Pages/Rooms/RoomDetail.razor:19,42,12,64,125). - Concept introduced, the load-state detail page and the typed route parameter. The template is a
single
if / else if / elsechain: anything short of a loaded room, then the editor, then the read-only card (.../Pages/Rooms/RoomDetail.razor:17,24,52). The first branch hands the inheritedLoadState(DetailLoadState) toDetailLoadStateContent, which renders loading, not-found, or failed-with-Retry (.../Pages/Rooms/RoomDetail.razor:19-22), so a missing room and an unreachable one never share the same body. That chain is why the page never renders a half-populated card. The other mechanic on this page is how the route id is handled.Idis declared[Parameter] public RoomIdentifierType Id(line 26), the module's identifier alias, so the code-behind passes it straight toGetByIdAsync(Id, ...)(line 95) with no string parsing in between.SponsorDetailbinds its id the same way, with a constrained{Id:int}route and anintparameter (.../Pages/Sponsor/SponsorDetail.razor:1,.../Pages/Sponsor/SponsorDetail.razor.cs:27). The reload guard is worth internalizing:OnParametersSetAsyncreturns immediately whenId == _loadedId(lines 79-82), where_loadedIdis aRoomIdentifierType?. Blazor callsOnParametersSetAsyncon every parameter set, not only on navigation, so without this guard an unrelated re-render would refetch the room.[Rubric Section 19, State Management]assesses whether component state is fetched once and invalidated deliberately:_loadedIdis the invalidation key, and_eventsis fetched only when still null (line 112), so switching rooms does not refetch the event lookup. The check-in code is a second piece of state read beside the room rather than with it: the room reads are anonymous and never carry the code (the in-code comment at lines 106-107), soLoadAsynccallsReadCheckInCodeAsync(line 108) on the same guarded token. That method (lines 128-141) keeps "no code issued" apart from "could not read": a successful read setsCheckInCode(null when none was issued),CheckInCodeRequired, and clearsCheckInCodeReadFailed(lines 131-136); a failed one toasts throughNotifyOnFailure, nulls the code and setsCheckInCodeReadFailed(lines 139-140). The template renders theQrCodeButtononly when the read did not fail (.../Pages/Rooms/RoomDetail.razor:62-64) and otherwise shows an error with a retry button (.../Pages/Rooms/RoomDetail.razor:93-100), so a print can never silently lose the code (the property's doc comment, lines 56-60).[Rubric Section 24, Forms, Validation & UX Safety]shows up in the edit lifecycle:StartEditingAsyncseeds the model and opens the editor with the inheritedBeginEdit(lines 163-182),CancelEditingis a one-line forward to the inheritedEndEdit(line 184), and a committed save re-reads the room from the server before leaving edit mode (lines 211-218) rather than trusting the local projection. - Walkthrough
OnInitialized(lines 32-44) builds the breadcrumbs synchronously and constructs the shared validation delegate (line 43), the same one-line wiringRoomCreateuses.OnParametersSetAsync(lines 77-86) is synchronous: past the guard it sets_loadedIdand returnsLoadAsync()(line 85).LoadAsync(lines 88-122) is its own method because the template's Retry calls it again (.../Pages/Rooms/RoomDetail.razor:22).LoadAsynccalls the inheritedBeginLoad()(line 91), which supersedes any load already in flight throughLatestLoadGuard, resetsLoadStatetoLoading, and returns a(token, generation)pair (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:48-53). It fetches the typedIdthroughIRoomUIService.GetByIdAsyncwith thattokenrather thanPageToken(line 95), then returns unlessCompleteLoad(generation, result)is true and the room unwraps (lines 99-102).CompleteLoaddrops a superseded generation and otherwise setsLoadStatetoLoaded,NotFound(when theResultis not-found), orFailed(.../Pages/Common/DetailPageBase.cs:78-95). A not-found or failed room load raises no toast; the page body states it.- With the room adopted (line 104), the load reads the check-in code (line 108), then loads the event
lookup once, lazily (lines 112-116), also on the guarded
token(line 112). The in-code comment (lines 110-111) notes that a failed lookup is reported throughNotifyOnFailure(line 113) and stops the load, with the room itself already adopted. RetryCheckInCodeAsync(lines 143-158) re-reads the code withPageToken(line 152), swallowingOperationCanceledException; it is bound to the retry button (.../Pages/Rooms/RoomDetail.razor:99).GetEventName(lines 160-161) resolves an event's display name from the lookup, falling back to the raw id underCultureInfo.InvariantCulture. The template only renders the event row when there is more than one event to distinguish (.../Pages/Rooms/RoomDetail.razor:75).StartEditingAsync(lines 163-182) asksCommittedWriteReload.EnsureCurrentAsync(lines 167-168) to re-read the room when an earlier committed save's reload failed, and returns without opening the editor if that yields nothing. Otherwise it adopts the current record intoRoom(line 174), loads the edit model from it (line 175) and opens the editor withBeginEdit(line 176);OperationCanceledExceptionis swallowed (lines 178-181).CancelEditing(line 184) forwards toEndEdit.SaveChangesAsync(lines 186-228) validates the form (lines 193-198), posts_model.ToUpdated(Room)throughUpdateAsync(line 203), then re-fetches the room (line 211). The update has already committed, so_writeReload.TryAdopt(line 212) either swapsRoomfor the refreshed instance and toastsSnackbar.Updated(lines 214-215), or toastsSnackbar.SavedRefreshFailed; either way the editor closes withEndEdit(line 218).IsSavingis cleared in thefinally(lines 224-227).DeleteRoomAsync(lines 230-259) awaits_deleteConfirm.ShowAsync(Room.Name)(line 237) and returns on a declined confirmation (!confirmed, lines 238-241;ShowAsyncyields a plainbool,MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), then callsIRoomUIService.DeleteAsync(Room.Id, Room.EventId, PageToken)(line 245), toasts and navigates back to the list.RotateCheckInCodeAsync(lines 261-301) returns when there is no room or a rotation is already in flight (lines 263-266), then asks for confirmation throughIAppDialogService.ConfirmAsyncwithdestructive: true(lines 268-273), because the service issues a new code and the previous printed QR stops working (.../Services/Rooms/IRoomUIService.cs:18). It setsIsRotating(line 279), which disables the rotate button (.../Pages/Rooms/RoomDetail.razor:114), postsRotateCheckInCodeAsync(Room.Id, Room.EventId, PageToken)(line 282), and on success adopts the new code and required flag, clears the read-failed flag and toastsCheckInCode.Rotated(lines 288-291).IsRotatingis cleared in thefinally(lines 297-300).
- Why it's built this way: an inline editor on the same page as the read-only record keeps the
organizer's context (they are looking at the room they are changing) and lets one component,
RoomFormFields, serve both create and edit. Re-fetching after a successful update is the honest choice: the server may have normalized values, and the page then shows what was actually stored. Because the update has already committed when that re-fetch runs, a failed reload ends the edit anyway and leavesCommittedWriteReloadto re-read before the next edit opens. - Where it's used: it is the navigation target of
RoomCreateon success (.../Pages/Rooms/RoomCreate.razor.cs:82) and of every row link and mobile card onRoomList(.../Pages/Rooms/RoomList.razor.cs:64,.../Pages/Rooms/RoomList.razor:64,74,81,96,102). ItsQrCodeButtonpoints atConferenceRoutePaths.RoomCheckInLink(Room.Id, CheckInCode)(.../Pages/Rooms/RoomDetail.razor:64), which resolves to the Engagement-owned/engage/rooms/{id}landing page, with?code=appended when a code has been issued (.../MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:68-71), so the printed code takes an attendee to self check-in rather than to this management screen. - Caveats / not-in-source: the delete call binds the ADC-specific overload
DeleteAsync(RoomIdentifierType roomId, EventIdentifierType eventId, CancellationToken)(.../Services/Rooms/IRoomUIService.cs:13), not the baseIEntityService.DeleteAsync(id, ...). That overload issuesDELETE rooms/{roomId}?eventId={eventId}(.../Services/Rooms/RoomService.cs:45-48), which the API's delete route needs: it declares[FromQuery] EventIdentifierType eventIdand buildsnew RemoveRoomCommand(eventId, id)from it (.../MMCA.ADC.Conference.API/Controllers/Events/RoomsController.cs:267-274).RoomListcalls the same overload (.../Pages/Rooms/RoomList.razor.cs:71), so both delete paths carry the owning event. The baseDeleteAsync(id, cancellationToken)is still reachable on the same service, and a call shapedDeleteAsync(Room.Id, PageToken)would bind it and send noeventId; nothing but review and the page tests keeps the two-argument form out.
RoomList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Rooms/RoomList.razor.cs:12· Level 10 · class (Blazor code-behind)
- What it is: the organizer's room index at
/rooms(.../Pages/Rooms/RoomList.razor:4-5, gated byHasPagePermission(ConferencePermissions.RoomsManage)): a server-paged, sortable, filterable grid on desktop and an infinite-scroll card list on mobile, both inside oneListPageShell, with a name search and an event filter. - Depends on:
EventFilteredListPageBase<TDto>as its base (line 12, declared in markup at.../Pages/Rooms/RoomList.razor:6),IRoomUIService(line 17),ListPageShell<TItem>(line 20, mounted at.../Pages/Rooms/RoomList.razor:11),ListPageActions(line 68),MobileInfiniteScrollList<TItem>(line 22),ConferenceRoutePaths(lines 64, 77),ErrorMessages(line 74),Result(line 45) andRoomDTO. Externals: MudBlazor (MudDataGrid,GridState,GridData), BlazorNavigationManager. - Concept introduced: none new at the page level. The event-scoped list machinery lives in
EventFilteredListPageBase<TDto>(.../Pages/Common/EventFilteredListPageBase.cs:25), which sits onDataGridListPageBase<TDto>. This page is worth reading as the minimal derivation: it overrides only the three hooks the base declares abstract or virtual for page-specific state, and inherits everything else.[Rubric §1, SOLID]assesses whether a base class exposes the right extension points: the three overrides here (SavePageFilters,RestorePageFilters,ReloadForEventFilterAsync, lines 26, 29,- plus
GridRefandMobileListRef(lines 21-22) andTitle(line 15) are the entire contract, and everything else the page needs (the event lookup, the persistedeventIdfilter, the current-or-next default) comes for free.[Rubric §22, Responsive and Cross-Browser]assesses whether the layout adapts rather than shrinks: the shell is handedIsMobile(.../Pages/Rooms/RoomList.razor:15) and switches between the card template (:37-53) and the grid columns (:61-112), and within the grid three columns carryHeaderClass="hide-below-desktop" CellClass="hide-below-desktop"(:79,94,100), so capacity, floor and location drop out on narrow viewports instead of forcing a horizontal scroll.[Rubric §23, Front-End Performance]assesses payload and round-trip discipline: paging, sorting and filtering are all server-side (ServerData="LoadServerData",.../Pages/Rooms/RoomList.razor:16).
- plus
- Walkthrough
SavePageFilters/RestorePageFilters(lines 26-30) persist exactly one page-specific value, the search string, under the keysearch. The event filter is persisted by the base.ReloadActiveLayoutAsync(lines 32-33) forwards the shell's mobile list to the base overload (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879), which reloads whichever of the mobile list or the grid is actually mounted.ReloadForEventFilterAsync(line 35) is the abstract hook (.../Pages/Common/EventFilteredListPageBase.cs:91) the base calls when the event picker changes (.../Pages/Common/EventFilteredListPageBase.cs:227), and it simply forwards.- One fetch,
FetchRoomsAsync(lines 45-47), serves both layouts;LoadServerData(lines 49-50) hands it to the base'sLoadServerDataAsyncwithApplyFilters. The in-code comment (lines 43-44) states the ordering rule: the base waits for the event load beforeApplyFiltersreads the selected event. That wait isEventFilteredListPageBase's override ofOnBeforeFetchAsync, which returnsWaitForEventsAsync()(.../Pages/Common/EventFilteredListPageBase.cs:204,213), the hook the base's fetch paths await before building filters (.../Pages/Common/DataGridListPageBase.cs:944,988). ApplyFilters(lines 52-57) contributes the page-specificNamecontainsfilter when a search string is present (lines 54-55), then calls the base'sApplyEventFilter(line 56), which addsEventIdequalswhen an event is selected (.../Pages/Common/EventFilteredListPageBase.cs:216).FetchMobilePage(lines 60-61) is the mobile equivalent, built by the base'sMobilePageFetcher(.../Pages/Common/DataGridListPageBase.cs:968) from the same fetch and the sameApplyFilters, sorted byName. Both layouts therefore query with identical semantics.DeleteRoomAsync(lines 67-75) hands the whole confirm-delete-toast-reload sequence toListPageActions.DeleteWithConfirmationAsync(.../MMCA.Common.UI/Pages/Common/ListPageActions.cs:56), passing the shell's delete dialog (_shell!.DeleteDialog!, line 69), the row's name, the delete call, the toast service, the success message, a failure-message factory and the reload callback. Note the delete call here is the ADC-specific overloadRoomService.DeleteAsync(room.Id, room.EventId)(line 71,.../Services/Rooms/IRoomUIService.cs:13), which appends?eventId=to the request (.../Services/Rooms/RoomService.cs:45-48).- The inline retry for a failed fetch belongs to the shell, which is handed the base's
LoadFailed(.../Pages/Rooms/RoomList.razor:17); the page declares no retry method of its own. NavigateToCreate(line 77) andOnMobileCardClick(lines 63-64) are the two navigation edges.- The event column and the mobile card's event line are both conditional on
Events is not null && Events.Count > 1(.../Pages/Rooms/RoomList.razor:40,67), so a single-event deployment shows no redundant column.
- Why it's built this way: rooms are a small, flat list that organizers scan rather than search deeply, so the page spends its budget on making the same data legible on a phone at the venue (the card layout) and on a laptop (the grid), from one set of filters.
- Where it's used: it is the
/roomsroute reached from the Rooms breadcrumb on bothRoomCreateandRoomDetail, and it navigates on to both of them. - Caveats / not-in-source: the mobile card shows the capacity line only when
item.Capacity > 0(.../Pages/Rooms/RoomList.razor:44), so a room recorded with a capacity of zero is displayed identically to one with no capacity recorded at all, even thoughRoomDTO.Capacityis nullable and can distinguish them (.../MMCA.ADC.Conference.Shared/Events/RoomDTO.cs:37).
SponsorFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorFormModel.cs:26· Level 2 · abstract class
- What it is: the sponsor equivalent of
RoomFormModel: one abstract class (line 25) holding the ten editable sponsor fields and the DataAnnotations that govern them, shared bySponsorCreateModelandSponsorEditModel. - Depends on:
SponsorDTOfor every length cap andSponsorTierfor the package enum (line 2), plusAbsoluteUrlAttributefromMMCA.Common.UI.Validation(line 3). Externals:System.ComponentModel.DataAnnotations(line 1). - Concept introduced, the nullable enum as "not chosen yet". The shared-form-model pattern itself
was taught on
RoomFormModel; what is new here isTier. It is declaredSponsorTier?and[Required](lines 74-75), and the doc comment states the reason plainly (lines 69-73):SponsorTier.Platinumis the enum's zero value, so a non-nullableSponsorTier Tierwould make "the organizer has not picked a package yet" indistinguishable from "the top package", and an unmade choice would be silently sold as Platinum. Making the property nullable moves that ambiguity into the type system, and[Required]turns it into a validation error the organizer sees.[Rubric §24, Forms, Validation & UX Safety]assesses whether a form can express only legal input: a default-valued enum is exactly the class of bug this rules out, and it is a commercial field, so the failure mode is a wrong invoice rather than a cosmetic one. The second new idea is URL validation. Three fields (LogoUrlline 46,WebsiteUrlline 51,LinkedInUrlline 56) each carry[AbsoluteUrl(ErrorMessage = "Error.AbsoluteUrl")]on top of their[MaxLength], fromAbsoluteUrlAttribute(MMCA.Common/Source/Presentation/MMCA.Common.UI/Validation/AbsoluteUrlAttribute.cs:26).[Rubric §26, Front-End Security]assesses whether untrusted input reaches a rendering or navigation surface unchecked:LogoUrlis rendered as an image source andWebsiteUrlandLinkedInUrlas outbound links onSponsorDetail(.../Pages/Sponsor/SponsorDetail.razor:59,:119,:123), so requiring an absolute URL at entry is the first line of defence, and the links themselves carryrel="noopener noreferrer"(.../Pages/Sponsor/SponsorDetail.razor:119,123).[Rubric §27, Internationalization]applies exactly as on the room model: everyErrorMessageis a resource key resolved by the page's localizer (doc, lines 16-17, ADR-027). Note the key prefix differs from the room model's: sponsors useError.*(lines 32, 36, 40) where rooms useValidation.*. - Walkthrough
NameRequiredKey = "Error.NameRequired"(line 32) andTierRequiredKey = "Error.TierRequired"(line 67) are the two required-message keys, named as constants for the same reason as on the room model (doc, lines 27-31).Name(line 37) is[Required]plus[MaxLength(SponsorDTO.NameMaxLength)], 200 characters (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Sponsors/SponsorDTO.cs:18).Description(line 41) is capped atSponsorDTO.DescriptionMaxLength, 2000 (SponsorDTO.cs:24).LogoUrl(line 46),WebsiteUrl(line 51) andLinkedInUrl(line 56) each pair[AbsoluteUrl]with a 2000-character cap (SponsorDTO.cs:21,27,30).TwitterHandle(line 60) is a handle, not a URL, so it gets a[MaxLength]of 100 (SponsorDTO.cs:33) and deliberately no[AbsoluteUrl].BoothNumber(line 64) is capped at 50 (SponsorDTO.cs:36).Tier(line 75),Sort(line 78) andIsExhibitor(line 81) close the model out.SortandIsExhibitorare the attribute-free properties the class doc calls out (lines 19-23).
- Why it's built this way: sponsors are the one Conference entity where a wrong field costs money, so the model spends its complexity budget on the two fields that can be wrong silently (the tier's zero value and a malformed branding URL) and stays plain everywhere else.
- Where it's used: subclassed by
SponsorCreateModelandSponsorEditModel; bound as theModelparameter ofSponsorFormFields(.../Pages/Sponsor/SponsorFormFields.razor:103), rendered bySponsorCreateandSponsorDetail. - Caveats / not-in-source:
TwitterHandlehas no format rule at all, so a full URL pasted into it passes validation. What the detail page does with it is render it as text through a localized template (.../Pages/Sponsor/SponsorDetail.razor:127), not as a link.
SponsorCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorCreateModel.cs:11· Level 3 · sealed class
- What it is: the create-page binding target for sponsors. It adds one method to
SponsorFormModel(line 11) and no fields. - Depends on:
SponsorFormModel(base),SponsorDTOand theEventIdentifierTypealias (line 1). - Concept introduced: none new. This is the create half of the load-then-project pair taught on
RoomCreateModel, with the server-minted-key variant rather than the client-minted one. - Walkthrough
ToNew(EventIdentifierType eventId)(lines 19-36) returns a freshSponsorDTO.Id = default(line 22): unlike rooms, sponsor ids are server-allocated, so the page posts a placeholder and reads the real key back off the response (.../Pages/Sponsor/SponsorCreate.razor.cs:113navigates tocreated.Id).Tier = Tier!.Value(line 26) is the one null-forgiving operator on the model, and the in-code comment above it states the justification: the form's[Required]rule gates the submit, so a validated model always carries a tier (line 25, rule at.../Pages/Sponsor/SponsorFormModel.cs:74).EventId = eventId(line 33) arrives as a parameter for the same reason as on rooms: the owning event is chosen on the page and fixed thereafter (doc, lines 14-15).
- Why it's built this way: the tier opens unset on purpose (class doc, lines 8-9), because it is a paid package and inheriting the enum's zero value would sell Platinum by accident. The nullable property is the mechanism; this factory is where the nullability is discharged, once, at the point the form has already been validated.
- Where it's used: instantiated as
_modelonSponsorCreate(.../Pages/Sponsor/SponsorCreate.razor.cs:76), consumed inCreateSponsorAsync(.../Pages/Sponsor/SponsorCreate.razor.cs:104). - Caveats / not-in-source: the
!on line 26 is only as safe as the caller's validation.CreateSponsorAsyncdoes check both_form.IsValidand_eventId is nullbefore calling (.../Pages/Sponsor/SponsorCreate.razor.cs:95), but nothing on this type enforces that contract.
SponsorEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorEditModel.cs:12· Level 3 · sealed class
- What it is: the binding target for the inline editor on
SponsorDetail, addingLoadFromandToUpdatedtoSponsorFormModel(line 12). - Depends on:
SponsorFormModel(base) andSponsorDTO(line 1). - Concept introduced, carrying the concurrency token through the round trip. The load-then-project
shape itself was taught on
RoomEditModel. The difference here is line 45:RowVersion = sponsor.RowVersion.SponsorDTOimplementsIConcurrencyAwareand carries abyte[] RowVersion(.../MMCA.ADC.Conference.Shared/Sponsors/SponsorDTO.cs:15,42), so the token the page loaded must survive back to the server for optimistic-concurrency checking to mean anything. Notice thatRowVersionis not a property onSponsorFormModel: it is never bound to a control and never editable, it is simply threaded from the loaded DTO through the projection.[Rubric §8, Data Architecture]assesses concurrency control: an edit form that dropped the token would turn every save into a last-writer-wins overwrite, silently. Keeping the token off the form model and on the projection is what makes dropping it impossible by construction. - Walkthrough
LoadFrom(SponsorDTO sponsor)(lines 16-30) null-guards (line 18) and copies the ten editable values, includingTier = sponsor.Tier(line 21), which widens the non-nullable DTO enum into the model's nullable one.ToUpdated(SponsorDTO sponsor)(lines 38-60) null-guards (line 40) and projects a new DTO:Id(line 44),RowVersion(line 45) andEventId(line 56) from the loaded sponsor, everything else from the form (lines 46-55, 57-58).Tier = Tier!.Value(line 49) discharges the nullability exactly as the create model does, with the same comment naming the[Required]rule that guarantees it (line 48).
- Why it's built this way: the owning event is absent from the editable set for the same reason as on rooms (moving a sponsorship between events is a create plus a delete, doc lines 8-10), and the three carried-through values (identity, token, event) are exactly the three a UI must not be able to change.
- Where it's used: instantiated as
_modelonSponsorDetail(.../Pages/Sponsor/SponsorDetail.razor.cs:64);LoadFrominStartEditing(.../Pages/Sponsor/SponsorDetail.razor.cs:132),ToUpdatedinSaveChangesAsync(.../Pages/Sponsor/SponsorDetail.razor.cs:160).
CommittedWriteReload
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/CommittedWriteReload.cs:16· Level 3 · internal sealed class (page collaborator)
- What it is: a tiny internal state holder that a detail page owns one of, to answer one question:
"my write committed on the server but the reload that should have refreshed the page failed, so is what
I am showing now older than the server's copy?" Its only state is
IsStale(line 19, private setter). - Depends on:
Result(the reload outcome, read withTryGetValue, lines 33 and 68),IToastServicefor the warning (line 40), andIStringLocalizerplusResultUiExtensions.NotifyOnFailurefor a failed re-read (line 74). Externals:[MaybeNullWhen(false)]on theout TDto refreshedparameter (line 31), so a caller that getstrueback may read the record without a null check, whateverTDto's nullability. - Concept introduced, a committed write is not a failed write. A save that posts an update and then
re-fetches has two outcomes that look like one: the update failed, or the update succeeded and only the
follow-up read failed. Reporting the second as a failure tells the organizer to retry a save that already
landed, and re-posting the stale
RowVersionwould then be rejected by optimistic concurrency.[Rubric §24, Forms, Validation and UX Safety]assesses whether the UI tells the truth about what was saved: this class makes the page report the commit, mark itself stale, and refresh before the next edit.TryAdopt<TDto>(lines 31-42): takes the reload'sResult<TDto>. On success it clearsIsStaleand hands back the refreshed record through theoutparameter. On failure it setsIsStale, toasts the caller's "saved, but not refreshed" warning (line 40) and returnsfalse, so the page ends its edit without claiming the reload worked.EnsureCurrentAsync<TDto>(lines 55-76,where TDto : class): called before the next edit or write. A fresh page gets its current record back unchanged (lines 62-65). A stale page runs the caller'srereaddelegate; success clearsIsStaleand returns the new record (lines 68-72), failure reports throughNotifyOnFailure, leaves the page stale and returnsnull(lines 74-75), which the caller treats as "do not open the editor".
- Why it's built this way: the guard is a plain object rather than a base-class feature, so each detail
page composes it with
private readonly CommittedWriteReload _writeReload = new()and the policy lives once instead of being re-derived per page ([Rubric §15, Best Practices and Code Quality]). - Where it's used: ten Conference detail pages hold one:
SponsorDetail(.../Pages/Sponsors/SponsorDetail.razor.cs:66,TryAdoptat:169,EnsureCurrentAsyncat:126) andSessionDetail(.../Pages/Sessions/SessionDetail.razor.cs:73,TryAdoptat:217,EnsureCurrentAsyncat:174), plusActivityDetail,ConferenceCategoryDetail,EventDetail,PartnerDetail,QuestionDetail,RoomDetail,SpeakerDashboardandSpeakerDetail(one use site each underMMCA.ADC.Conference.UI/Pages/). The category-items child panel,ConferenceCategoryItemsPanel, references it twice (.../Pages/Categories/ConferenceCategoryItemsPanel.razor.cs).
PrerenderLookupBudget
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Common·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/PrerenderLookupBudget.cs:14· Level 4 · internal static class (page helper)
- What it is: the time budget an events lookup gets during the server pre-render. The class doc
(lines 6-13) states the problem it solves: the lookups are otherwise bounded only by the API client's
90-second
HttpClient.Timeout(the Blazor web host takes the resilience handler offAPIClient) and the shared read retry, so during a Conference outage a first visit could wait a minute or more for the server to answer the page. The pre-render gives up afterBudgetand renders its failed state; the interactive render looks the events up again. - Depends on:
ResultandError.Unexpected(lines 25-29), andHttpResultExecutorfor itsTimeoutErrorCodeconstant (line 27, declared as"Http.Timeout"atMMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/HttpResultExecutor.cs:41). Externals: the BCLTimeProvider(the clock the budget'sCancellationTokenSourceruns on, line 49) andTask.WaitAsync(line 53). - Concept introduced, a pre-render that answers fast instead of waiting out a transport timeout. A
server pre-render blocks the first byte of the page on every lookup it awaits, so a slow dependency turns
into a blank browser tab, not a spinner. This helper bounds only that pass: the interactive render, which
can show a loading state, keeps the full client timeout and retry.
[Rubric §29, Resilience]assesses whether a dependency outage degrades the experience rather than stalling it: here the outage becomes a rendered failure state within five seconds. The timeout is also worded like any other:TimedOut<T>reuses the HTTP client's own timeout code and text (lines 25-29, doc at lines 19-24), so the grid's error mapping treats a budget expiry and a real client timeout the same way. ADR-056 is the render-mode policy that makes a pre-render pass exist in the first place. - Walkthrough
Budget(line 17):TimeSpan.FromSeconds(5), astatic readonlyfield, so every pre-render lookup in the module shares one number.TimedOut<T>()(lines 25-29): returnsResult.Failure<T>carryingError.UnexpectedwithHttpResultExecutor.TimeoutErrorCode, the text "The request timed out before the server responded." andnameof(PrerenderLookupBudget)as the source.RunAsync<T>(bounded, timeProvider, lookup)(lines 40-59): null-guardslookup(line 42). Whenboundedis false it runs the lookup withCancellationToken.Noneand returns its result unchanged (lines 44-47). Otherwise it creates aCancellationTokenSource(Budget, timeProvider)(line 49), passes its token to the lookup, and also appliesWaitAsync(budget.Token)to the returned task (line 53), because a lookup that shares an in-flight fetch may not observe the token itself (comment, line 52). AnOperationCanceledExceptionis caught only when the budget's own source fired (when (budget.IsCancellationRequested), line 55), so a cancellation from anywhere else still propagates, and the caught case answersTimedOut<T>()(line 57).
- Why it's built this way: the budget runs on an injected
TimeProviderrather than a bareTimeSpanoverload, so a test can advance a fake clock past five seconds instead of sleeping. Passingboundedas a parameter (rather than reading the render mode inside) keeps the helper a pure function of its inputs and lets each caller decide what "pre-render" means for it. - Where it's used: two callers.
EventFilteredListPageBase<TDto>passes!RendererInfo.IsInteractiveandEventLookupService.GetAllAsync(.../Pages/Common/EventFilteredListPageBase.cs:165), andPublicSessionEventCatalogpasses its ownprerenderingflag and aneventService.GetAllAsync(includeChildren: true, ...)lambda (.../Pages/Public/Sessions/PublicSessionEventCatalog.cs:75-78). Both record the returnedErrorsso a page that fails closed can surface the timeout wording. - Caveats / not-in-source: the class is
internal, so it is not available outsideMMCA.ADC.Conference.UI; whether any other module's pre-render needs the same bound is not determined here.
SponsorCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorCreate.razor.cs:15· Level 10 · class (Blazor code-behind)
- What it is: the form that records a sold sponsorship at
/sponsors/create(.../Pages/Sponsors/SponsorCreate.razor:1-2, gated byHasPagePermission(ConferencePermissions.SponsorsManage); the class doc names the Organizer and ContentEditor roles, line 12). It collects the sponsor name, tier, owning event, branding links and the optional expo booth details, and the class doc is explicit that the event picker is required because sponsorships are sold per event and the owning event cannot be changed afterwards (lines 11-15). - Depends on:
CreatePageBase(the@inheritsbase,.../Pages/Sponsors/SponsorCreate.razor:8: suppliesToast,Form,IsSaving,IsDirty,SaveResult,MarkDirty, the page-scopedPageTokenandSubmitAsync),CreateSubmitOptions(line 81),ISponsorUIService(line 17),IEventLookupServicewithEventInfo(lines 18, 63), an injected BCLTimeProvider(line 20),SponsorCreateModel(line 64),EventInfoDefaults(line 55, which wrapsCurrentEventSelector),ConferenceRoutePaths(lines 32, 79, 87),ErrorMessages(line 84), andModelValidationwithDataAnnotationsModelValidator(line 37). Externals: Blazor, MudBlazor (MudForm,BreadcrumbItem), and theIStringLocalizer<SponsorCreate>from the template (.../Pages/Sponsors/SponsorCreate.razor:7). - Concept introduced, the split initialization and the smart event default. This page uses both
lifecycle hooks deliberately.
OnInitialized(lines 26-38) does the synchronous work (breadcrumbs, validation delegate) so the first render already has them, andOnInitializedAsync(lines 40-61) does the network work. The pattern matters because the async hook runs after the first render and the page must not be blank or unvalidatable in between. The default-event rule is the one every organizer create page shares. The page makes one call,EventInfoDefaults.SelectCurrentOrNextId, with the looked-up events and the injectedTimeProvider.GetUtcNow().UtcDateTime(line 55). That helper returnsnullwhen the lookup failed and otherwise runsCurrentEventSelector.SelectCurrentOrNextover each event's start date, end date and IANA time zone (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Events/EventInfoDefaults.cs:20-30), picking the event live now, else the next upcoming, else the most recently ended (its doc, lines 13-15).RoomCreatemakes the identical call (.../Pages/Rooms/RoomCreate.razor.cs:54), so the accessor triple is written once and the create pages cannot pick their default differently. The picker opens on the conference the organizer is most likely selling against, and a test can pin "now" instead of depending on the wall clock. The??=(line 55) means a value the organizer already picked is never overwritten, and the picker stays open for the rest (ShowEventPicker="true",.../Pages/Sponsors/SponsorCreate.razor:30). The failure policy differs fromRoomCreate, which toastsSnackbar.LoadEventsFailedand returns on a failed lookup (.../Pages/Rooms/RoomCreate.razor.cs:46-50): a failed lookup here is non-critical and silently leaves the picker empty, because the required-field error then guides the user (in-code comment, lines 46-47).[Rubric §24, Forms, Validation & UX Safety]assesses whether a form makes the common case cheap without hiding a field: the default is a pre-selection, not a lock, and the submit still checks the event through thePreCheckoption (line 84), which answers a cleared picker with the sameErrorMessages.ValidationErrorwarning an invalid form gets, so a cleared picker cannot post.[Rubric §19, State Management]assesses ownership of transient state: the page declares none of the submit state itself. The saving flag, the dirty flag and the last failed save result all live inCreatePageBase(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:30-39): the template bindsMarkDirtyto theOnFieldChangedcallback ofSponsorFormFields(.../Pages/Sponsors/SponsorCreate.razor:27), readsIsDirtyin itsUnsavedChangesGuard(:12), and feedsSaveResultto theErrorSummary(:38) so a failed save renders inline alongside the form's own validation messages, because a snackbar can time out while the organizer is still reading the form (comment, lines 71-73). - Walkthrough
OnInitialized(lines 26-38): breadcrumbs Home, Sponsors, Create with the lastdisabled: true(lines 29-34), then the validation delegate (line 37, ADR-027 comment at line 36).OnInitializedAsync(lines 40-61): awaitsbase.OnInitializedAsync()(line 42), loads the event lookup with the base'sPageToken(line 48), then resolves the default in one line (line 55).OperationCanceledExceptionis swallowed (lines 57-60).CreateSponsorAsync(lines 74-85) is one expression: a call to the base'sSubmitAsyncwith three arguments. The save delegate posts_model.ToNew(_eventId!.Value)throughAddAsyncwith the token the base hands it (line 75); the success step toastsSnackbar.Createdand routes toConferenceRoutePaths.SponsorDetails(created.Id)(lines 76-80); the options pass the page localizer and the eventPreCheck(lines 81-85). The base does the rest (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:53-110): it ignores a submit while one is in flight, clearsSaveResult, validates the form, runs the pre-check, setsIsSaving, clearsIsDirtybefore calling the success step, stores a failedResultinSaveResultand toasts it throughNotifyOnFailurewith the page localizer, and clearsIsSavingin afinally.NavigateToList(line 87) closes the page out. There is no dispose pair on the page: cancellation on navigation-away comes from the base'sPageToken.- The template passes two extra localized strings into the shared field block,
LinksHeadingandTwitterPlaceholder(.../Pages/Sponsors/SponsorCreate.razor:28-29), which is how oneSponsorFormFieldscomponent (.../Pages/Sponsors/SponsorFormFields.razor:120,123) serves both this page and the detail editor without either owning the copy. The Create button bindsCreateSponsorAsyncand is disabled whileIsSaving(.../Pages/Sponsors/SponsorCreate.razor:42-43).
- Why it's built this way: a sponsorship is sold against one event and the tier is a paid package,
so the page's whole design goal is to make the event obvious and the tier explicit. Defaulting the
event removes the most common click; leaving the tier unset (see
SponsorFormModel) forces the one choice that must not be inherited. With the submit pipeline in the shared base, the page holds only what is sponsor-specific. - Where it's used: reached from
SponsorList's create button (.../Pages/Sponsors/SponsorList.razor.cs:85); on success it hands off toSponsorDetail. Its UI tests areSponsorCreateTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sponsors/SponsorCreateTests.cs).
SponsorDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorDetail.razor.cs:20· Level 9 · class (Blazor code-behind)
- What it is: the organizer's sponsor record page at
/sponsors/{Id:int}(.../Pages/Sponsors/SponsorDetail.razor:1-2, Organizer-only). It loads one sponsor, renders it as a branded card, inline-edits every field except the owning event, deletes behind a confirmation, and exposes the booth-visit QR code. The class doc states the event exclusion and its reason (lines 13-17). - Depends on:
DetailPageBase(the@inheritsbase,.../Pages/Sponsors/SponsorDetail.razor:8: suppliesPageToken,BeginLoad/CompleteLoadandLoadState,IsEditing/IsDirtyand theBeginEdit/EndEdittransitions),ISponsorUIService(line 24),IEventLookupService(line 25),IToastService(line 27),SponsorEditModel(line 63),SponsorDTO(line 60),SponsorTier(line 36),ConferenceRoutePaths(lines 50, 218 and.../Pages/Sponsors/SponsorDetail.razor:73),ErrorMessages(ValidationError, line 153),ResultUiExtensions(lines 106, 163, 205),ModelValidation(line 55),CommittedWriteReload(line 66), and theDetailLoadStateContentcomponent (.../Pages/Sponsors/SponsorDetail.razor:18-24). Externals: Blazor, MudBlazor (MudForm,MudAvatar,MudImage,MudSimpleTable,MudDivider,MudLink),System.Globalization.CultureInfo(line 42). - Concept introduced, localized enum rendering by convention.
TierLabel(SponsorTier tier)(line- is a one-liner:
L[$"Tier.{tier}"].Value. The enum member's name is interpolated into a resource key, so adding a tier means adding a resource entry, not aswitch. The same helper appears onSponsorList(.../Pages/Sponsors/SponsorList.razor.cs:37).[Rubric §27, Internationalization]assesses whether every user-visible string is externalized: this is the pattern that keeps enums from leaking English identifiers into the UI. The second idea, contrasted againstRoomDetail, is the typed route parameter.[Parameter] public int Id(line 29) plus the{Id:int}route constraint (.../Pages/Sponsors/SponsorDetail.razor:1) pushes the conversion into the router, so the page has no parse step and a non-numeric URL never reaches this component. The same_loadedIdreload guard applies (lines 74-83), just typedint?(line 58). The page declares noIDisposable,CancellationTokenSource, load-state or edit-mode fields of its own: it extendsDetailPageBase, which owns the page-scopedPageTokenthe save, reload and delete calls take (lines 160, 168, 202), and theIsEditing/IsDirtypair the unsaved-changes guard reads.StartEditingAsyncopens the editor throughBeginEdit()(line 133), and bothCancelEditing(line 141) and the end ofSaveChangesAsync(line - close it through
EndEdit(), so the dirty flag can never be left set behind a closed editor.LoadAsync, though, does not takePageToken: it starts a load generation with the base'sBeginLoad()(line 88,MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:48), passes that token to both fetches (lines 92, 105), and records the outcome withCompleteLoad(generation, sponsorResult)(line 96,DetailPageBase.cs:67), which ignores a superseded response and otherwise setsDetailLoadStateLoaded,NotFoundorFailed. It is the same protocolSessionDetailuses.[Rubric section 3, Clean Architecture](assesses reuse over per-page duplication of a cross-cutting concern): the edit-mode, token and load-state plumbing lives once in the shared base, and the load-generation counter once inLatestLoadGuard, rather than being repeated per detail page.[Rubric §26, Front-End Security]assesses outbound-link handling: the two sponsor URLs render asMudLinkwithTarget="_blank"andrel="noopener noreferrer"(.../Pages/Sponsors/SponsorDetail.razor:122,126), and the whole links block is only rendered when at least one of the three link fields has content (:113-115).[Rubric §21, Accessibility]assesses whether structure and labelling carry meaning to assistive technology: the detail table uses<th scope="row">for its labels rather than bold<td>(.../Pages/Sponsors/SponsorDetail.razor:88,92,96), the logo image getsAlt="@Sponsor.Name"(:62), and both header icon buttons carryaria-label(:75-76).
- is a one-liner:
- Walkthrough
EntityName(line 22) andTitle(line 31) are localizer lookups;EventName(lines 39-42) resolves the owning event's display name from the lookup and falls back to the invariant-formatted id.OnInitialized(lines 44-56) builds the breadcrumbs and the validation delegate (line 55).OnParametersSetAsync(lines 74-83) is a thin reload guard delegating toLoadAsync; it is a non-async method that returnsTask.CompletedTaskorLoadAsync()directly (lines 78, 82).LoadAsync(lines 85-115) begins a load generation (line 88) and fetches withGetByIdAsync(Id, true, token)(line 92), using the generation's token rather than a page-ownedCancellationTokenSource. Note the second argument:includeChildren: true, whichRoomDetaildoes not request (.../Pages/Rooms/RoomDetail.razor.cs:79passes the token by name and leaves the flag defaulted). A not-found, failed or supersededResultmakesCompleteLoadreturnfalseand the method returns without a toast (lines 94-99): the template rendersDetailLoadStateContentfor every state butLoaded, withOnRetry="LoadAsync"(.../Pages/Sponsors/SponsorDetail.razor:18-24). On success it adopts the sponsor (line 101), then loads the event lookup once, lazily, with the same token, reporting a failure throughNotifyOnFailureand stopping (lines 103-109). There is nofinallyand no page-local spinner flag: the base'sLoadStatedrives the loading body.StartEditingAsync(lines 117-139) first asksCommittedWriteReload.EnsureCurrentAsyncfor the record to edit (line 126): unchanged when the page is fresh, a re-read when an earlier save committed but its reload failed. When the re-read fails the method returns without opening the editor. Otherwise it swapsSponsorfor the current record (line 131), seedsSponsorEditModelfrom it (line 132) and opens the editor throughDetailPageBase'sBeginEdit()(line 133), with anOperationCanceledExceptioncatch for disposal and render-mode transitions (lines 135-138);CancelEditing(line 141) closes it again throughEndEdit()without touchingSponsor.SaveChangesAsync(lines 143-185) validates (lines 150-155), posts_model.ToUpdated(Sponsor)(line 160), then re-fetches withincludeChildren: true(line 168) and hands the outcome to_writeReload.TryAdopt(line 169). On success it swapsSponsorfor the refreshed instance and toastsSnackbar.Updated(lines 171-172); on a failed reload the page is marked stale and theSnackbar.SavedRefreshFailedwarning shows instead. Either way the edit ends throughEndEdit()(line 175), because the update already committed (comment, line 167). BecauseSponsorEditModelcarriesRowVersionthrough the projection, this is the round trip that keeps optimistic concurrency meaningful, and the stale-page re-read inStartEditingAsyncis what stops the next save posting the oldRowVersion.DeleteSponsorAsync(lines 187-216) confirms through_deleteConfirm.ShowAsync(Sponsor.Name)(line 194), which returns a plainbool(MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), so the guard is a bareif (!confirmed)(line 195), and backing out with Escape comes backfalse(DeleteConfirmation.razor:6). It then deletes (line 202), toasts and returns to the list.- The read-only card renders the logo as a
MudAvatarwhen present (:60-63), the name and localized tier (:65-66), then a compact table of event, sort and exhibitor status, where the exhibitor row picks between three localized strings depending on whether the sponsor exhibits and whether a booth number is known (:98-107).
- Why it's built this way: the sponsor record is the one Conference screen an organizer shows to a paying customer, so it renders branding (logo, name, tier) before administrative fields, and it hides empty sections entirely rather than showing blank rows.
- Where it's used: the navigation target of
SponsorCreate(.../Pages/Sponsors/SponsorCreate.razor.cs:134) and ofSponsorList(.../Pages/Sponsors/SponsorList.razor.cs:100), both throughConferenceRoutePaths.SponsorDetails. ItsQrCodeButtonpoints atConferenceRoutePaths.SponsorVisitLink(Sponsor.Id)(.../Pages/Sponsors/SponsorDetail.razor:73), which resolves to the Engagement-owned/engage/sponsors/{id}landing page (.../MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:64), so the printed booth code takes an attendee to the visit flow, not to this management screen. Its UI tests areSponsorDetailTests,SponsorDetailDeleteTestsandSponsorDetailSavedRefreshFailedTestsunderMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sponsors/. - Caveats / not-in-source: what
includeChildren: trueactually pulls back for a sponsor is decided by the API's read model, not by this page.
EventFilteredListPageBase<TDto>
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Common·MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:25· Level 9 · class (abstract, generic)
- What it is: the base class for every Conference list page whose rows are scoped to a single conference event. It adds three things on top of the framework's grid base: the event lookup, a persisted
eventIdfilter, and the default (current or next) event resolution. A derived page supplies only what differs: how it saves and restores its own filters, and what it reloads when the scope changes. - Depends on: DataGridListPageBase<TDto> (its base,
:25), IEventLookupService and its EventInfo record (injected at:27,:31), PrerenderLookupBudget (:165), CurrentEventSelector (:3,:194), the frameworkErrortype fromMMCA.Common.Shared.Abstractions(:5,:50), and theEventIdentifierTypealias. Externals:Microsoft.AspNetCore.Componentsfor[Inject]andRendererInfo,System.Globalization.CultureInfo(:1), and an injectedTimeProvider(:28) that is the clock for both the default-event computation (:199) and the pre-render lookup budget (:165). - Concept introduced: layering an application-vocabulary base on a framework base. [Rubric §3, Clean Architecture] assesses whether abstractions sit at the layer that owns their vocabulary. The class remark makes the call in one sentence (
:16-18): "conference event" is domain vocabulary, not framework vocabulary, so this does not belong in MMCA.Common alongside the grid plumbing it builds on. The result is a two-layer inheritance chain where each layer owns exactly the concepts of its own repository, which is the same reasoning that keeps DetailPageBase ADC-local for a different reason (nothing to share) and this one ADC-local for this reason (nothing shareable should be shared). The second idea is prerender-truthful interactivity, and it is worth reading in full because it is a non-obvious correctness rule rather than a preference.CanRenderEventPickergates the picker onRendererInfo.IsInteractive && Events is { Count: > 1 }(:80), and the remark above it explains (:71-79): the SSR prerender pass resolves the events server-side and would happily paint a fully formed picker, dropdown and clear button included, into static HTML. Nothing is wired to it until the interactive runtime attaches, which underInteractiveAuto's WebAssembly leg is a whole runtime boot later, and every click landing in that window is swallowed with no feedback, leaving the list silently on the default event the prerender chose. Rendering the picker only once the component is interactive turns "the picker is on screen" into a truthful signal that a choice will be honored, for a reader and for an E2E wait alike. The same pre-render pass also bounds its event lookup through PrerenderLookupBudget (:165, comment at:164), so a Conference outage answers the first visit in seconds rather than after the client timeout. [Rubric §22, Responsive and Cross-Browser/Device] and [Rubric §24, Forms, Validation and UX Safety] both land on the picker gate, and ADR-056 is the render-mode policy it implements. - Walkthrough:
- Injected state (
:27-58): theIEventLookupServiceand theTimeProvider, thenEvents(the id-to-EventInfodictionary,nullwhen the lookup failed),SelectedEventId(nullmeaning "all events"),EventFilterResolved(true once the scope is decided, restored or computed),EventsLoadFailed(so a page that must fail closed can branch rather than silently querying unscoped),EventsLoadErrors(:50, the failed lookup's errors, empty otherwise, so such a page can answer its fetch with that failure and let the grid word it with the mapped HTTP text instead of a generic load error), andEventsLoadTask(:58), the in-flight load. Every setter isprivate, so the base owns all transitions. EventFilterIsUserControlled(:65):virtual, defaulttrue. It answers "does the reader pick the event themselves", which is what makes the choice worth persisting and worth restoring. PublicSpeakerList overrides it with a role check rather than a constant (MMCA.ADC.Conference.UI/Pages/Public/Speakers/PublicSpeakerList.razor.cs:53), so the same page is user-controlled for a privileged reader and locked to the computed event for everyone else.CanRenderEventPickerandEventPickerOptions(:80,:87-88): the gate described above, and the ordered option list derived from it. IteratingEventPickerOptionsinstead ofEventskeeps every page's picker on one ordering (OrderBy(e => e.StartDate)) and keeps the markup free of the null handling the gate already did.- The three extension points (
:91-103):ReloadForEventFilterAsync()isabstract, so a page cannot forget to reload;SavePageFilters/RestorePageFiltersarevirtualno-ops for page-specific values (search text, status dropdowns);OnEventsLoadingAsync()is avirtualhook for work that must run before the events are fetched, such as resolving whether the reader is privileged. SaveFilters/RestoreFilters(:106-137): both aresealed override, which is the load-bearing detail. The base takes over the framework's two filter hooks, calls the page's hook first, then owns theeventIdentry itself, so no derived page can accidentally drop the event scope from persisted state. The saved value is either the invariant-formatted id or the literal"all", and the comment states why the literal exists (:112): it distinguishes an explicit clear from no saved state, which would apply the default instead. Restore handles the three cases (absent,"all", parseable id) and setsEventFilterResolvedonly in the latter two.OnInitializedAsyncandBeginEventsLoad(:140-152): initialization is a non-async override that starts the load before any await and returnsEventsLoadTaskitself (:140-146), so the caller awaits it with no extra state machine.BeginEventsLoad()(:152) is exposed separately so a derived page can start the event load, run its own non-event work concurrently, and only then awaitEventsLoadTask.LoadEventsAndResolveDefaultAsync(:158-179): the hook, then the lookup run throughPrerenderLookupBudget.RunAsync(!RendererInfo.IsInteractive, TimeProvider, EventLookupService.GetAllAsync)(:165), so it is bounded only during the pre-render, with theResultunwrapped byTryGetValue(see the primer on the Result pattern), thenResolveDefaultEventFilter(). A failure is non-fatal by design (:162-163): the picker stays hidden and the default filter stays unset, and the failure is remembered inEventsLoadFailedandEventsLoadErrors(:174-175); a success clears both (:169-170). A pre-render budget expiry arrives here as an ordinary failed lookup carrying the timeout error. The method is documented as callable again (:154-157), so a retry button heals a transient lookup failure.ResolveDefaultEventFilter(:181-201): the precedence rule, stated in its comment (:183-184) and encoded in one condition. A restored id that still exists wins; a dangling one falls back to the computed default; and a page with a locked scope is always pinned to the computed current or next event, which is what stops a stale saved id from surviving an override ofEventFilterIsUserControlled. The computation delegates toCurrentEventSelector.SelectCurrentOrNextoverEvents.ValueswithTimeProvider.GetUtcNow().UtcDateTimeas "now" (:194-199), the same selector the landing page uses, so "which event is current" has one implementation across the module and a test can pin the clock through the injectedTimeProvider.WaitForEventsAsyncandOnBeforeFetchAsync(:204,:213):WaitForEventsAsyncreturns the load task orTask.CompletedTask. The base overrides the framework'sOnBeforeFetchAsynchook (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1077) to return it, so every fetch the framework base runs (the grid loaders and eachMobilePageFetcherdelegate) waits for the event load before its filter callback reads the selected event (doc,:206-212). The grid's firstServerDatacall can race ahead of initialization completing, which is why the task is a field rather than a local, and why a derived page that routes its fetches through the framework base never awaits it by hand.ApplyEventFilter(:216-220): addsEventIdas an("equals", value)pair to the outgoing filter dictionary, and only when an event is selected, so "all events" is the absence of a filter rather than a sentinel.OnEventFilterChanged(:223-228): bound to the picker'sValueChanged. It sets the id, marks the scope resolved, and returns the page'sReloadForEventFilterAsync()task (a non-async method). Anullvalue clears the scope.GetEventName/SelectedEventName(:231-240): display helpers that degrade rather than throw, falling back to the raw id and to an empty string respectively when the lookup has nothing.
- Injected state (
- Why it's built this way: [Rubric §19, State Management and Data Flow] is the through-line. There is one scope variable, one place that decides its default, one place that persists it, one place that reloads on change, and one place that makes every fetch wait for it, and the
sealed overrideon the two persistence hooks is what keeps it that way as pages are added. [Rubric §11, Security] shows up in theEventsLoadFailedflag: a public reader whose lookup failed must not fall through to an unscoped query, so the flag exists specifically to let such a page fail closed, which PublicSpeakerList does through itsScopeUnresolvedForPublicReader()check (PublicSpeakerList.razor.cs:172), answering its fetch withEventsLoadErrors(:166). [Rubric §15, Best Practices & Code Quality]: six list pages share this, and each one's event handling is now three overrides. - Where it's used: six Conference list pages derive from it, each pairing an
@inheritsdirective with a partial class: SponsorList (MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorList.razor.cs:18), PartnerList (Pages/Partners/PartnerList.razor.cs:18), SpeakerList (Pages/Speakers/SpeakerList.razor.cs:18), RoomList (Pages/Rooms/RoomList.razor.cs:12), ActivityList (Pages/Activities/ActivityList.razor.cs:19), and PublicSpeakerList (Pages/Public/Speakers/PublicSpeakerList.razor.cs:33). None of the five organizer pages callsWaitForEventsAsyncany more: they share one shape (SavePageFilters/RestorePageFilters,ReloadForEventFilterAsync => ReloadActiveLayoutAsync(),ApplyEventFilter(filters)inside their filter callback) and rely onOnBeforeFetchAsyncfor the wait. The public page is the variant that exercises every extension point, overridingEventFilterIsUserControlled(:53),OnEventsLoadingAsync(:115), still awaitingWaitForEventsAsync()itself (:139), and re-callingLoadEventsAndResolveDefaultAsync()on retry (:153). Its tests areEventFilteredListPageBaseTestsandEventFilteredListPagePrerenderTestsunderMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Common/.
SponsorList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sponsors/SponsorList.razor.cs:18· Level 10 · class (Blazor code-behind)
- What it is: the sponsor index at
/sponsors(.../Pages/Sponsors/SponsorList.razor:1-2, gated byHasPagePermission(ConferencePermissions.SponsorsManage); the class doc names Organizer and ContentEditor). Structurally the twin ofRoomList: server-side paging with search, an event filter, a mobile card layout, and a tier column. The class doc (lines 12-17) makes the interesting point explicitly: unlike the speaker list,EventIdis a real Sponsor column, so the event filter goes straight through the generic filter pipeline with no special handling. - Depends on:
EventFilteredListPageBase<TDto>(line 18),ListPageShell<TItem>(line 26, and the@ref="_shell"markup at.../Pages/Sponsors/SponsorList.razor:10-17),ISponsorUIService(line 23),ListPageActions(line 76),MobileInfiniteScrollList<TItem>(line 28),SponsorTier(line 33),ConferenceRoutePaths(lines 85-86),ErrorMessages(line 82),Result(lines 54, 69) andSponsorDTO. Externals: MudBlazor (MudDataGrid,MudChip,GridState,GridData). - Concept introduced: none new. Read this page against
RoomList: the two share the same override set (SavePageFiltersline 35,RestorePageFiltersline 38,ReloadForEventFilterAsyncline 44,GridRefline 27,MobileListRefline 28,Titleline 21), the same single fetch method feeding both layouts, the sameNamecontainssearch filter (line 64), and the sameListPageActionsdelegation for delete (lines 75-83). That repetition across the list pages is precisely whatEventFilteredListPageBase<TDto>andListPageShell<TItem>exist to keep down: the shell owns the grid, the mobile list, the search box, the loading, empty and failed states and the delete dialog, so the page holds only references to them through_shell(lines 26-28).[Rubric §18, UI Architecture]assesses whether the same capability is expressed the same way everywhere: an engineer who has read one of these list pages can read all of them, and the differences that remain (a tier column, an id-typed navigation helper) are exactly the entity-specific parts.[Rubric §20, Design System and Theming]assesses consistent use of the component vocabulary: the tier renders as aMudChipin the grid (.../Pages/Sponsors/SponsorList.razor:57) and as secondary body text on the mobile card (:39), both fed by the sameTierLabelhelper, so the same value reads consistently in two layouts. - Walkthrough
TierLabel(SponsorTier tier)(line 33) is the same convention-keyed localizer lookupSponsorDetailuses (.../Pages/Sponsors/SponsorDetail.razor.cs:36).SavePageFilters/RestorePageFilters(lines 35-39) persist thesearchkey only.ReloadActiveLayoutAsync(lines 41-42) passes the shell's mobile list to the framework base'sReloadActiveLayoutAsync(mobileList)(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879), andReloadForEventFilterAsync(line 44) andOnSearchChanged(lines 46-50) both call it.FetchSponsorsAsync(lines 54-56) is the one paged fetch both layouts use, a straightSponsorService.GetPagedAsynccall. The comment (lines 52-53) records the ordering it relies on: the base waits for the event load inOnBeforeFetchAsyncbeforeApplyFiltersreads the selected event, so the page itself awaits nothing.LoadServerData(lines 58-59) hands the grid state,FetchSponsorsAsyncandApplyFiltersto the base'sLoadServerDataAsync.ApplyFilters(lines 61-66) adds theNamecontainsfilter then the inheritedApplyEventFilter(line 65). This is where the class doc's point lands: becauseEventIdis a real column on the sponsor read model, the base's genericEventIdequalsfilter is sufficient and the page adds nothing.FetchMobilePage(lines 69-70) is a property built by the base'sMobilePageFetcherfrom the sameFetchSponsorsAsyncandApplyFilters, sorted byName(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1101).DeleteSponsorAsync(lines 75-83) usesListPageActions.DeleteWithConfirmationAsyncwith the shell'sDeleteDialog(line 77) and the baseDeleteAsync(sponsor.Id)(line 79):ISponsorUIServicedeclares no extra members (.../Services/Sponsors/ISponsorUIService.cs:9-11) andSponsorServiceadds nothing toEntityServiceBase(.../Services/Sponsors/SponsorService.cs:10-12), so the generic CRUD surface is the whole surface.NavigateToCreate(line 85) andNavigateToDetails(line 86) are the navigation edges;OnMobileCardClick(line 72) routes through the latter rather than duplicating the URL build.- The template is one
ListPageShell(.../Pages/Sponsors/SponsorList.razor:10-83). ItsFiltersslot renders the event picker only behindCanRenderEventPickerand iteratesEventPickerOptions(:23-34). The grid columns areName(with an initial ascending sort and aRowLinkCell),Tier(sortable, rendered as a chip),SortandBoothNumber(both hidden below desktop), plus a delete action column (:49-82). The load-failed and empty states are shell parameters (LoadFailed,EmptyConfirmed,EmptyMessage,:16), not page markup.
- Why it's built this way: an organizer reading the sponsor list is checking who is confirmed and at what level, so tier is the one non-name column that is both sortable and visually distinct, and it is the only field promoted onto the mobile card alongside the name.
- Where it's used: the
/sponsorsroute reached from the Sponsors breadcrumb onSponsorCreateandSponsorDetail, and it navigates on to both.EventFilteredListPageBaseTestsandEventFilteredListPagePrerenderTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Common/) exercise the base through this page. - Caveats / not-in-source: the tier column is
Sortable="true"(.../Pages/Sponsors/SponsorList.razor:55), so the server sorts by the underlying enum's numeric value. Whether that ordering matches the commercial ranking an organizer expects depends on theSponsorTiermember order, which is declared in the Conference Shared project, not here.
SessionFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionFormModel.cs:24· Level 3 · abstract class (form model)
- What it is: the session twin of
EventFormModel. It declares the editable session fields once for both the create page and the detail page's inline editor, and it owns the logic a session form needs that an event form does not: rejoining a date picker and a time picker into a single timestamp, refusing a timestamp entered by halves, and checking that the rejoined end falls after the rejoined start. - Depends on:
SessionDTOfor every length cap (MMCA.ADC.Conference.Shared.Sessions, line 2) and theRoomidentifier alias. Externals:System.ComponentModel.DataAnnotations. - Concept introduced: the shared-form-model idea is
EventFormModel's. Four details are specific to sessions:- The split date/time pair. MudBlazor has no single date-and-time control, so a session's
StartsAtandEndsAtare each bound as two properties:StartsAtDate/StartsAtTimeandEndsAtDate/EndsAtTime(lines 74-83).Combine(line 130) is theprotected staticrejoin, and it returnsnullunless both halves are set, so no midnight is ever invented for a missing time. Both derived models call it, so the create page and the editor split and rejoin a timestamp identically. - One schedule verdict, checked before any request.
ScheduleErrorKey()(lines 98-111) returns the resource key of the refusal the form shows, ornullwhen the schedule may be sent. It checks in order: a start with only one of its halves returnsStartIncompleteKey(lines 100-103), an end with only one returnsEndIncompleteKey(lines 105-108), and otherwise it defers toHasEndAfterStart(line 110). The doc comment (lines 91-96) states why the half-entered case is refused rather than silently dropped: a chosen end date is never saved as no end. The two keys' own doc comment (lines 39-43) names the concrete way to reach that shape: the time pickers parse 24-hour input only and empty themselves on anything else, so a retyped "1:00 PM" leaves a date with no time. - A client mirror of a server invariant.
HasEndAfterStart(lines 119-124) rejoins both timestamps throughCombineand returnsfalseonly when both are present and the end is not strictly after the start, so a zero-duration session is refused too. The doc comment (lines 113-118) names the server rule it mirrors, BR-122 (SessionInvariants.EnsureEndsAtIsAfterStartsAt), and states the same scope: a missing half is not this rule's concern (that isScheduleErrorKey's first two checks).EndsAtAfterStartsAtKey(line 37) is the resource key the hosting pages resolve for the refusal message, carried with the server's own wording (Session.Duration.Invalid, per the doc comment at lines 33-36). SessionTitlerather thanTitle. The doc comment (lines 49-52) records the reason: every page in this group already has its own localizedTitleproperty, and SonarAnalyzer S4275 fires on the collision. The rename is an analyzer-driven naming choice, not a domain one.[Rubric §24, Forms, Validation & UX Safety]: the caps areSessionDTO.TitleMaxLengthand its siblings (lines 54, 58, 62, 66, 70), so the browser rejects what the column would reject; a half-entered timestamp is refused with its own message instead of being posted as no value; andScheduleErrorKeylets both pages refuse an incomplete or inverted schedule before the round trip the server would refuse anyway.[Rubric §15, Best Practices & Code Quality]assesses whether the analyzers-as-errors baseline is honored rather than suppressed: this is a case where the code changed a name instead of adding a#pragma.
- The split date/time pair. MudBlazor has no single date-and-time control, so a session's
- Walkthrough
SessionTitleRequiredKey(line 31) is the hoisted resource key, the same techniqueEventFormModeluses;EndsAtAfterStartsAtKey(line 37) is its BR-122 sibling, andStartIncompleteKey(line 44) andEndIncompleteKey(line 47) are the two half-entered refusals.- Five annotated text properties (lines 53-71):
SessionTitleis required,Description,Status,AccessibilityInfo, andResourceLinksare optional. - Six unannotated properties (lines 74-89): the four date/time halves,
IsServiceSession(the lunch-or-break flag, line 86), and the nullableRoomId(line 89). ScheduleErrorKey()(lines 98-111) comparesHasValueacross each pair (lines 100, 105) and returnsHasEndAfterStart() ? null : EndsAtAfterStartsAtKeylast (line 110).HasEndAfterStart()(lines 119-124) returnsstartsAt is null || endsAt is null || endsAt.Value > startsAt.Valueover the two rejoined timestamps (line 123).Combine(DateTime? date, TimeSpan? time)(lines 130-131) returnsdate.Value.Date + time.Valuewhen both are present, otherwisenull.
- Why it's built this way: sessions carry a schedule that no single control captures, and both edit
surfaces must split, rejoin, and check it the same way or a session saved from one screen and re-opened
on the other would move (or be accepted on one screen and refused on the other). Putting
CombineandScheduleErrorKeyon the base makes that impossible to get wrong per page, and returning a resource key rather than aboollets each page show the specific refusal without re-deriving which rule fired. - Where it's used:
SessionCreateModelandSessionEditModelderive from it;SessionCreateandSessionDetailbind an instance to the sharedSessionFormFieldscomponent (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionFormFields.razor), callScheduleErrorKeybefore posting, and resolve the returned key for the inline refusal (.../Pages/Sessions/SessionCreate.razor.cs:160-166,.../Pages/Sessions/SessionDetail.razor.cs:221-226). Its tests includeMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/SessionCreateModelTests.cs.
SessionCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionCreateModel.cs:11· Level 4 · sealed class (form model)
- What it is: the create-side concrete of
SessionFormModel. One method,ToNew, turns the entered fields plus the event the organizer filed the session against into the DTO the create posts. - Depends on:
SessionFormModelandSessionDTO(line 1), plus theEventidentifier alias. No externals. - Concept introduced, server-allocated identifiers in an app-assigned key space. Like
EventCreateModel, this model postsId = default(line 25). The reason it is worth naming is that a session'sintprimary key is its Sessionize id, so the column is app-assigned rather than database-generated, and something has to pick the number. The in-code comment (lines 23-24, tagged M162) records that the server does: whencommand.Id == default,CreateSessionHandlerallocates the next id inside the reserved manual range (SessionInvariants.ManualIdRangeStarttoManualIdRangeEnd) throughManualIdAllocator.NextAsyncand fails withSession.ManualIdRangeExhaustedpast its end (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Sessions/UseCases/Create/CreateSessionHandler.cs:65-77), retrying on a unique-constraint collision throughManualIdAllocator.RetryOnCollisionAsync(.../CreateSessionHandler.cs:46-51) up toManualIdAllocator.MaxAttempts(3) attempts (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Application/Common/ManualIdAllocator.cs:16). The page readscreated.Idback off the response before navigating (.../Pages/Sessions/SessionCreate.razor.cs:180).[Rubric §8, Data Architecture]: identifier assignment is an explicit, documented policy per aggregate rather than an implicit database default or a client guess, which is what lets Sessionize-imported and organizer-created sessions share one key space without colliding. - Walkthrough
ToNew(EventIdentifierType eventId)(lines 20-33):Id = default(line 25),Titlefrom the base'sSessionTitle(line 26),Description(line 27), the owningEventIdfrom the parameter (line 28), the optionalRoomId(line 29),StartsAtandEndsAteach through the base'sCombine(lines 30-31), andIsServiceSession(line 32).- The
Status,AccessibilityInfo, andResourceLinksproperties the base declares are not written here: they are edit-time fields, so a newly created session carries none of them.
- Why it's built this way: sessions live in a key space shared with Sessionize, so the id is chosen
where the existing ids are visible (the handler's range query) rather than guessed by the client; and a
timestamp is only sent when both its halves are set, which the page has already guaranteed: an
organizer who picks a date but no time is refused before
ToNewruns, throughSessionFormModel.ScheduleErrorKey(doc comment, lines 14-16), so no midnight is ever invented. - Where it's used: the
_modelfield ofSessionCreate(.../Pages/Sessions/SessionCreate.razor.cs:35), consumed by itsCreateSessionAsync(.../Pages/Sessions/SessionCreate.razor.cs:176). Its tests areMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/SessionCreateModelTests.cs.
SessionEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionEditModel.cs:16· Level 4 · sealed class (form model)
- What it is: the edit-side concrete of
SessionFormModel, used bySessionDetail's inline editor.LoadFromopens the editor andToUpdatedcloses it, replacing what the class doc calls thirteen assignments in the page each way (lines 11-14). - Depends on:
SessionFormModelandSessionDTO(line 1). - Concept introduced: none new. The shadow-editing-through-a-model idea is
EventEditModel's, and the split-timestamp handling isSessionFormModel's. What is worth naming is the symmetry:LoadFromsplits each timestamp with?.Dateand?.TimeOfDay(lines 29-32) andToUpdatedrejoins it withCombine(lines 58-59), so an untouched session round-trips to the same value.ToUpdatedbuilds its result assession with { ... }(line 53), so every field the form does not edit is carried over from the loaded record rather than re-listed.[Rubric §8, Data Architecture]: because of thatwithexpression the loadedRowVersion, the optimistic-concurrency token of ADR-035, is re-sent unchanged, along with the identity and owning event. - Walkthrough
LoadFrom(SessionDTO session)(lines 23-38): null guard, then eleven copies, including the four schedule halves (lines 29-32) and theRoomId(line 37).ToUpdated(SessionDTO session)(lines 49-65): null guard, thensession withoverriding nine members off the model (lines 55-63):Title,Description,RoomId, the two rejoined timestamps,Status,IsServiceSession,AccessibilityInfo, andResourceLinks. The doc comment (lines 40-45) names what round-trips instead of resetting: the identity, concurrency token, owning event, and the fields this form does not show (informed, confirmed, plenum, live and recording links). A timestamp is sent only when both its halves are set (lines 58-59); a timestamp whose both halves are blank sendsnull, which clears the stored value rather than preserving it, while one with a single half never reaches this method, because the page refuses it first throughSessionFormModel.ScheduleErrorKey(doc comment, lines 44-45).- The class doc (lines 8-10) records the deliberate omission: the owning event is displayed but never edited, because moving a session between events is a create plus a delete.
- Why it's built this way: the session form has thirteen editable values and two of them are
composites, so a hand-written transcription in the page is the most likely place for a dropped field.
One method each way makes the round trip verifiable by reading two adjacent blocks, and copying from
the loaded record with
withmeans a DTO field the form never shows cannot be reset by omission. - Where it's used: the
_modelfield ofSessionDetail(.../Pages/Sessions/SessionDetail.razor.cs:92), driven by itsStartEditingAsync(LoadFrom,.../Pages/Sessions/SessionDetail.razor.cs:179) andSaveChangesAsync(ToUpdated,.../Pages/Sessions/SessionDetail.razor.cs:231). Its tests areMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/SessionEditModelTests.cs.
SessionLookups
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionLookups.cs:31· Level 5 · sealed class (page collaborator)
- What it is: the display-enrichment layer behind
SessionDetail. It holds the three global lookup dictionaries (events, speakers, category items) plus the room list of the loaded session's event, and exposes the naming and "not yet assigned" queries the page renders from. - Depends on: four service clients taken as primary-constructor parameters (lines 32-35),
IEventLookupService,ISpeakerLookupService,ICategoryItemLookupService, andIRoomUIService; theEventInfo,SpeakerInfo, andCategoryItemInfolookup records;RoomDTO; andResult(line 7). Externals:System.Globalization.CultureInfo. - Concept introduced, the page-owned collaborator with an input-keyed cache. Two ideas make this
class worth reading:
- Not a registered service, deliberately. The
<remarks>(lines 17-21) says it caches per page instance, because the underlying lookup services already do their own scope-wide caching; holding it here keeps the page's own state down to the session being edited. So it is constructed in the page'sOnInitialized(.../Pages/Sessions/SessionDetail.razor.cs:79-80) rather than injected.[Rubric §19, State Management & Data Flow]assesses where view state lives and how long it lives: this puts derived display state at exactly the lifetime that needs it. - The room cache is keyed by the event it was fetched for. The three global dictionaries are
hydrated once each with a null check (lines 66, 75, 84), but rooms are per event, so
_roomNamesis paired with_roomsForEventId(line 45) and refetched whenever the loaded session belongs to a different event. The in-code comment (lines 42-44) records the exact bug the key prevents: navigating to a session in another event would otherwise render the previous event's room names and offer its rooms in the edit picker. A third, quieter rule runs through every accessor: a name falls back to the identifier when its lookup is unloaded (lines 133, 146-148, 159-162, 171), so a failed lookup load degrades to raw ids instead of an empty cell (<remarks>, lines 22-25). One accessor distinguishes the two cases:SpeakerName(lines 144-152) takes a localizeddeletedSpeakerLabel, because a session keeps its link to a speaker deleted later (BR-70) while the lookup serves live speakers only, so an id missing from a loaded lookup is a deleted speaker and shows the label rather than a raw GUID (OBS-1, doc comment lines 135-140). Only an unloaded lookup still yields the identifier.[Rubric §29, Resilience & Business Continuity]assesses graceful degradation: a non-critical enrichment failure costs readability, not the page.
- Not a registered service, deliberately. The
- Walkthrough
- State: three nullable
IReadOnlyDictionaryfields (lines 37-39), the room-name dictionary (line 40), and the event key (line 45). EditableRooms(line 51) is the room list the edit picker binds, initialized to an empty array so the picker renders no options rather than needing a null check per render.HasMultipleEvents(line 56) is true only when more than one event exists, which is when naming a session's event earns a row in the detail table (.../Pages/Sessions/SessionDetail.razor:81-83).LoadGlobalAsync(CancellationToken)(lines 64-94) loads each of the three dictionaries at most once and returns the first failure unchanged, so the page reports the real error rather than a generic one.LoadRoomsAsync(EventIdentifierType, CancellationToken)(lines 103-127) short-circuits when the cached list is already for that event (lines 106-109), otherwise fetches up to 500 rooms filtered byEventId equals <id>(lines 111-117) and assigns_roomNames,EditableRooms, and_roomsForEventIdtogether (lines 123-125).- Naming:
EventName(line 132),SpeakerName(id, deletedSpeakerLabel)(line 144),CategoryItemName(line 157), andRoomName(line 170).Describe(line 176) is the shared qualifier that renders a category item as"Category: Item"when the category has a title and just the item name otherwise (line 180). - Picker sources:
SpeakersExcept(lines 186-195) andCategoryItemsExcept(lines 200-209) subtract the already-assigned ids through aHashSetso the add pickers never offer a duplicate, and return an empty sequence while the lookup is unloaded.
- State: three nullable
- Why it's built this way:
SessionDetailis the join-heaviest page in the module, and without this class its code-behind would carry four dictionaries, a cache key, six naming methods, and two set-difference queries on top of load, edit, save, delete, and two join editors. Extracting the enrichment leaves the page with orchestration only. The class stays ADC-local rather than moving toMMCA.Commonbecause it is shaped entirely by Conference's own lookup services. - Where it's used:
SessionDetailonly (.../Pages/Sessions/SessionDetail.razor.cs:67, constructed at lines 79-80), and read throughout its template (.../Pages/Sessions/SessionDetail.razor:42, 81-85, 112-116, 151-154).
SessionCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionCreate.razor.cs:18· Level 10 · class (Blazor code-behind)
- What it is: the organizer form that creates a session. It collects the shared
SessionCreateModelfields plus the owning event, posts the new record, and redirects to that session's detail page. It is the clearest place to see the one thing that makes session editing awkward: a dependent lookup, because rooms belong to the chosen event. - Depends on:
CreatePageBase(@inherits,.../Pages/Sessions/SessionCreate.razor:8;MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:21), which supplies the injectedToast(CreatePageBase.cs:24), the boundForm(line 27),IsSaving(line 30),SaveResult(line 36),MarkDirty(line 39), theSubmitAsyncpipeline (lines 53-110) and, through itsCancellablePageBaseparent,PageTokenand theDispose(bool)the page overrides;ISessionUIService(line 20),IEventLookupServicereturningEventInfo(line 21),TimeProvideras the clock for the default-event choice (line 22),IRoomUIServicefor the room dropdown (line 23),EventInfoDefaultsfor that default (line 74),SessionCreateModel(line 36) and its baseSessionFormModel'sScheduleErrorKeyfor the schedule refusal (line 163),RoomDTO(line 44),ModelValidationplusDataAnnotationsModelValidator(line 60),CreateSubmitOptions(line 185),ConferenceRoutePaths, and theLatestLoadGuard(_roomsLoad, line 29). TheErrorMessagesvalidation toast and theResultUiExtensions.NotifyOnFailurecall that reports a failedResultnow live in the base (CreatePageBase.cs:71, 97), not in this file. It uses theEvent,Room, andSessionidentifier aliases. Externals: Blazor ([Inject],NavigationManager), MudBlazor (BreadcrumbItem,MudAlert),System.Globalization.CultureInfo, and theIStringLocalizer<SessionCreate>injected by the template (.../Pages/Sessions/SessionCreate.razor:7). - Concept introduced, the dependent lookup. The create-form shape itself is
EventCreate's; what is new here is that one field's options depend on another field's value.LoadRoomsAsync(lines 92-128) fetches rooms filtered by the selected event, andOnEventChangedAsync(lines 132-148) reloads them and clears the previous choice whenever the event changes. The doc comment (lines 87-91) records why this is not cosmetic: BR-130 rejects a room from another event server-side, so the dropdown must only ever offer rooms of the chosen event.[Rubric §24, Forms, Validation & UX Safety]: the client is shaped so it cannot compose a request the server will refuse, and the same applies to the owning event and the schedule:PreCheckSchedule(lines 155-170) refuses a missing event first (O-115, lines 157-161, which also covers the case where the picker is hidden), then asksSessionFormModel.ScheduleErrorKeyfor a half-entered start or end or an end not after the start (BR-122, line 163), and the base runs it after the form validates and before anything is posted (CreatePageBase.cs:75-80).[Rubric §19, State Management & Data Flow]:_roomsis derived state, explicitly invalidated when its input changes rather than left to go stale, and_model.RoomIdis nulled alongside it (line 138) with an in-code note that keeping it would have the server reject the save. The fetch is also last-writer-wins:LoadRoomsAsynccalls_roomsLoad.Begin()(line 100) for a token and a generation, before the unset-event branch so clearing the event cancels a fetch in flight, and drops a superseded answer after the await (IsCurrent, lines 114-117), so a slow earlier event's rooms can never overwrite those of the event now selected (in-code comment, lines 26-28). A second idea belongs to the model rather than the page:SessionCreateModelpostsId = defaultand leaves allocation in the reserved manual-id range to the server, the same choice asEventCreate's. - Walkthrough
OnInitializedAsync(lines 50-85) builds the breadcrumb trail (lines 52-57), wires the validation delegate (line 60), loads the event lookup through the base'sPageTokenand toastsSnackbar.LoadLookupsFailedon failure (lines 64-70), defaults to the current or next event throughEventInfoDefaults.SelectCurrentOrNextId(_eventLookup, TimeProvider.GetUtcNow().UtcDateTime)when it returns an id (lines 72-77; the in-code comment says every organizer create page does this, so the common case is one click even with two editions loaded, as inRoomCreate), then callsLoadRoomsAsync(line 79). Reading "now" from the injectedTimeProviderlets a test pin the clock.LoadRoomsAsync(lines 92-128): returns at once when the page is disposed (lines 94-97), begins the room-load generation (line 100), then with no event chosen clears_roomsand returns (lines 102-106); otherwise it fetches up to 500 rooms filtered byEventId equals <selected>(lines 108-113) with the guard's token. A stale generation returns silently (lines 114-117). On failure it toasts and leaves the previously offered rooms in place (lines 119-125).CreateSessionAsync(lines 175-186) clears_scheduleError(line 177, declared at line 41) and returns the base'sSubmitAsync(lines 178-185) with three arguments: the save delegate, which posts_model.ToNew(_eventId)with the token the base passes in (line 179); the success step, which toastsSnackbar.Createdand navigates toConferenceRoutePaths.SessionDetails(created.Id)(lines 182-183); and aCreateSubmitOptionscarrying the page localizer andPreCheck = PreCheckSchedule(line 185). The base does the rest: it ignores a submit while the form is unbound or a save is in flight, validates the form and toastsErrorMessages.ValidationErroron failure, runs the pre-check and toasts its message as a warning, setsIsSaving, saves withPageToken, clears the dirty flag before the success step, keeps a failed result inSaveResultand reports it throughNotifyOnFailure, treatsOperationCanceledExceptionas a stopped submit, and always clearsIsSaving(CreatePageBase.cs:61-109).PreCheckSchedulereturns the localizedValidation.EventRequiredtext for a missing event without touching_scheduleError(line 160); for a schedule refusal it stores the localized text of the keyScheduleErrorKeyreturned in_scheduleErrorand returns it (lines 168-169), so that refusal is both toasted and rendered as an inlineMudAlertuntil the next attempt (.../Pages/Sessions/SessionCreate.razor:44-46). A failed save renders inline too, through<ErrorSummary Result="SaveResult">(.../Pages/Sessions/SessionCreate.razor:41), which survives the snackbar timing out while the organizer is still reading the form (in-code comment, lines 172-174).Dispose(bool)(lines 194-203) overrides the base: it disposes_roomsLoadonce (line 198), then callsbase.Dispose(disposing)(line 202), which cancels the page token (doc comment, line 192).- The template shows the event picker only when it is worth showing,
ShowEventPicker="@(_eventLookup is not null && _eventLookup.Count > 1)"(.../Pages/Sessions/SessionCreate.razor:30), and passes_roomsplusRoomPickerBeforeSchedule="true"so the dependent field is chosen before the schedule (.../Pages/Sessions/SessionCreate.razor:32).
- Why it's built this way: one create-form shape (validate, post, redirect to detail) is reused across
the Conference entities, and it now lives once in
CreatePageBaseso behavior stays uniform; the page keeps only its model, its service call, its success step and its one domain pre-check. The split date/time editing exists because MudBlazor has no single date-time picker, soSessionFormModelcomposes two controls, refuses a half-entered pair, recombines them defensively, and checks their order; and the event-scoped room reload keeps the client from ever offering a value the server will reject. - Where it's used: the
/sessions/createroute (.../Pages/Sessions/SessionCreate.razor:1), reached fromSessionList's create button (.../Pages/Sessions/SessionList.razor.cs:153); on success it hands off toSessionDetail. Its UI tests areMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/SessionCreateTests.cs.
SessionDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionDetail.razor.cs:28· Level 7 · class (Blazor code-behind)
- What it is: the organizer's full session editor: load one session by route id, inline-edit it,
delete it, and manage its two child collections (speakers and category items), with event, room,
speaker, and category names resolved through
SessionLookups, plus the session's recorded change history for a viewer allowed to see it. It is the join-heaviest detail page in the Conference UI. - Depends on:
DetailPageBase(@inherits,.../Pages/Sessions/SessionDetail.razor:12), which suppliesBeginLoad,CompleteLoad,LoadState,LoadGuard,PageTokenand theBeginEdit/EndEditpair; seven service clients,ISessionUIService,IEventLookupService,ISpeakerLookupService,ICategoryItemLookupService,ISessionSpeakerUIService,ISessionCategoryItemUIService, andIRoomUIService(lines 32-38), plusIToastService(line 40) and anIServiceProvider(line 44) from which it resolvesIAuditHistoryUIServiceonly on demand;AuditHistoryEntryDTO(line 52) and theAuditHistoryPanelcomponent (.../Pages/Sessions/SessionDetail.razor:208);SessionLookups(line 67),SessionEditModel(line 92) andCommittedWriteReload(line 95), withSessionFormModel'sScheduleErrorKeyfor the schedule refusal (line 221); theSessionDTOshape and theSpeakerInfo/CategoryItemInfolookup records;Result,ResultUiExtensions.NotifyOnFailure,ConferenceRoutePaths,ErrorMessages(ValidationError, line 217), theDetailLoadStateContentcomponent (.../Pages/Sessions/SessionDetail.razor:24-27) and theDeleteConfirmationcomponent. The routeIdis already aSessionIdentifierTypeparameter (line 49), so the page passes it straight toGetByIdAsync(line 127) with no string parse. Uses theEvent/Room/Speaker/Session/SessionSpeaker/SessionCategoryItem/CategoryItemaliases. - Concept introduced, the load generation and the join-collection editor. The route-id parsing,
load-once-on-parameters, and model-based shadow editing are
EventDetail's. Two things are new:- A monotonic load generation, owned by the base page.
LoadAsynccallsDetailPageBase.BeginLoad()(line 123,MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:48), which begins a generation on the sharedLatestLoadGuardand putsLoadStateback toLoading. After the session fetch it callsCompleteLoad(generation, sessionResult)(line 131,DetailPageBase.cs:67), which ignores a superseded response and otherwise recordsDetailLoadStateLoaded,NotFoundorFailed; the two later awaits re-checkLoadGuard.IsCurrent(generation)themselves (lines 146,- and drop their results if a newer load has started. The token from
BeginLoad(), notPageToken, is what each of the three calls passes down._loadedIdis stamped synchronously before the load starts (line 116, typedSessionIdentifierType?at line 86), so two rapid route changes would otherwise let the later-completing fetch paint the wrong session; the generation, not_loadedId, is what is authoritative here. A failed current load also nullsSession(lines 135-138, comment lines 133-134), because the edit, delete and child-mutation actions are bound toSessionand must not act on the previous session under the new id. A not-found or failed load raises no toast (comment lines 129-130): the template rendersDetailLoadStateContentfor every state butLoaded, withOnRetry="LoadAsync"for a failure (.../Pages/Sessions/SessionDetail.razor:24-27), so a missing record and an unreachable one never share the same body.[Rubric §19, State Management & Data Flow]assesses whether concurrent updates to view state are ordered: this is an explicit last-writer-wins protocol rather than an implicit one.[Rubric §12, Performance & Scalability]: a superseded load's results are discarded rather than painted, so nothing stale is rendered.
- and drop their results if a newer load has started. The token from
- Join management as an add/remove/available triple, factored once. The same three-method pattern
applies twice, to speakers and to category items, and both funnel through
MutateChildAsync(lines 333-353), which takes the operation, its own failure and success resource keys, and an optional picker-clearing callback. Each mutation ends with a fullLoadAsync(line 347) rather than a local patch. Its failure toast is one call,result.ActionErrorMessage(L, L[failureKey].Value)(line 341, doc comment lines 326-332), the sharedResultUiExtensionshelper (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ResultUiExtensions.cs:317): anErrorType.Unexpectedfault (a 500, transport failure, or timeout) shows that operation's fixed failure message rather than raw diagnostic text, while any refusal the API stated (O-46, for example "already associated") shows the API's own localized message, falling back to the fixed key when that composes to nothing (ADR-027 Decision 9 carve-out).[Rubric §8, Data Architecture]: the update DTO re-sends the loadedRowVersionthroughSessionEditModel.ToUpdated, the client half of the optimistic-concurrency token (ADR-035). A save whose update committed but whose reload failed leaves the page stale throughCommittedWriteReload, and the next edit re-reads before opening the form, so the next save does not post the oldRowVersion.[Rubric §24, Forms, Validation & UX Safety]: the save refuses a half-entered start or end and an end that is not after the start (BR-122) on the client, through the sharedSessionFormModel.ScheduleErrorKey, before it posts.[Rubric §18, UI Architecture & Component Design]: the page's remaining size comes from breadth (two join collections, four lookups, seven clients, the history panel), not from bespoke mechanics; enrichment lives inSessionLookups, form shape inSessionEditModel, and the history list in the sharedAuditHistoryPanel.
- A monotonic load generation, owned by the base page.
- Walkthrough
OnInitialized(lines 69-84) builds breadcrumbs, constructsSessionLookupsfrom the four injected lookup clients (lines 79-80), and wires the validation delegate (line 83).OnParametersSetAsync(lines 109-118) loads only when the routeIddiffers from_loadedId. It is a non-async method that returnsTask.CompletedTaskfor the unchanged id andLoadAsync()directly otherwise (lines 113, 117), since it has no work to do after the await.LoadAsync(lines 120-168):BeginLoad()for the token and generation (line 123),GetByIdAsync(Id, true, token)so the join collections arrive with the record (line 127), thenCompleteLoad(line 131); on a failed or superseded load it nullsSessiononly for the current generation and returns (lines 131-141). Otherwise it adopts the session (line 143), hydrates the global lookups (line 145) and the event's rooms (line 156), each followed by aLoadGuard.IsCurrentre-check (lines 146, 157), reporting a lookup failure throughNotifyOnFailure(lines 151, 162). There is nofinallyand no page-local spinner flag: the base'sLoadStatedrives the loading body.- Edit (lines 170-203):
StartEditingAsyncasksEnsureCurrentSessionAsync(lines 193-203, doc comment lines 188-192) for the record to edit. That helper returnsnullwhen nothing is shown or whenCommittedWriteReload.EnsureCurrentAsync(line 196) reports a failed re-read; otherwise it swapsSessionfor the current record (line 201).StartEditingAsyncthen calls_model.LoadFrom(current)andBeginEdit(lines 179-180), with anOperationCanceledExceptioncatch for disposal and render-mode transitions (lines 182-185). - Save (lines 205-255):
SaveChangesAsyncclears_scheduleError(line 212, the field is declared at line 98), validates the form (lines 214-219), then refuses a schedule the model rejects: when_model.ScheduleErrorKey()returns a key (a half-entered start or end, or an end not after the start) it stores that key's localized text in_scheduleError, toasts it as a warning, and returns without posting (lines 221-226); the template renders it as an inlineMudAlert(.../Pages/Sessions/SessionDetail.razor:54-56). Otherwise it posts_model.ToUpdated(Session)and stops on a failed update (lines 231-235). It then re-fetches withincludeChildren: true(line- and hands the outcome to
_writeReload.TryAdopt(line 239): on success it swapsSessionfor the refreshed record and toastsSnackbar.Updated(lines 241-242); on a failed reload the page is marked stale and theSnackbar.SavedRefreshFailedwarning shows instead. Either way the edit ends throughEndEdit(line 245), because the update already committed (comment, line 237).
- and hands the outcome to
- Delete (lines 257-283): confirm through
_deleteConfirm.ShowAsync(Session.Title)(line 264), delete, navigate back to the list. - Joins:
GetAvailableSpeakers/GetAvailableCategoryItems(lines 285-289) delegate the set difference toSessionLookupsso a picker never offers an already-assigned entry;AddSessionSpeakerAsync(lines 291-303) andAddSessionCategoryItemAsync(lines 309-320) each capture their ids into locals before building the delegate, with an in-code note that nullable flow analysis does not reach inside a lambda (line 298); both are non-async methods that return theMutateChildAsynctask directly (lines 300, 317) andTask.CompletedTaskon the guard path; the two remove methods (lines 305-307, 322-324) are one-liners over the sameMutateChildAsync. - History:
FetchHistoryPageAsync(lines 51-60, ADR-075) returns one page of the session's recorded changes, newest first, by callingIAuditHistoryUIService.GetPageAsyncwith the Conference audit-history routeAdmin/Conference/AuditHistory(AuditHistoryRoutePrefix, line 47), the entity name"Session", and the routeIdas an invariant string. The service is resolved from the injectedIServiceProviderinside the fetch rather than injected directly, so a host or test that never shows the panel needs no audit-history client registered (comment, lines 42-43). The template hands this method toAuditHistoryPanelasFetchPage, and renders the panel only when the viewer's token carries theAdministrationPermissions.ViewAuditTrailpermission claim, checked on the claim and never on a role name (.../Pages/Sessions/SessionDetail.razor:202-210).
- Why it's built this way: a session is the join-heavy center of the program (speakers, category items, room, event, timing), so the organizer edits all of it from one console. Reloading after each join mutation keeps the page a single source of truth instead of hand-patching local collections, and the load generation is what makes that reload safe when the reader is navigating quickly between sessions. The history panel is gated on a permission rather than a role, and its client is resolved lazily, so adding it cost the page no new mandatory dependency.
- Where it's used: the
/sessions/{Id}organizer route (.../Pages/Sessions/SessionDetail.razor:1), reached fromSessionListrows and fromSessionCreate's success redirect; its "view feedback" button, shown to the Organizer role only, opensOrganizerSessionFeedbackthroughConferenceRoutePaths.SessionFeedbackOrganizer(.../Pages/Sessions/SessionDetail.razor:188-194). Its UI tests live underMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/(SessionDetailStaleLoadTests,SessionDetailRoomCacheTests,SessionDetailScheduleTests,SessionDetailChipErrorTests,SessionDetailCategoryChipTests,SessionDetailDeletedSpeakerTests, andHistory/SessionDetailHistoryPanelTests). - Caveats / not-in-source: reads pass
includeChildren: trueso the join collections populate; how the server populates children, and how the audit-history endpoint records and pages the entries, are outside this page.
SessionStatusDisplay
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionStatusDisplay.cs:11· Level 10 · class
- What it is: a small static helper that maps a Sessionize status string to a MudBlazor
Colorand to a localized label for chip rendering.GetStatusColor(lines 13-22) switches onSessionStatuses.Accepted,Waitlisted,AcceptQueue,Nominated,DeclineQueue, andDeclined, defaulting toColor.Defaultfor anything else.GetStatusLabelKey(lines 31-40) maps the same six statuses toStatus.*resource keys and returnsnullfor anything else, andGetStatusLabel(lines 50-54) resolves that key through anIStringLocalizer<SessionList>, returning the status as stored when no key matches. - Depends on:
SessionStatusesfor the status constants, andSessionListas the type argument of the localizer inGetStatusLabel(line 50), which is why the helper sits at the same level as the page. Externals: MudBlazor'sColorenum,IStringLocalizer<T>. - Concept introduced, one label source for filter and chip. The labels come from the
SessionListresources so a status chip shows exactly the wording of the page's status filter (doc comments, lines 25-28 and 43-46); a free-text status outsideSessionStatuses(Sessionize imports any string) is shown as stored rather than hidden.GetStatusLabelnull-guards the localizer (line 52). - Why it's built this way: keeping the color switch, the label-key switch, and the label lookup in
one
internal static classletsSessionListandSessionSelectionDisplayshare them instead of each page keeping its own copy of the same six-case switch. - Where it's used:
SessionList(StatusLabel,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionList.razor.cs:88) andSessionSelectionDisplay(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/Selection/SessionSelectionDisplay.cs).
SessionList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Sessions/SessionList.razor.cs:26· Level 10 · class (Blazor code-behind)
- What it is: the organizer browse page for sessions and the richest list in the Conference UI. It carries three filters (free-text title search, session status, and event), enriches each row with room and speaker names, and color-codes the Sessionize status. It sits at the top of the group's dependency order because it transitively pulls in the most lookups and defaults.
- Depends on: extends
EventFilteredListPageBase<TDto>overSessionDTO(line 26;MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:25), itself aDataGridListPageBase<TDto>, which owns the event scope: the persistedeventIdfilter with its"all"sentinel, the default current or next event, the pre-fetch wait and the bounded pre-render lookup (<remarks>, lines 20-25). The page injectsISessionUIService,IRoomUIServiceandISpeakerLookupService(lines 31-33),NavigationManager(line 34) and aTimeProvidernamedClock(line 35) for the pre-render budget. Its markup is oneListPageShell<TItem>(.../Pages/Sessions/SessionList.razor:10-165), held as_shell(line 37), which owns the grid, theMobileInfiniteScrollList<TItem>, and the delete dialog; the page hands the first two to the base through theGridRefandMobileListRefoverrides (lines 38-39). It usesSpeakerInfo(line 44),PrerenderLookupBudget(lines 67-68),SessionStatusDisplayfor the status-to-color mapping and the localized status label (StatusLabel, line 88),ConferenceRoutePaths,ErrorMessages(line 150), andListPageActions(line 144). The default event is chosen in the base throughCurrentEventSelector(EventFilteredListPageBase.cs:194), not in this file. Uses theRoom/Session/Speakeraliases. - Concept introduced, the multi-filter enriched list.
SessionListlayers three refinements on the shared event scope ofEventFilteredListPageBase<TDto>:- Two page filters on top of the inherited event filter.
SavePageFiltersandRestorePageFilters(lines 46-56) persist onlysearchandstatus; the base persistseventId, writing"all"for an explicit clear so it is told apart from no saved state, which is what lets the computed default apply only on a first visit (EventFilteredListPageBase.cs:112-113,:127).ApplyFilters(lines 131-138) emitsTitle containsandStatus equals, then calls the base'sApplyEventFilter(line 137;EventFilteredListPageBase.cs:216-220) forEventId equals. - Enrichment from two bulk loads instead of per-row fetches.
OnInitializedAsyncstarts the speaker lookup and an all-roomsGetAllAsyncside by side with the event load, each throughPrerenderLookupBudget.RunAsync, bounded only while the page is not yet interactive (lines 66-68; the budget is 5 seconds,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/PrerenderLookupBudget.cs:17). The rooms fold into one_roomNamesdictionary (lines 75-81), and the speakers backGetSpeakerList(lines 90-98), which maps a row'sSessionSpeakersto display names and skips ids the lookup does not know. Both loads are explicitly non-critical: a failedResultis simply not unwrapped, and the comment (lines 64-65) says the fallback is no speaker names and a dash for the room, not a broken page. The paged fetch itself passesincludeChildren: true(line 121) so each row arrives with its speaker joins. - Status color and label, delegated rather than local. The mapping is
SessionStatusDisplay.GetStatusColor, called from both the mobile card and the grid's status chip (.../Pages/Sessions/SessionList.razor:72, 147), so this page andSessionSelectionDisplayshare one copy of the switch. The chip text goes throughStatusLabel(line 88, comment lines 86-87, X-01), which callsSessionStatusDisplay.GetStatusLabel(status, L), so a chip shows the same localized label as the status filter and an unrecognized free-text status is shown as stored. The startup race guard now lives in the base: the page callsBeginEventsLoad()before the first await (line 62, comment lines 60-61), and the base'sOnBeforeFetchAsyncoverride (EventFilteredListPageBase.cs:213, overMMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1077) returnsWaitForEventsAsync()(EventFilteredListPageBase.cs:204), so every fetch the base runs, grid and phone list alike, waits for the event load beforeApplyFiltersreads the selected event, because the grid's firstServerDatacall can race ahead of initialization completing (comment, lines 117-118).[Rubric §18, UI Architecture & Component Design]: the status filter surfaces the program-committee workflow inline instead of hiding it behind a separate screen, and the event scope is written once in a base shared by the event-filtered lists rather than per page.[Rubric §23, Front-End Performance & Rendering]: one all-rooms fetch plus one speaker lookup, run concurrently, replace what would otherwise be per-row enrichment calls.[Rubric §25, Navigation & Information Architecture]: all three filters survive navigation through the base classes' persistence contract, with the"all"sentinel and the computed default.[Rubric §29, Resilience & Business Continuity]: both enrichment loads degrade rather than fail, and the pre-render budget keeps an outage from stalling the first visit.
- Two page filters on top of the inherited event filter.
- Walkthrough
OnInitializedAsync(lines 58-84): begin the event load (line 62), start the two bounded lookups (lines 66-68), adopt the speakers and fold in the rooms when they succeed (lines 70-81), thenawait WaitForEventsAsync()(line 83).- Default event: the base's
ResolveDefaultEventFilter(EventFilteredListPageBase.cs:181-201) keeps a restored id that still exists in the loaded events, otherwise falls back toCurrentEventSelector.SelectCurrentOrNextover them with the base'sTimeProvider(EventFilteredListPageBase.cs:194-199), so a dangling saved id never silently shows an empty grid and a test can pin the clock (SessionListCurrentEventClockTests). OnSearchChangedandOnStatusChanged(lines 105-115) are non-async methods that each update one filter and return the page'sReloadActiveLayoutAsync(lines 100-101), which passes the shell's mobile list to the base'sReloadActiveLayoutAsync(MobileInfiniteScrollList<TDto>?)(DataGridListPageBase.cs:1879). The event picker binds the base'sOnEventFilterChanged(EventFilteredListPageBase.cs:223-228), which calls the page'sReloadForEventFilterAsyncoverride (line 103), the same reload.- Both layouts share one fetch,
FetchSessionsAsync(lines 119-121, comment lines 117-118), which callsGetPagedAsyncwithincludeChildren: true.LoadServerData(lines 123-124) hands it andApplyFiltersto the base'sLoadServerDataAsyncfor the grid;FetchMobilePage(lines 128-129) is a property built by the base'sMobilePageFetcher(DataGridListPageBase.cs:1101) over the same pair, with no default sort, so the phone list keeps the API's own order (comment, line 127). DeleteSessionAsync(lines 143-151) delegates the confirm, delete, toast, and reload sequence toListPageActions.DeleteWithConfirmationAsync, passing the shell'sDeleteDialog(line 145);NavigateToCreateandNavigateToDetails(lines 153-154) route toSessionCreateandSessionDetail, andOnMobileCardClick(line 140) opens the detail from a card.- The event picker renders only when
CanRenderEventPickerholds (.../Pages/Sessions/SessionList.razor:36; interactive and more than one event,EventFilteredListPageBase.cs:80). - The grid uses
PropertyColumns for the sortable fields (Title,StartsAt,EndsAt,RoomName,Status,.../Pages/Sessions/SessionList.razor:85, 119, 125, 134, 142) andTemplateColumns only for the speakers and row actions (lines 92, 156). The status column keeps its chip inside aCellTemplateof aPropertyColumnbecause server-side sorting keys off the property expression (in-template comment,.../Pages/Sessions/SessionList.razor:140-141).
- Why it's built this way: sessions are the central editable entity of the program, so the list has to answer "what is in this conference, in what state, presented by whom" at a glance; defaulting to the active event and enriching from two bulk loads keeps that view both relevant and cheap. The shell, the event-scope base and the data-grid base's fetch hook leave the page with its two filters, its enrichment and its one service call.
- Where it's used: the
/sessionsorganizer route (.../Pages/Sessions/SessionList.razor:1-2,[HasPagePermission(ConferencePermissions.SessionsManage)]); rows openSessionDetailand the create button opensSessionCreate. Its UI tests areSessionListEventFilterTests,SessionListCurrentEventClockTestsandSessionListStatusChipTestsunderMMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Pages/Sessions/. - Caveats / not-in-source: the page builds speaker and room names from its own lookups rather than
trusting the paged payload alone, so it degrades to a dash rather than a wrong name when an id is
unknown; how the paged endpoint populates
SessionSpeakersis a server-side concern outside this file.
IOrganizerEventFeedbackUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/IOrganizerFeedbackUIService.cs:11· Level 3 · interface
- What it is: the organizer-facing contract for event feedback moderation: read every answer
for an event, and delete one (
IOrganizerFeedbackUIService.cs:11-21). Its doc comment (lines 7-10) ties it to business rule BR-53 and states the distinguishing property: unlike the attendee-facing service, this returns answers from all users. - Depends on: EventQuestionAnswerDTO, the
EventIdentifierTypeandEventQuestionAnswerIdentifierTypealiases, andResult/Result<T>. - Concept introduced, the audience-scoped read contract.
[Rubric §11, Security](assesses whether authorization decisions are made by the server rather than assumed by the client: this interface is named for the organizer audience, but it carries no role logic of its own; the server widens the result set for organizer users, and the client simply asks for the full list).[Rubric §9, API & Contract Design]: a separate contract for the same underlying resource, keyed by audience, keeps the attendee path from accidentally acquiring an "all users" read. The delete is a moderation action, which is why an otherwise read-only organizer surface has one write. - Walkthrough: two members, both
EventIdentifierType-scoped.GetAllAnswersAsync(eventId, ct)(IOrganizerFeedbackUIService.cs:13-15): returnsTask<Result<IReadOnlyList<EventQuestionAnswerDTO>>>, a flat list rather than a paged envelope, so paging is the implementation's problem.DeleteAnswerAsync(eventId, answerId, ct)(lines 17-20): returnsTask<Result>, with the event id carried alongside the answer id because the endpoint scopes the delete to its parent, the same parent-scoped rule the join services follow.
- Why it's built this way: exposing
IReadOnlyList<T>keeps the Blazor grid simple, and the implementation absorbs the transport shape; see OrganizerEventFeedbackService (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/OrganizerFeedbackService.cs:14-54) for the paged request it actually issues and the ceiling that comes with it. - Where it's used: implemented by OrganizerEventFeedbackService,
registered scoped at
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:40-41(whose comment names BR-53 moderation), and injected into OrganizerEventFeedback (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Feedback/OrganizerEventFeedback.razor.cs:20).
IOrganizerSessionFeedbackUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/IOrganizerFeedbackUIService.cs:27· Level 3 · interface
What it is: the session twin of IOrganizerEventFeedbackUIService, the same two operations keyed on a session instead of an event (
IOrganizerFeedbackUIService.cs:27-37), with the same BR-53 all-users note in its doc comment (lines 23-26).Depends on: SessionQuestionAnswerDTO, the
SessionIdentifierTypeandSessionQuestionAnswerIdentifierTypealiases, andResult/Result<T>.Concept: see IOrganizerEventFeedbackUIService for the audience-scoped read contract.
[Rubric §9, API & Contract Design].Member File:Line Differs from the event twin GetAllAnswersAsync(sessionId, ct)IOrganizerFeedbackUIService.cs:29-31scoped by SessionIdentifierType; returnsSessionQuestionAnswerDTODeleteAnswerAsync(sessionId, answerId, ct)IOrganizerFeedbackUIService.cs:33-36parent id is the session Where it's used: implemented by OrganizerSessionFeedbackService (
OrganizerFeedbackService.cs:56-91), registered scoped atMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:42, and injected into OrganizerSessionFeedback (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Feedback/OrganizerSessionFeedback.razor.cs:20).
SpeakerFormModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerFormModel.cs:25· Level 3 · class (abstract)
- What it is: the speaker equivalent of
ActivityFormModel: the eleven editable speaker fields with their rules, shared by the organizer create page and the detail page's inline editor. - Depends on:
System.ComponentModel.DataAnnotations(:1),SpeakerDTOfor every length constant (:2), andAbsoluteUrlAttributeplusOptionalEmailAttributefromMMCA.Common.UI.Validation(:3,62,75,80,85). - Concept introduced, the framework validation attributes alongside the BCL ones. The shared-model pattern is the one
ActivityFormModelalready taught; what is new here is the mix of rule sources on one model.[OptionalEmail](:62) is the framework's email rule (MMCA.Common/Source/Presentation/MMCA.Common.UI/Validation/OptionalEmailAttribute.cs:26): blank values pass, and a non-blank value must match the API's own FluentValidation shape (one@, neither first nor last), so the form and the server give the same verdict and a cleared field is not an error.[MaxLength](:43, and eight more) quotes a DTO constant, and[AbsoluteUrl](:75,80,85) is the framework's own attribute applied to the three social URLs, so "http://..." style input is rejected in the browser with the same mechanism and the same resource-key error style as everything else.[Rubric §24, Forms, Validation & UX Safety]and[Rubric §26, Front-End Security](assesses that user-supplied URLs are constrained before they are rendered as links). TheBioproperty is the instructive exception (:52-55): it carries no rule at all, and the doc explains why. The biography is stored unbounded, so the character cap the markup applies is a UI affordance rather than an invariant, and inventing a rule here would make the form stricter than the aggregate. It still lives on the model because both forms bind it.[Rubric §4, Domain-Driven Design]: a UI rule is not promoted to an invariant just because it is convenient. - Walkthrough
- Resource-key constants (
:32,39):FirstNameRequiredKeyandLastNameRequiredKey, quoted by the model rule and by the field'sRequiredErroraffordance alike. - Required identity fields (
:42-49):FirstNameandLastName, each required and capped. - Optional profile fields (
:52-72):Bio(unruled),TagLine,Email(format plus cap),ProfilePicture,TwitterHandle. - Social URLs (
:75-87):LinkedInUrl,GitHubUrl,WebsiteUrl, each[AbsoluteUrl]plus a cap.
- Resource-key constants (
- Why it's built this way: the same argument as the activity model, with one addition. A speaker record is edited from three different places in this application (the organizer create page, the organizer detail page, and the speaker's own dashboard), so having a single declaration of the rules is what keeps the first two identical; see the caveat on
SpeakerDashboardfor the third. - Where it's used: subclassed by
SpeakerCreateModelandSpeakerEditModel; bound through the sharedSpeakerFormFieldscomponent bySpeakerCreate(SpeakerCreate.razor:24) andSpeakerDetail(SpeakerDetail.razor:35).
SpeakerProfileEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerProfileEditModel.cs:18· Level 3 · class (sealed)
- What it is: the form model behind the speaker's self-service profile editor on
SpeakerDashboard(BR-214). It carries the six fields a speaker may edit, with the same rules the organizer form applies to them, plus the three operations the page needs: load from the profile, build the update, and detect an unsaved change (class doc,MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerProfileEditModel.cs:7-17). - Depends on:
System.ComponentModel.DataAnnotations(:1);SpeakerDTO(:2) for every length constant and as the load and update shape;AbsoluteUrlAttributefromMMCA.Common.UI.Validation(:3, applied at:32,37,42). Its resource-key messages are resolved by the page'sDataAnnotationsModelValidator(doc,:13-14). - Concept introduced, a narrower twin of the shared form model. The rules are the ones
SpeakerFormModelalready declares, and the doc says so (:8-11): the caps come fromSpeakerDTOconstants and the three links carry the absolute-URL rule. The class is not a subclass of that model, because the speaker edits six fields, not eleven: it has no members for the name, email or profile picture, so the dashboard editor cannot bind them.[MaxLength(SpeakerDTO.XMaxLength, ErrorMessage = "Error.XMaxLength")]capsTagLine(:24),TwitterHandle(:28) and the three URLs (:33,38,43);[AbsoluteUrl(ErrorMessage = "Error.AbsoluteUrl")]sits onLinkedInUrl,GitHubUrlandWebsiteUrl(:32,37,42). EveryErrorMessageis a resource key, not prose (ADR-027): the page builds its validator with its own localizer (SpeakerDashboard.razor.cs:95).Bio(:20-21) carries no rule for the reason the doc gives (:14-15): the biography is stored unbounded, so the markup's cap is a UI affordance only.[Rubric §24, Forms, Validation & UX Safety](assesses whether a form refuses bad input before submit and names the field): a malformed URL is refused on the client instead of only by the API (:11).[Rubric §26, Front-End Security](assesses that user-supplied URLs are constrained before they are rendered as links): the three social links are the public speaker page's outbound links.[Rubric §14, Testability](assesses whether logic can be exercised without heavy infrastructure): the class has no component base and no injected service, andSpeakerProfileEditModelTestsin the Conference UI test project covers it without a renderer. - Walkthrough
- Properties (
:20-44):Bio,TagLine,TwitterHandle,LinkedInUrl,GitHubUrl,WebsiteUrl, all nullable strings. LoadFrom(SpeakerDTO)(:48-58): null-guards (:50), then copies the six editable values off the loaded profile (:52-57).ToUpdated(SpeakerDTO)(:67-80): returnsspeaker with { ... }(:71-79), overriding only the six edited values. The doc (:60-64) names what that preserves: every field this form does not edit, including the Top Speaker flag and the row version, round-trips. This is the samewithshapeSpeakerEditModeluses for the organizer editor.DiffersFrom(SpeakerDTO)(:88-95): true when any of the six fields differs from the loaded profile, through the private staticDiffers(:97-98), which compares ordinally after mapping null to empty, so a field cleared back to empty matches a value that was never set (doc,:82-85).
- Properties (
- Why it's built this way: holding the editor's fields, the update and the dirty check in a model gives the dashboard editor the organizer form's caps and URL rule through the same DataAnnotations path, keeps the code-behind to wiring, and makes the update and dirty logic testable in isolation.
- Where it's used:
SpeakerDashboardholds one readonly instance (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDashboard.razor.cs:69), wraps it in one validation delegate throughModelValidation.For(:95), seeds it inStartEditingProfileAsync(:257), readsDiffersFromfor the unsaved-changes signal (:271) and postsToUpdated(:295). The markup binds it as theMudFormmodel (SpeakerDashboard.razor:42), with each of the six fields carryingForand the sharedValidationdelegate (SpeakerDashboard.razor:44-62). - Caveats / not-in-source: the rules are declared twice, here and on
SpeakerFormModel; nothing in either file ties the two declarations together, so a changed cap or URL rule on one must be mirrored by hand on the other. The markup still applies MudBlazorMaxLength/CounterfromSpeakerDTOconstants on every field,Bioincluded (SpeakerDashboard.razor:45).
OrganizerEventFeedbackService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/OrganizerFeedbackService.cs:14· Level 5 · class (sealed)
- What it is: an authenticated HTTP service that reads and deletes event feedback answers on
behalf of an organizer, who sees all answers (
OrganizerFeedbackService.cs:14-51). It implements IOrganizerEventFeedbackUIService. - Depends on: AuthenticatedServiceBase
(its base, supplying the two
SendRequestAsyncdispatch overloads atMMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:171(with a body) and:201(without), which wrap the authenticated client, the shared static PollyRetryPolicy(:41), HttpResultExecutor and ProblemDetailsResultReader), ITokenStorageService (the bearer-token source), PagedReadAll (the read-every-page loop,MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:18), PagedCollectionResult<T> (the paged envelope) and EventQuestionAnswerDTO. BCLIHttpClientFactory,System.Globalization(OrganizerFeedbackService.cs:1-6). - Concept introduced, the authenticated organizer read-service over a token-carrying HttpClient.
[Rubric §18, UI Architecture]and[Rubric §11, Security]assess how UI calls attach auth and handle failures. The class derives from AuthenticatedServiceBase through a primary constructor that forwardsIHttpClientFactoryand ITokenStorageService to the base (OrganizerFeedbackService.cs:14-16); every request goes through the base'sSendRequestAsync(:27,:47), which creates the bearer-carrying client itself (AuthenticatedServiceBase.cs:184,212), so the JWT is attached centrally rather than per call and the service hands over only a lambda that issues the HTTP verb. The doc comment (OrganizerFeedbackService.cs:10-13) records the authorization intent: organizers see all answers because the server-side specification is null for organizer users, so this client simply requests the full answer set and does no filtering of its own. Note the direction of trust: the client is not the thing granting the wide view, the server is. Thefilters[...]query grammar it uses (:31) is the same dynamic-filter contract the Conference REST controllers expose (ADR-034), so the client needs no bespoke endpoint for a one-off filter. - Walkthrough
Endpoint(OrganizerFeedbackService.cs:18): theprivate const string "eventquestionanswers"resource root.GetAllAnswersAsync(eventId, ct)(:20-38): hands a per-page delegate to PagedReadAll.ReadAllAsync(:26), which calls it for pages 1, 2, ... until a page comes back empty or the accumulated count reaches the server's reported total, stopping after 40 pages regardless (PagedReadAll.cs:33,53-88). The in-code comment (:24-25) names the reason: a single request would stop silently at the API's page-size clamp and the organizer report would aggregate a truncated answer set. Each page callsSendRequestAsync<PagedCollectionResult<EventQuestionAnswerDTO>>(:27) with a lambda that receives the client, builds{Endpoint}/paged?filters[EventId].operator=equals&filters[EventId].value={eventId}&pageNumber={pageNumber}&pageSize={PagedReadAll.PageSize}&sortColumn=Id&sortDirection=asc&includeChildren=falsewithstring.Create(CultureInfo.InvariantCulture, ...)(:30-31, culture-invariant so the id renders stably;PageSizeis 500 atPagedReadAll.cs:21, and the stableIdascending sort keeps consecutive pages from skipping or repeating a row), and returns only the GET task (:32). The base runs that lambda underRetryPolicy.ExecuteAsyncinsideHttpResultExecutor.ExecuteAsyncand reads the response throughProblemDetailsResultReader.ReadAsync<T>(AuthenticatedServiceBase.cs:179-188). The accumulated list is thenMapped toIReadOnlyList<EventQuestionAnswerDTO>(:37); the first failed page short-circuits the loop and its failure comes back unchanged (PagedReadAll.cs:78-82). The nesting order is the point: the reader turns any response into a Result, the executor turns the absence of a response into one, the retry policy sits inside both, and the paging loop sits outside all three.DeleteAnswerAsync(eventId, answerId, ct)(:40-50): builds{Endpoint}/{answerId}?eventId={eventId}(:45, the event id is a required query argument, mirroring the parent-scoped delete shape of IRoomUIService), and issues the DELETE through the base's body-lessSendRequestAsync(:47-49), which reads the valueless response throughProblemDetailsResultReader.ReadAsync(AuthenticatedServiceBase.cs:201-216). It returns a bareResult: success is "the server accepted the delete", and a domain refusal comes back as a typed failure, not an exception. The method is a plainTask<Result>passthrough, notasync(:40,:47): it returns the base's task directly because nothing runs after the await.
- Why it's built this way: inheriting the authenticated base means token attachment, the Polly
retry and the Result conversion live in one shared dispatch method, and the service owns only the URL
shapes, the HTTP verb and the organizer-sees-all read. Delegating the page loop to the shared
PagedReadAll keeps the organizer feedback grid
simple (it still receives one complete list) without inheriting the silent truncation a single
oversized request would suffer: per its remarks, the API clamps any requested page size to its own
maximum (
PagedReadAll.cs:11-17). - Where it's used: registered explicitly as
IOrganizerEventFeedbackUIService under a comment naming BR-53
moderation
(
MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:40-41) and injected into OrganizerEventFeedback (Pages/Feedback/OrganizerEventFeedback.razor.cs:20). Its structural twin OrganizerSessionFeedbackService shares the same file (OrganizerFeedbackService.cs:56) and differs only in resource root, filter key and delete scope. It is covered byOrganizerEventFeedbackServiceTestsin the Conference UI test project. - Caveats / not-in-source: the read is bounded by
PagedReadAll's runaway guard of 40 pages of 500 rows, 20,000 answers (PagedReadAll.cs:21-33); past that the loop stops. An event with more answers than that would still be truncated, and nothing in this class reports it. The server-side maximum page size is configured elsewhere (ApplicationSettings.MaxPageSize, per the remarks atPagedReadAll.cs:13), so whether a deployment lowers it below 500 is not determinable from this file.
OrganizerSessionFeedbackService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/OrganizerFeedbackService.cs:56· Level 5 · class (sealed)
What it is: the organizer-side read-and-moderate service for session feedback. It fetches every answer captured against one session and deletes an individual answer. It is the structural twin of
OrganizerEventFeedbackServicein the same file, keyed onSessionIdand thesessionquestionanswersresource (OrganizerFeedbackService.cs:56-93), and it implementsIOrganizerSessionFeedbackUIService.Depends on:
AuthenticatedServiceBaseas its base (OrganizerFeedbackService.cs:58), for its twoSendRequestAsyncdispatch overloads (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:171,201), which create the authenticated client and apply the shared static PollyRetryPolicy;PagedReadAllfor the read-every-page loop;HttpResultExecutorandProblemDetailsResultReader, reached through that base method, for the two halves of the Result conversion;PagedCollectionResult<T>as the paged envelope;SessionQuestionAnswerDTOas the row shape;ITokenStorageServicethrough the base; theSessionIdentifierType/SessionQuestionAnswerIdentifierTypealiases; BCLIHttpClientFactoryandCultureInfo.InvariantCulture.Concept introduced, the two-half Result conversion in a hand-rolled HTTP service. This class does not extend the CRUD base, yet it still needs what
EntityServiceBase<TEntityDTO, TIdentifierType>gives its leaves: every possible outcome turned into aResultinstead of an exception. It gets that from the authenticated base'sSendRequestAsync, which wraps each call (AuthenticatedServiceBase.cs:179-188,209-216). Two collaborators split the job inside it, and both are required for the signature to be honest.ProblemDetailsResultReaderconverts a response: it reads the API's ProblemDetails body and preserves the server's ownErrorType, so a refusal from the moderation policy arrives as a typed failure the page can render.HttpResultExecutorconverts the absence of one: a refused connection, a DNS failure, a dropped socket, a client-side timeout, each mapped to a transport or timeout failure (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/HttpResultExecutor.cs:38,41,127-136). Caller cancellation is deliberately excluded and rethrows (HttpResultExecutor.cs:69-72), because a page owns its own cancellation (a disposed component, a superseded fetch) and must not have it reported back as an error to render.[Rubric §29, Resilience, Reliability & Business Continuity](assesses whether error handling is a factored concern rather than per-call-site improvisation; here it is two reusable helpers wrapped around each call).[Rubric §24, Forms/Validation/UX Safety](assesses whether the user is shown a meaningful, safe message; the reader's typed error is what the feedback page renders instead of a raw exception).Sibling family: the file holds two services with the same shape at different resource roots, which is why they share a file.
Type File:Line Notes (what differs) OrganizerEventFeedbackServiceMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/OrganizerFeedbackService.cs:14eventquestionanswersroot (:18); filters onEventId(:31); delete scoped?eventId=(:45)OrganizerSessionFeedbackServiceMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Feedback/OrganizerFeedbackService.cs:56sessionquestionanswersroot (:60); filters onSessionId(:73); delete scoped?sessionId=(:87)Walkthrough
private const string Endpoint = "sessionquestionanswers"(OrganizerFeedbackService.cs:60): the resource root, held as a constant rather than passed to a base constructor, because there is no CRUD base to pass it to.GetAllAnswersAsync(sessionId, ct)(OrganizerFeedbackService.cs:62-80) hands a per-page delegate toPagedReadAll.ReadAllAsync(:68), which keeps requesting pages until one is empty or the server's reported total is reached (the comment at:66-67names the truncation it prevents). Each page callsSendRequestAsync<PagedCollectionResult<SessionQuestionAnswerDTO>>(:69) with a lambda that builds{Endpoint}/paged?filters[SessionId].operator=equals&filters[SessionId].value={sessionId}&pageNumber={pageNumber}&pageSize={PagedReadAll.PageSize}&sortColumn=Id&sortDirection=asc&includeChildren=falsewithstring.Create(CultureInfo.InvariantCulture, ...), so the id never formats under the user's locale (:72-73), and returns only the GET task (:74). The base supplies the bearer-carrying client, runs the GET through the inherited PollyRetryPolicyinsideHttpResultExecutor.ExecuteAsync, and reads the response into aResult<PagedCollectionResult<SessionQuestionAnswerDTO>>(AuthenticatedServiceBase.cs:179-188). The loop accumulates each page's items, and the method maps the accumulated list to theIReadOnlyList<SessionQuestionAnswerDTO>the page wants (:79). The filter goes to the server, not to memory: the organizer's grid never pulls the whole answer table.DeleteAnswerAsync(sessionId, answerId, ct)(OrganizerFeedbackService.cs:82-92) builds{Endpoint}/{answerId}?sessionId={sessionId}(:87) and DELETEs it through the base's body-lessSendRequestAsync(:89-91), returning the valuelessResultthe reader produces (AuthenticatedServiceBase.cs:214). The parentsessionIdis not decoration: the API removes a child row by loading the owning aggregate, so a delete sent without it addresses nothing. Like its twin it is a plainTask<Result>passthrough, notasync(:82,:89): the base's task is returned directly.
Why it's built this way: two small parallel classes are cheaper to read than one generic service parameterized over "the parent key", and each one's URL shape stays literal and greppable. The class extends the authenticated base rather than the CRUD base because moderation is a two-verb surface, not an entity surface: there is no add, no update, and no lookup projection.
Where it's used: registered explicitly (it is not an
IEntityService<,>implementation, so the assembly scan does not see it) asIOrganizerSessionFeedbackUIServiceatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:42, under the comment naming BR-53 moderation (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:40), and injected intoOrganizerSessionFeedback(Pages/Feedback/OrganizerSessionFeedback.razor.cs:20).Caveats / not-in-source: the read is no longer a single capped call, but it is still bounded:
PagedReadAllstops after 40 pages of 500 rows (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:21-33), so a session with more than 20,000 captured answers would be truncated in the organizer grid, and nothing in this class detects that.
SpeakerUserSearch
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerUserSearch.cs:11· Level 4 · class (internal static)
- What it is: the candidate lookup behind the speaker-to-user link picker on
SpeakerDetail. Given typed text, it returns up to ten distinct users whose email, first name or last name contains it. - Depends on: the generic
IEntityService<TEntityDTO, TIdentifierType>closed overUserListDTO(:35), the standard pagedusersclient rather than a bespoke Identity lookup service, andResult<T>(:64,73). - Concept introduced, fanning out because the server ANDs. The remark on
FindAsync(:22-30) states the constraint plainly: the generic paged users endpoint (GET users/paged) combines its filter parameters with AND, so one call carrying email, first name and last name would return the empty intersection for any real search term. The method therefore issues three independent calls, each with ONEcontainsfilter onEmail,FirstNameorLastName(:47-49,64-71), awaits them together, and unions the answers.[Rubric §9, API & Contract Design](assesses whether a client can express its intent in the contract it is given): this is a client-side workaround for a server contract with no OR, and writing it down beside the code is what keeps the next reader from "simplifying" it back into one broken call. The failure policy is the second idea.ItemsOf(:73-74) turns a failedResultinto an empty list, so a lookup that fails contributes nothing and the picker offers whatever the other two returned; a cancellation returns an empty list outright (:59-62). No snackbar is raised, because an error surfaced inside an autocomplete popover while a user is still typing is noise, not information.[Rubric §29, Resilience & Business Continuity](assesses partial-failure behavior) and[Rubric §24, Forms, Validation & UX Safety]. Also worth noting is what this file's existence buys: the class doc (:8-11, above the type) says it is kept beside the page rather than inside the code-behind so the page holds only its own edit and link state. It has no component base, no injected service of its own, and takes its collaborator as a parameter, which makes it directly unit-testable without a renderer.[Rubric §14, Testability]. - Walkthrough
MaxSuggestions = 10(:15, nowinternal constso tests can reach it), applied twice over: as thepageSizeof each of the three calls (:68) and as the finalTake(:57), so neither one lookup nor the union can flood the popover.FindAsync(:35-75): returns empty for blank input (:40-43); starts the three tasks without awaiting each in turn (:47-49) via the localFindByAsync(field)(:64-71, page 1, no sort) and joins them withTask.WhenAll(:51), so the three round trips overlap; concatenates, thenDistinctBy(u => u.Id)(:56) because a person matching on two fields must appear once.ItemsOf(:73-74) is astaticlocal function, which is the pattern the analyzer baseline pushes toward: no closure over the enclosing method's state.
- Why it's built this way: linking a speaker record to a login is a rare organizer action against a large user set, so the search has to be forgiving about which field the organizer remembers while staying one interaction, not three.
- Where it's used: called only by
SpeakerDetail'sSearchUsersAsync(SpeakerDetail.razor.cs:294-295), which is bound to theMudAutocomplete'sSearchFunc(SpeakerDetail.razor:146-148).
SpeakerCreateModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerCreateModel.cs:10· Level 5 · class (sealed)
- What it is: the organizer create page's binding target, adding only the mapping onto the
SpeakerDTOit posts. - Depends on:
SpeakerFormModel(:10) andSpeakerDTO(:1). - Concept introduced: none new beyond
SpeakerFormModel, but one detail is worth contrasting.ToNewmints the identity client-side withId = Guid.NewGuid()(:20), whereActivityCreateModelsendsId = defaultand lets the server assign an int. That is the identifier-alias strategy of ADR-048 showing through: a GUID-keyed aggregate can be named before it is stored, an int-keyed one cannot.[Rubric §8, Data Architecture]. - Walkthrough:
ToNew()(:17-32) is the only member. It composesFullNamefrom the two entered parts (:23), which keeps the denormalized display name in step with the fields the organizer actually typed, and copies the remaining nine optional fields straight across. - Why it's built this way: the create page collects exactly the shared field set and nothing else, so the subclass is a mapping and not a second declaration of the form.
- Where it's used:
SpeakerCreateholds one instance (SpeakerCreate.razor.cs:37) and postsToNew()(SpeakerCreate.razor.cs:46).
SpeakerEditModel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerEditModel.cs:11· Level 5 · class (sealed)
- What it is: the edit buffer for the inline speaker editor on the organizer detail page: the shared fields plus load-from-record and build-the-update.
- Depends on:
SpeakerFormModel(:11) andSpeakerDTO(:1). - Concept introduced: the typed edit buffer, as
ActivityEditModeldescribes it. The speaker variant builds its update as awithexpression over the loaded record, so it preserves every field it does not edit rather than a hand-picked list. - Walkthrough
LoadFrom(SpeakerDTO)(:18-32): null-guards, then copies the ten editable values off the displayed speaker. The doc frames the value plainly (:13-16): opening the editor becomes one call rather than ten assignments on the page.ToUpdated(SpeakerDTO)(:41-58): returnsspeaker with { ... }(:45), overriding only the ten edited values plus the recomposedFullName(:49). Everything else on the loaded record round-trips untouched, and the doc names what that covers (:34-38): the identity, theRowVersionconcurrency token (ADR-035), the linked user, and fields this form does not show, such as the Top Speaker flag. Linking and unlinking is its own action on the detail page (seeSpeakerDetail), soLinkedUserIdcannot be bound here and cannot be lost.[Rubric §24, Forms, Validation & UX Safety].
- Why it's built this way: an edit form that silently drops a field it does not display is the failure this shape removes. A fresh DTO that copies named fields resets any field added later and not listed; the
withexpression inverts the default, so a new field onSpeakerDTOis preserved unless this model chooses to edit it. - Where it's used:
SpeakerDetailholds one instance (SpeakerDetail.razor.cs:63), seeds it inStartEditing(SpeakerDetail.razor.cs:202) and postsToUpdatedfromSaveChangesAsync(SpeakerDetail.razor.cs:236).
SpeakerQr
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerQr.razor.cs:24· Level 6 · class (Blazor code-behind)
- What it is: the speaker-facing side of their own QR code. It renders one full-screen code that points at the speaker's PUBLIC profile page, for holding up at the podium or parking on a booth screen (class doc,
SpeakerQr.razor.cs:10-13). - Depends on:
IPublicLinkBuilder(:26),ISpeakerUIService(:27),ClaimNames(:56),ConferenceRoutePaths'sPublicSpeakerDetails(id)route factory (:62, defined atMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:52). Externals: the cascadingTask<AuthenticationState>(:29-30), MudBlazor'sBreadcrumbItemandIcons(:32,40), and theIStringLocalizer<SpeakerQr>injected by the template (SpeakerQr.razor:4). The code image itself is the sharedQrCodeImagecomponent fromMMCA.Common.UI, configured in markup (SpeakerQr.razor:26-30). - Concept introduced, the payload that needs no fetch and the absolute-URL payload rule. Two ideas keep this one of the smallest complete pages in the group.
- The payload needs no backend call; only the label does. The speaker's identity comes from the
speaker_idJWT claim, read through the sharedClaimNames.SpeakerIdconstant (:56, defined atMMCA.ADC/Source/Modules/Identity/MMCA.ADC.Identity.Shared/Authorization/ClaimNames.cs:25) rather than a string literal, and the payload string is composed locally (:62), so the code itself depends on nothing but the cascading auth state. The class doc states the consequence (:15-17): the code renders on the SSR prerender pass as readily as on the interactive pass, which avoids the loading-state and double-fetch problem that pages such asSpeakerDashboardhave to solve. The single read is the name beside the code: after the payload is set,SpeakerService.GetByIdAsync(speakerId, false, CancellationToken.None)(:66) fetches the linked speaker, and a non-blankFullNamereplaces the account name (:67-70). The code comment (:64-65) gives the reason: the code opens the speaker profile, so the name beside it is that profile's, and the two differ whenever an organizer linked an account to a speaker record. The class doc adds why the read can succeed on a non-public profile: the speaker service's self-read carve-out (:17-19). A failed read is not an error path; the account name set earlier (:54) simply stays.[Rubric §23, Front-End Performance & Rendering](assesses network work per view): the payload is still the fetch that does not exist, and only the human-readable label costs a call. - The payload must be an absolute public URL.
LinkBuilder.BuildAbsolute(...)(:62) is not decoration. A relative path, or the origin the MAUI head's WebView serves from, would encode into a code that resolves for nobody outside that device (class doc,:20-21). Building the link through the shared builder is what keeps one page correct on the web head and on the native head at once.[Rubric §26, Front-End Security](assesses that client-composed links point where they claim to) and[Rubric §22, Responsive & Cross-Browser](the same component ships to two very different hosts). The name rendered beside the code (:54,70, markup atSpeakerQr.razor:32) is deliberate too: the in-code comment says a person scanning should be able to see whose profile they are about to open before they open it (:51-53).[Rubric §21, Accessibility]: the image also carries a localizedAltText(SpeakerQr.razor:27), because a QR code is opaque to a screen reader by construction.
- The payload needs no backend call; only the label does. The speaker's identity comes from the
- Walkthrough
- State (
:32-34): three fields only, the breadcrumb list, the nullable_payload, and_displayName. OnInitializedAsync(:36-71): builds the two-crumb trail (:38-42), returns early when no auth state is cascaded (:44-47), seeds the display name fromstate.User.Identity?.Name(:54), then looks for theClaimNames.SpeakerIdclaim and returns unless it parses as aGuid(:56-60). Only on that path is_payloadassigned (:62), followed by the profile read that upgrades_displayNameto the speaker's full name (:66-70).- The null-payload branch is the page's entire error handling: the markup renders an informational alert instead of a card (
SpeakerQr.razor:11-18), with an in-markup comment noting that the nav item is claim-gated but a bookmarked or typed URL still lands here without the claim.[Rubric §24, Forms, Validation & UX Safety]: an unreachable state gets a sentence, not an empty screen. - The code's own rendering parameters are argued in markup (
SpeakerQr.razor:24-25):PixelsPerModule="14"so the code stays readable from a few steps away, andErrorCorrection="QrErrorCorrectionLevel.Medium"so glare on a phone camera does not kill the scan.
- State (
- Why it's built this way: the public speaker page already carries the same code for whoever is reading it (class doc,
:10-11); this page exists so the speaker can present that code rather than have to be found first. Deriving everything from the claim means the page cannot show one speaker's code to another. - Where it's used: the
/speaker/qrroute, gated by a bare[Authorize](SpeakerQr.razor:1-2), so any signed-in user reaches the page and only the claim decides whether a code appears. It links to the same public routePublicSpeakerDetailserves.
SpeakerCreate
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerCreate.razor.cs:13· Level 6 · class (Blazor code-behind)
- What it is: the speaker-creation form for organizers and content editors (class doc,
SpeakerCreate.razor.cs:9-12). It binds oneSpeakerCreateModel, validates it, posts oneSpeakerDTO, and redirects to the detail page for the record it just made. - Depends on: inherits
CreatePageBasethrough the template's@inherits(SpeakerCreate.razor:8), which suppliesToast,Form,IsSaving,IsDirty,SaveResult,MarkDirty()andSubmitAsync(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreatePageBase.cs:21-110). It injectsISpeakerUIService(:15) and usesSpeakerCreateModel(:37),ModelValidationandDataAnnotationsModelValidator(:33),CreateSubmitOptions(:52), andConferenceRoutePaths(:28,50,54). Externals:NavigationManager(:16), MudBlazor'sMudForm,BreadcrumbItemandIcons, and theIStringLocalizer<SpeakerCreate>from the template (SpeakerCreate.razor:7). The markup mounts the sharedUnsavedChangesGuard,SpeakerFormFieldsandErrorSummarycomponents (SpeakerCreate.razor:12,26,37). - Concept introduced, the model-validated create page. The create shape itself (validate, post, snackbar, redirect) is taught by the smaller create pages in this group. What this page adds is the bridge between DataAnnotations and MudBlazor; the submit plumbing comes from the shared base class.
- One validation delegate for the whole form.
OnInitializedbuilds_validate = ModelValidation.For(_model, new DataAnnotationsModelValidator(L))(:33, field at:41) and the shared field block hands that singleFunc<object, string, IEnumerable<string>>to every control (SpeakerCreate.razor:26). MudBlazor calls it with the model instance and the member path, and the model's own attributes decide the outcome, so no rule is written twice (in-code comment,:39-40). The localizer passed into the validator is what turns the resource keys onSpeakerFormModelinto sentences, per ADR-027 (comment,:32).[Rubric §24, Forms, Validation & UX Safety]and[Rubric §27, Internationalization]. - Validate before you mutate, in the base.
CreateSpeakerAsync(:45-52) is one expression: it handsSubmitAsyncthe service callct => SpeakerService.AddAsync(_model.ToNew(), ct)(:46), the success step (:47-51), andnew CreateSubmitOptions { Localizer = L }(:52). The rest isCreatePageBase's: it ignores a submit with no bound form or one already saving (CreatePageBase.cs:61-64), clearsSaveResult, awaitsForm.ValidateAsync()and returns with a warning toast on an invalid form before any service call (CreatePageBase.cs:67-73), then setsIsSaving(CreatePageBase.cs:82) and runs the save with the page token (CreatePageBase.cs:85). The page binds the form with@ref="Form"(SpeakerCreate.razor:25). The server validates again; the client pass keeps a round trip off the wire and puts the message beside the field. - An inline error result alongside the toast. On failure the base keeps the
ResultinSaveResult(CreatePageBase.cs:94) and, becauseToastOnFailuredefaults to true (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CreateSubmitOptions.cs:20), callsresult.NotifyOnFailure(Toast, options.Localizer)(CreatePageBase.cs:97) with the page's localizer. The page feedsSaveResultto itsErrorSummary(SpeakerCreate.razor:37), so the message reaches both the snackbar and the inline summary and survives a snackbar timing out while the organizer is still reading the form (in-code comment,:43-44). - A dirty flag that cannot block its own redirect. Every field change calls the base's
MarkDirty()(CreatePageBase.cs:39, wired atSpeakerCreate.razor:27), the guard readsIsDirtythrough an accessor (SpeakerCreate.razor:12), and on success the base clears the dirty flag before it calls the page's success step (CreatePageBase.cs:89-90), so the navigation in that step is never blocked by the guard.[Rubric §25, Navigation & Information Architecture]. - Cancel on disposal, read through a safe token. The page declares no token source and no
Dispose: the token comes fromCancellablePageBase, the base ofCreatePageBase, whose page-scopedCancellationTokenSourceis cancelled and then disposed in theDispose(bool)pattern (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/CancellablePageBase.cs:16,41-55). ItsPageToken(CancellablePageBase.cs:27) forwards to theLifetimeToken()extension fromComponentLifetimeExtensions, which returns an already-cancelled token instead of throwingObjectDisposedExceptiononce the source is gone, so a save that resumes after the user navigated away stops through the ordinaryOperationCanceledExceptionpath.SubmitAsynccatches that exception and returnsfalseas the expected teardown or InteractiveAuto transition outcome (CreatePageBase.cs:102-105, see ADR-056).
- One validation delegate for the whole form.
- Walkthrough
OnInitialized(:22-34): the three-crumb trail (Home, Speakers, Create) with the last crumb disabled (:25-30), then the validation delegate (:33).CreateSpeakerAsync(:45-52): delegates toSubmitAsync; the page's own success step snackbarsSnackbar.Createdand routes toConferenceRoutePaths.SpeakerDetails(created.Id)(:49-50) using the id read back from the response. The base'sfinallyalways clearsIsSaving(CreatePageBase.cs:106-109), so a failed save leaves an enabled button rather than a stuck spinner (button state atSpeakerCreate.razor:42-43).NavigateToList(:54) is the cancel action, and it goes through the route constants rather than a literal.
- Why it's built this way: pushing the rules onto the shared model and the submit pipeline onto the shared base leaves the page holding only what is genuinely page-level: the breadcrumb trail, the service call, the success step, and the navigation.
- Where it's used: the
/speakers/createroute, gated byHasPagePermissionAttributewithConferencePermissions.SpeakersManage(SpeakerCreate.razor:1-2), reached fromSpeakerList's create button (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerList.razor.cs:82) and redirecting toSpeakerDetail.
SpeakerCategoryItemsPanel
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerCategoryItemsPanel.razor.cs:18· Level 6 · class (Blazor code-behind)
- What it is: the "Additional Info" panel of the organizer speaker detail page. It renders a speaker's category items grouped by category as removable chips, and offers the not-yet-assigned items in an add picker.
- Depends on:
ISpeakerCategoryItemUIService(:20),IToastService(:21),SpeakerDTOandSpeakerCategoryItemDTO(:3,24,49),CategoryItemInfo(:27,59), theLifetimeToken()extension fromComponentLifetimeExtensions(:40), and theCategoryItemIdentifierType,ConferenceCategoryIdentifierTypeandSpeakerCategoryItemIdentifierTypealiases. - Concept introduced, the container/presentational split with a partial ownership boundary. The panel is presentational about data and self-sufficient about actions, and the class doc names the division exactly (
:9-15).- The page owns and reloads the speaker, and owns both lookups; all three arrive as
[Parameter]s (:24,27,30), and the panel never fetches them. - The panel calls the child-entity service itself (
:77,:98) and then raises theChangedcallback (:33,86,106), whose handler on the page isLoadAsync(SpeakerDetail.razor:172). So the mutation is local, but the refresh is the page's, and the page stays the single source of truth for what is on screen.[Rubric §18, UI Architecture & Component Design](assesses decomposition and where responsibility sits) and[Rubric §19, State Management & Data Flow]. - It owns its own
CancellationTokenSource(:35) and its ownIDisposableimplementation (:114-136), because it makes its own calls. A child component that awaits must cancel on its own disposal; inheriting the parent's token would tie its lifetime to the wrong component. Both service calls read the token through a privateLifetimeTokenproperty (:40) rather than_cts.Token: the source is cancelled and then disposed, and readingTokenoff a disposed source throws, whereas theLifetimeToken()extension (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ComponentLifetimeExtensions.cs:26) hands back an already-cancelled token, so a late handler stops through itsOperationCanceledExceptionpath. The lookups are passed asIReadOnlyDictionary(:27,30) rather than lists, so both label helpers are O(1) and both fall back to the raw id when a lookup is missing (:43-47), which is the same never-render-blank rule the other detail pages follow.[Rubric §24, Forms, Validation & UX Safety].
- The page owns and reloads the speaker, and owns both lookups; all three arrive as
- Walkthrough
GetCategoryTitle/GetCategoryItemName(:43-47): dictionary lookups with an invariant-culture id fallback.GetCategoryItemsGroupedByCategory(:49-57): returns empty until the lookup arrives, then filters the speaker's items to those the lookup knows and groups them by their category id, which is what produces the per-category chip rows (SpeakerCategoryItemsPanel.razor:8-20).GetAvailableCategoryItems(:59-66): builds aHashSetof the already-assigned item ids and offers the complement, so the picker cannot propose a duplicate.AddCategoryItemAsync(:68-92): no-ops without a selection (:70-73), callsAddAsync(Speaker.Id, id, LifetimeToken)(:77), reports failure through a localized error toast and returns (:78-82), otherwise clears the selection, toasts success, and awaitsChanged(:84-86).RemoveCategoryItemAsync(:94-112): the same shape overDeleteAsyncwith the sameLifetimeToken(:98), bound to each chip'sOnClose(SpeakerCategoryItemsPanel.razor:15).- Both handlers swallow
OperationCanceledExceptionas expected disposal (:88-91,:108-111).
- Why it's built this way: the chip panel was extracted from the detail page so that page holds only its own edit and link state. Keeping the add/remove calls inside the panel while leaving the reload to the parent preserves the pre-split behavior exactly (class doc,
:13-15) without giving the child a second copy of the speaker. - Where it's used: rendered once by
SpeakerDetail(SpeakerDetail.razor:169-172), fedSpeaker,_lookups?.CategoryItemsand_lookups?.CategoryTitles, withChangedbound straight to the page'sLoadAsync. It is not routable and carries no@pagedirective.
SpeakerDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDetail.razor.cs:23· Level 6 · class (Blazor code-behind)
- What it is: the organizer's speaker console. It loads one speaker with children by route id, inline-edits the profile, shows the answered questions and the speaker's sessions, hosts the category-item panel, links or unlinks a login, and deletes with confirmation.
- Depends on:
ISpeakerUIService,ISessionUIService,ISpeakerDetailLookupServicereturningSpeakerDetailLookups, and the genericIEntityService<TEntityDTO, TIdentifierType>closed overUserListDTOasUserService(:27-30);IToastService(:32);SpeakerEditModel(:63),CommittedWriteReload(:66),SpeakerUserSearch(:294-295),ModelValidationandDataAnnotationsModelValidator(:54),ErrorMessages(:229), andConferenceRoutePaths(:49,:347). The routeIdis a typed[Parameter] SpeakerIdentifierType(:34). It extendsDetailPageBase(SpeakerDetail.razor:10), which suppliesPageToken,IsEditing,IsDirty,MarkDirty,BeginEdit,EndEdit, the sharedLoadGuard, theDetailLoadStateLoadStatewith itsBeginLoad/CompleteLoadpair, and the disposal pattern. Externals: MudBlazor'sMudForm,MudAutocompleteandBreadcrumbItem, the framework'sDetailLoadStateContentcomponent the markup renders for every state butLoaded(SpeakerDetail.razor:20-25), plus theIStringLocalizer<SpeakerDetail>from the template. - Concept introduced, the load-generation guard and the load state, both carried by the base page. Every detail page in this group guards against a re-render refetching (
OnParametersSetAsynccompares the typedIdagainst_loadedId,:78-87). The guard itself lives onDetailPageBase: itsLoadGuardproperty is aLatestLoadGuard(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:34).LoadAsyncopens withvar (token, generation) = BeginLoad()(:92), which supersedes the load already in flight through that guard, putsLoadStateback toLoading, and hands back the token to pass into every fetch (DetailPageBase.cs:48-52). The speaker fetch's outcome goes throughCompleteLoad(generation, speakerResult)(:103), which changes nothing for a superseded generation and otherwise recordsLoaded,NotFoundorFailed(DetailPageBase.cs:67-84); the later awaited steps re-checkLoadGuard.IsCurrent(generation)before touching page state (:122,:165). The generation, not the route id, is authoritative because_loadedIdis stamped synchronously before the await, so two rapid route changes would otherwise let a later-completing fetch of the older speaker paint over the newer one. Because the base owns the load state, the page keeps noIsLoadingflag of its own: the markup readsLoadStateand rendersDetailLoadStateContentfor a missing or failed speaker, with Retry wired toLoadAsync(SpeakerDetail.razor:20-25), so a not-found or failed route load raises no toast (comment,:101-102). A second guard concerns stale view state across route ids:LoadAsyncempties_speakerSessionsright afterBeginLoad()(:95), because the list belongs to the previous speaker until this load replaces it, and a failed speaker fetch whose generation is still current setsSpeaker = null(:107-110), because the edit and delete actions are bound toSpeakerand must not stay live against the previous record under the new id.[Rubric §19, State Management & Data Flow](assesses reconciliation of concurrent updates to view state) and[Rubric §12, Performance & Scalability](the cheap fix is to serialize the loads, which would be slower and still wrong). Keeping the guard and the load state on the base meansSessionDetailand the module's other detail pages share the identical mechanism instead of each carrying its own counter and spinner flag. Three further mechanisms sit alongside it.- Server-side filtering instead of client-side filtering.
LoadSpeakerSessionsAsync(:149-177) sends aSpeakerIdequals filter (:151-154) withincludeChildren: false(:162) andsortColumn: "StartsAt"(:160), capped atMaxSpeakerSessions = 100(:37), threading the same load token through ascancellationToken(:163). The remark records what it replaced (:141-148): the page used to pull the entire session catalog with all child collections and filter it in memory onSessionSpeakers, purely so it could match.[Rubric §12, Performance & Scalability](assesses whether work happens where the data lives). - One composite lookup, cached for the page. The three display lookups arrive in a single
LookupService.GetAllAsync(token)call (:121), and only when_lookups is null(:119-131), so re-enteringLoadAsyncafter a link or unlink does not refetch them. A failed lookup is reported and stops the load (:127).[Rubric §23, Front-End Performance & Rendering]. - A committed save whose reload failed.
SaveChangesAsyncre-reads the speaker after the update succeeds (:244), and the comment states the rule (:243): the update committed, so the edit ends even when that reload fails. The reload is handed toCommittedWriteReload'sTryAdopt(:245): on success the page adopts the fresh record, with its newRowVersion, and showsSnackbar.Updated; on failure the helper marks the page stale and shows the localizedSnackbar.SavedRefreshFailedwarning instead of reporting the save as failed (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/CommittedWriteReload.cs:31-42).EndEdit()runs either way (:251). The stale mark is consumed byEnsureCurrentSpeakerAsync(:205-215): before the next edit opens it returns the shown speaker unchanged unless the page is stale, in which case it re-reads it (:208,CommittedWriteReload.cs:55-76), so the form and the next save carry the row version the server holds rather than one it would refuse as a concurrency conflict. A failed re-read is reported and the editor stays closed.[Rubric §24, Forms, Validation & UX Safety]and[Rubric §29, Resilience & Business Continuity]. Result handling is uniform outside the route load: every failure goes throughNotifyOnFailure(Toast, L)(:127,172,239,280), which is the framework's one-line "report whatever went wrong, localized" path, and link and unlink show their own fixed localized failure messages (:309,:334).
- Server-side filtering instead of client-side filtering.
- Walkthrough
OnInitialized(:43-55): breadcrumbs plus the shared validation delegate over_model(:54).OnParametersSetAsync(:78-87, a non-async method that returnsLoadAsync()directly) thenLoadAsync(:89-139): begin the load (:92), clear the previous speaker's sessions (:95), fetch with children using the typedIdas is (:99), record the outcome and nullSpeakeron a current failed load (:103-110), fetch the lookups once (:119-131), then the sessions with the sameId(:133).- Edit cycle:
StartEditingAsync(:182-198) asksEnsureCurrentSpeakerAsyncfor the record to edit (a fresh read only when the page is stale), seedsSpeakerEditModelfrom it (:191) and calls the base'sBeginEdit()(:192);CancelEditing(:217) is one call toEndEdit(), which clears the dirty flag the unsaved-changes guard reads (SpeakerDetail.razor:15).SaveChangesAsync(:219-261) validates the form (an invalid form showsErrorMessages.ValidationError,:229), posts_model.ToUpdated(Speaker)(:236), then re-fetches the speaker (:244) through the committed-save handling above, so the page shows the server's version, including the newRowVersionfor the next edit. DeleteSpeakerAsync(:263-291): confirms through the sharedDeleteConfirmationdialog seeded with the speaker's full name (:270) and returns unless it answerstrue.ShowAsyncis a plainTask<bool>that istrueonly on confirm andfalseon cancel or dismiss (MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:23-24), so a dismissed dialog is not a delete.- Link and unlink (
:294-345):SearchUsersAsyncdelegates toSpeakerUserSearch, passing the injectedUserService(:294-295);OnUserPickedAsync(:297-320) postsLinkUserAsyncwith the picked user'sId(:306) and reloads (:314);UnlinkUserAsync(:322-345) is the mirror (:339). Both reload throughLoadAsyncrather than patching local state, which is exactly why the guard matters: a link followed quickly by an unlink starts two loads. GetQuestionText(:179-180) resolves an answered question's text from the cached lookups with an id fallback.
- Why it's built this way: this page is the widest read surface in the organizer area, so it composes four services rather than growing one. Delegating the chip panel to
SpeakerCategoryItemsPanel, the candidate search toSpeakerUserSearch, the field rules toSpeakerFormModel, the stale-after-save rule toCommittedWriteReload, and the edit lifecycle, load guard and load state toDetailPageBaseis what keeps the code-behind at load, save, delete and link.[Rubric §15, Best Practices & Code Quality]. - Where it's used: the
/speakers/{Id:guid}route, restricted toRoleNames.Organizer(SpeakerDetail.razor:1-2), reached fromSpeakerListrows and fromSpeakerCreate's success redirect. Session rows link straight toSessionDetailthrough aMudLinkbuilt in the markup fromConferenceRoutePaths.SessionDetails(session.Id)(SpeakerDetail.razor:210); there is no code-behind navigation method for it. It edits the aggregate theSpeakerentity models.
SpeakerDashboard
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerDashboard.razor.cs:27· Level 9 · class (Blazor code-behind)
- What it is: the signed-in speaker's own console. It shows their profile with an inline editor, the sessions they present at the current or next event, the bookmark count per session, and their per-session feedback on demand (class doc,
:19-26). - Depends on:
ISpeakerUIService(:29),ISpeakerDashboardUIService(:30),IEventLookupService(:31),AuthenticationStateProvider(:32),IToastService(:33),TimeProvider(:34),LatestLoadGuard(:45),DetailLoadState(:51),SpeakerProfileEditModel(:69),ModelValidationandDataAnnotationsModelValidator(:95),ErrorMessages(:285),CommittedWriteReload(:78),SpeakerDTO(:53),SessionDTO,SessionFeedbackDTO(:57-63),CurrentEventSelectorwithEventInfo(:228-242), theLifetimeToken()extension fromComponentLifetimeExtensions(:41), the framework'sDetailLoadStateContentcomponent in the markup (SpeakerDashboard.razor:22-27), and theIStringLocalizer<SpeakerDashboard>from the template. - Concept introduced, the claim-scoped self-service page. Five mechanisms distinguish this from the organizer pages in this unit.
- Identity comes from the token, not the route. There is no
[Parameter]id: the speaker is read from thespeaker_idclaim through the sharedClaimNames.SpeakerIdconstant (:123-131, defined atMMCA.ADC/Source/Modules/Identity/MMCA.ADC.Identity.Shared/Authorization/ClaimNames.cs:25), and a missing or unparseable claim sets_hasSpeakerId = falsewith the load stateLoaded(:128-129), which renders one informational alert (SpeakerDashboard.razor:16-20). The server enforces the same scope; the claim just decides what this page asks for.[Rubric §11, Security](assesses that a self-service view derives its subject from the authenticated principal, ADR-004) and[Rubric §26, Front-End Security]. - Skip the loads on the prerender pass.
OnInitializedAsyncreturnsRendererInfo.IsInteractive ? LoadAsync() : Task.CompletedTask(:100), with the comment recording exactly what that saves: the profile, the sessions and the per-session bookmark counts used to run twice per visit, once for SSR prerender and once for the interactive instance (:97-99). The prerender pass shows the loading skeleton instead.[Rubric §23, Front-End Performance & Rendering]and ADR-056. - One batched count call.
GetSessionBookmarkCountsAsync(_speakerId, sessionIds, token)(:218) returns every count from one grouped query; the comment records that each count was previously its own cross-service hop, HTTP to Conference to gRPC to Engagement (:211-213). The result is best effort: a failure is ignored with no snackbar so the dashboard still renders (:216-217), and the counts are applied only when the call succeeded and its load is still current (:219).[Rubric §12, Performance & Scalability]and[Rubric §29, Resilience & Business Continuity]. - Its own load guard and load state, because it has no route. The page is not a
DetailPageBase, so it carries a privateLatestLoadGuard _load(:45), which the comment says supersedes a load still in flight when Retry starts another (:43-44), and aDetailLoadState _loadState(:51) that keeps a missing profile and a profile that could not be fetched as separate body states (:49-50).LoadAsync(:107-168) is both the initial load and the Retry action (doc,:103-106): it begins the guard (:109), resets the state toLoading(:110), and returns without touching page state if a newer load has started by the time the authentication state (:116, read once per load: theBL0013suppression at:115records that signing out or switching account navigates away, so the instance never outlives the identity it read) or the profile (:138) arrives. A failed profile fetch recordsNotFoundorFailed(:146) and raises no toast; the markup rendersDetailLoadStateContentfor any state butLoaded, with Retry wired toLoadAsync(SpeakerDashboard.razor:22-27). The sessions are a secondary load,LoadSessionsAsync(:174-226): the profile is already on screen, so a failed session read keeps itsSnackbar.LoadFailedtoast (:187, doc:170-173), and each of its awaits re-checks the generation (:180,:196,:219).[Rubric §19, State Management & Data Flow]. - Handlers read a safe lifetime token. The page's
_cts(:36) is cancelled and then disposed (:379-380), and readingTokenoff a disposed source throwsObjectDisposedException. A privateLifetimeTokenproperty (:41) forwards to theLifetimeToken()extension (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/ComponentLifetimeExtensions.cs:26), which returns an already-cancelled token once the source is cancelled, disposed or null, so a call that resumes after the user navigated away stops through itsOperationCanceledExceptionpath instead of throwing. The user-driven calls pass it: the edit-time re-read (:251), the update (:297), the post-save reload (:308) and feedback (:345). The load path passes the guard's token instead (:138,:179,:195,:218), andDisposedisposes the guard as well (:378). A smaller mechanism is the unsaved-changes signal. A privateIsDirtyproperty (:84) forwards toHasUnsavedProfileEdits()(:270-271), which is true only while the editor is open andSpeakerProfileEditModel.DiffersFrom(Speaker)reports a changed field; that method compares ordinally and treats null and empty as equal, so clearing a never-set field is not an edit. The check lives in a method because a property reading_isEditingProfiledirectly trips IDE0032 (comment at:268-269). Closing the editor, by save or cancel, clears the flag.[Rubric §24, Forms, Validation & UX Safety]. The profile editor validates on the client before it posts (G21-16, comment:280-281). The six fields live on a readonlySpeakerProfileEditModel(:69), which carries the organizer form's caps and absolute-URL rule (comment:68).OnInitializedAsyncwraps it once in a singleFunc<object, string, IEnumerable<string>>delegate throughModelValidation.For(_profile, new DataAnnotationsModelValidator(L))(:95), whose localizer resolves the model's resource-key messages (comment:94, ADR-027); every field in the markup passes that delegate as its MudBlazorValidation(field:73, comment:71-72;SpeakerDashboard.razor:44-62).SaveProfileAsyncreturns early when there is no profile or no form (:275-278), awaits_form.ValidateAsync()(:282), and on an invalid form showsToast.Warning(ErrorMessages.ValidationError)and posts nothing (:283-287), so a malformed URL is named on its field instead of coming back as an API refusal.[Rubric §24, Forms, Validation & UX Safety]. The profile editor also follows the committed-save ruleSpeakerDetailuses. After the update succeeds,SaveProfileAsyncre-reads the profile (:308) and hands the result toCommittedWriteReload'sTryAdopt(:309): a successful reload is adopted and showsSnackbar.ProfileUpdated, a failed one marks the page stale and showsSnackbar.SavedRefreshFailed, and the editor closes either way (comment:307,:315). The nextStartEditingProfileAsyncthen opens on a fresh read throughEnsureCurrentAsyncwhen the page is stale (:251, comment:248-249), so its fields and the row version the save posts come from what the server holds.[Rubric §29, Resilience & Business Continuity]. The read scope is worth stating explicitly, because the class doc does (:23-25): a speaker is not a privileged reader, so the server returns only publicly visible sessions (accepted-or-unset), which means a submission still under review does not appear here. The empty-state copy names that.[Rubric §11, Security]. Reads go throughISpeakerDashboardUIServicerather than the shared sessions service on purpose: the comment at:176-178records that the dashboard path bypasses the shared sessions output cache, so a just-made speaker assignment shows immediately instead of lagging behind a cached public list.
- Identity comes from the token, not the route. There is no
- Walkthrough
- State (
:45-84): the load guard and load state, the claim flag and id, the full session list and the event-narrowed one, the current event name, and four collections keyed by session id,_bookmarkCounts,_sessionFeedback,_expandedSessionsand_feedbackLoading, plus the editing and saving flags (:66-67), the_profilemodel (:69), the_validateProfiledelegate (:73), theMudFormreference (:74), the_writeReloadtracker (:78) and the derivedIsDirty(:84). OnInitializedAsync(:86-101): breadcrumbs, the validation delegate (:95), then the interactivity gate.LoadAsync(:107-168): the guard, the claim read, the profile load, thenLoadSessionsAsync(:153). The outercatch (Exception)(:160-167) is explained in the justification of itsCA1031suppression (:159): the authentication state provider is the one collaborator that still reports failure by throwing, so it lands here and setsFailed(for the current generation only,:163-166), while everything else returns aResult.LoadSessionsAsync(:174-226): the session load through the dashboard service (:179) ordered byStartsAt(:191), the current-event narrowing (:195-209), and the batched counts (:218-225).ResolveCurrentEventAsync(:228-242): takes the load's token, is non-critical by design (comment,:230), and returns null on a failed lookup, so the page then shows all of the speaker's sessions rather than none. "Now" is the injectedTimeProvider.GetUtcNow().UtcDateTime(:241), not the static clock.- Profile edit (
:244-325):StartEditingProfileAsyncseeds the model from the current record with_profile.LoadFrom(current)(:257);CancelEditingProfile(:266) just closes the editor, which also clearsIsDirty;SaveProfileAsync(:273) validates first (above), then builds the update with_profile.ToUpdated(Speaker)(:295), awithexpression over the loaded record that overrides only the six edited fields (SpeakerProfileEditModel.cs:71-79), so the identity,RowVersionand every field the speaker may not edit round-trip unchanged. The comment (:292-294) names the case this protects: the Top Speaker flag is preserved, so an organizer who is also the linked speaker does not reset it by saving a bio. It then posts (:297). A failed update does not always show the fixed message: the comment (:300-302) says a refusal the API stated (an invalid social URL, say) shows the API's own localized message, and only an unexpected fault (a 500, a transport failure, a timeout) falls back toSnackbar.ProfileUpdateFailed; the call isupdateResult.ActionErrorMessage(L, L["Snackbar.ProfileUpdateFailed"].Value)(:303, ADR-027 Decision 9 carve-out). It then re-fetches (:308) and leaves edit mode (:315). This is the samewithshapeSpeakerEditModeluses for the organizer editor. ToggleFeedbackAsync(:327-365): theHashSet.Addreturn value doubles as the toggle (:329-333), an already-cached session returns immediately (:335-338), and the fetch sets a per-session loading flag with an explicitStateHasChanged()(:340-341) because the spinner has to appear before the await. A not-found is treated as "no feedback captured yet" and left to the panel's empty state rather than reported (:350-355).[Rubric §23, Front-End Performance & Rendering]: feedback is fetched per session on first expand, never for the whole list.
- State (
- Why it's built this way: the dashboard is the one page a speaker sees on conference day, so it favors rendering something useful over rendering everything: a failed count load, a failed event lookup, or missing feedback each degrade to a smaller view rather than an error page, and a failed profile fetch is a retryable page state rather than a dead end.
- Where it's used: the
/speaker/dashboardroute with a bare[Authorize](SpeakerDashboard.razor:1-2); the claim, not the role, decides what it can show. It reads the same aggregateSpeakerDetailedits. - Caveats / not-in-source: the profile editor here does not use
SpeakerFormModel. It bindsSpeakerProfileEditModel, which declares the same caps and absolute-URL rule a second time for its six fields, so the organizer forms and this third editing surface agree by duplicated declaration rather than by sharing one. The markup also keeps MudBlazorMaxLength/Counteraffordances fromSpeakerDTOconstants on every field (SpeakerDashboard.razor:44-62).
SpeakerList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Speakers/SpeakerList.razor.cs:18· Level 10 · class (Blazor code-behind)
- What it is: the organizer and content-editor browse page for speakers (class doc,
:12-17): server-side paging with a full-name search and avatars, an event filter, a mobile card layout, and delete-with-confirmation. - Depends on: extends
EventFilteredListPageBase<TDto>closed overSpeakerDTO(:18), and injectsISpeakerUIService(:23). The markup is oneListPageShell<TItem>held in_shell(:26,SpeakerList.razor:10-17), which owns the grid, theMobileInfiniteScrollList<TItem>card list and the delete dialog; the page exposes the first two to the base throughGridRefandMobileListRef(:27-28). It also usesListPageActions(:73),ErrorMessages(:79),ConferenceRoutePaths(:82-83), andResult<T>(:51,:66). - Concept introduced, the virtual filter key. Structurally this is
ActivityList: the same overrides over the same base and the same delegation of delete toListPageActions. Neither fetch waits for the event load itself any more: both go through base helpers that await the base'sOnBeforeFetchAsync, whichEventFilteredListPageBase<TDto>overrides toWaitForEventsAsync()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:213), soApplyFiltersalways reads a resolved event (comment,:49-50). One thing genuinely differs from activities, and it is the interesting part.ApplyEventFilter(:62) addsfilters["EventId"]exactly as it does for activities, but aSpeakerhas noEventIdcolumn: a speaker relates to an event through the EventSpeaker and SessionSpeaker joins. SoEventIdhere is a virtual filter key. The paged speakers endpoint intercepts it, removes it from the filter dictionary before the generic filter pipeline ever sees it, and resolves the scope through those joins instead (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Speakers/SpeakersController.cs:129-131,159-166). The client-side contract is therefore identical for both entities while the server-side resolution is not.[Rubric §9, API & Contract Design](assesses whether a query contract can express a client's intent without leaking the storage shape) and[Rubric §8, Data Architecture]: the join stays server-side, where the indexes are, instead of becoming a two-step client fetch. The class doc records this in one sentence at the top of the page (:13-16), which matters: a reader who assumesEventIdis a column would look for it on the DTO and find nothing. - Walkthrough
SavePageFilters/RestorePageFilters(:32-36): persist and restore the search term only.ReloadActiveLayoutAsync(:38-39) andReloadForEventFilterAsync(:41): one reload path for both layouts, through the base'sReloadActiveLayoutAsync(_shell?.MobileList), which saves the filters and resets the card list on a phone and otherwise reloads the grid (MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:1879-1888).OnSearchChanged(:43-47) stores the term and reloads.FetchSpeakersAsync(:51-53): the one fetch both layouts use, a thin call toSpeakerService.GetPagedAsync.LoadServerData(:55-56) passes it to the base'sLoadServerDataAsyncwithApplyFilters(:58-63): the search term as acontainsfilter onFullName(:61), the denormalized display name, then the event filter.FetchMobilePage(:66-67): built by the base'sMobilePageFetcher(FetchSpeakersAsync, ApplyFilters, "FullName"), which applies the same filters, awaitsOnBeforeFetchAsync, and sorts byFullNameascending (the default direction,DataGridListPageBase.cs:1101-1133), because a speaker roster reads alphabetically where a programme reads chronologically (compareActivityList).DeleteSpeakerAsync(:72-80): confirm through the shell'sDeleteDialog(:74), delete, toast, reload, all through the shared helper, seeded with the speaker's full name.- The inline error state's Retry needs no page method: the shell receives
LoadFailed(SpeakerList.razor:16) and, with noOnRetrydelegate bound, its retry reloads the grid's server data (MMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Lists/ListPageShell.razor.cs:143-144,171-175).NavigateToCreate/NavigateToDetails(:82-83) use the route constants.
- Why it's built this way: the organizer wants "the speakers at this conference", not "the speakers whose row carries this id". Expressing that as an ordinary filter key keeps the page identical to every other event-filtered list, and the one place that knows it is not an ordinary column is the endpoint that can resolve it cheaply.
- Where it's used: the
/speakersroute, gated byHasPagePermissionAttributewithConferencePermissions.SpeakersManage(SpeakerList.razor:1-2), linking on toSpeakerCreateandSpeakerDetail. Its public counterpart isPublicSpeakerList, which applies the same virtual key with a locked scope.
IPartnerUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Partners/IPartnerUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
partnersREST resource (a conference's sponsoring and exhibiting organizations). It is an empty marker interface,public interface IPartnerUIService : IEntityService<PartnerDTO, PartnerIdentifierType>(IPartnerUIService.cs:9-11), that adds no members of its own. - Depends on: IEntityService<TEntityDTO, TIdentifierType>
(the shared CRUD contract) and
PartnerDTO(the transported shape, fromMMCA.ADC.Conference.Shared.Partners).PartnerIdentifierTypeis the module id alias. - Concept: the same per-entity marker UI-service interface as
IActivityUIService; see that section for the rubric analysis of interface
segregation and the Scrutor assembly-scan registration
[Rubric §18, UI Architecture],[Rubric §1, SOLID]. - Walkthrough: no members. The whole contract is "be an
IEntityServicebound toPartnerDTOplusPartnerIdentifierType, under a name pages can inject." - Why it's built this way: a named per-entity interface, rather than injecting the open generic directly, keeps the assembly scan's registration unambiguous and gives Partners its own name to depend on even though every member is inherited.
- Where it's used: implemented by PartnerService; injected into
PartnerCreate (
Pages/Partners/PartnerCreate.razor.cs:20), PartnerDetail (Pages/Partners/PartnerDetail.razor.cs:23), and PartnerList (Pages/Partners/PartnerList.razor.cs:24). Cited by ADR-094 as an example of the generic client-side entity data-access pattern.
IQuestionUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Questions/IQuestionUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
questionsresource, an empty marker over IEntityService<TEntityDTO, TIdentifierType> bound to QuestionDTO (IQuestionUIService.cs:9-11). - Depends on: IEntityService<TEntityDTO, TIdentifierType> and QuestionDTO.
- Concept: the same marker shape as IActivityUIService.
[Rubric §18, UI Architecture]. - Walkthrough: no members (doc comment
IQuestionUIService.cs:6-8). - Where it's used: implemented by QuestionService; injected into the question
list, detail and create pages (
Pages/Questions/QuestionList.razor.cs:31,Pages/Questions/QuestionDetail.razor.cs:18,Pages/Questions/QuestionCreate.razor.cs:11), into both organizer feedback pages, which need the question text to label the answers (Pages/Feedback/OrganizerEventFeedback.razor.cs:21,Pages/Feedback/OrganizerSessionFeedback.razor.cs:21), extended by the paged whole-set readQuestionUIServiceExtensions.GetAllForEntityAsync(Services/Questions/QuestionUIServiceExtensions.cs:20-21) that both feedback pages call (Pages/Feedback/OrganizerEventFeedback.razor.cs:88,Pages/Feedback/OrganizerSessionFeedback.razor.cs:85), and composed as the third load inside SpeakerDetailLookupService (Services/Speakers/SpeakerDetailLookupService.cs:16,26).
IRoomUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Rooms/IRoomUIService.cs:10· Level 4 · interface
- What it is: the UI-service contract for the
roomsresource. It extends the generic CRUD surface with a specialized delete that also carries the owning event id, plus a read and a rotate for the room's organizer-only check-in code (IRoomUIService.cs:10-20). - Depends on: IEntityService<TEntityDTO, TIdentifierType>
bound to RoomDTO and
RoomCheckInCodeDTO, both from the
MMCA.ADC.Conference.Shared.Roomsnamespace (IRoomUIService.cs:1), Result (IRoomUIService.cs:2), and theRoomIdentifierType/EventIdentifierTypealiases. - Concept:
[Rubric §9, API & Contract Design]assesses whether client contracts carry the parameters the server actually requires. A room is scoped to an event, so its delete needs theEventIdentifierTypethe WebAPI endpoint expects; the genericDeleteAsync(id)would omit it. The doc comment (IRoomUIService.cs:12) states the added overload "passes the required event ID to the API". This is the UI-side counterpart of the parent-scoped delete the join services and the organizer feedback services use. The same rule shapes the check-in-code pair: the read takes only the room id, while the rotate (a write) also takes the event id (IRoomUIService.cs:16,19). - Walkthrough: three added members.
DeleteAsync(RoomIdentifierType roomId, EventIdentifierType eventId, CancellationToken)(IRoomUIService.cs:13), returningTask<Result>. It supplements, rather than replaces, the inherited single-argument delete: both overloads are visible on the interface, so an accidental call to the id-only one still compiles, and the server is what rejects it.GetCheckInCodeAsync(roomId, ct)(IRoomUIService.cs:16), returningTask<Result<RoomCheckInCodeDTO>>; its doc comment (:15) says it is organizer only and that the code is null when none has been issued yet.RotateCheckInCodeAsync(roomId, eventId, ct)(IRoomUIService.cs:19), returningTask<Result<RoomCheckInCodeDTO>>; its doc comment (:18) says it issues a new code and that the previously printed QR stops working. The pair maps onto the GET and POST{id}/check-in-codeendpoints of RoomCheckInCodesController (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/RoomCheckInCodesController.cs:37,61).
- Where it's used: implemented by RoomService; injected into
RoomList (
Pages/Rooms/RoomList.razor.cs:17), RoomDetail (Pages/Rooms/RoomDetail.razor.cs:20, which reads the check-in code at:130and rotates it at:282), RoomCreate (Pages/Rooms/RoomCreate.razor.cs:12) and into the session pages that render the room a session is scheduled in (SessionCreatePages/Sessions/SessionCreate.razor.cs:22, SessionDetailPages/Sessions/SessionDetail.razor.cs:38, PublicSessionDetailPages/Public/Sessions/PublicSessionDetail.razor.cs:29), plus the shared SessionLookups helper (Pages/Sessions/SessionLookups.cs:35).
ISessionSelectionUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/Selection/ISessionSelectionUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the organizer's session-selection decision-support
dashboard: read the dashboard, and start a scoring pass over one event's sessions
(
ISessionSelectionUIService.cs:9-24). It is a bespoke (non-CRUD) interface: it does not extend IEntityService<TEntityDTO, TIdentifierType>, because decision support is a pair of computed operations, not an entity surface. - Depends on: SessionSelectionDashboardDTO
(the dashboard payload) and
ScoreEventSessionsResultDTO (the scoring
outcome), both from
MMCA.ADC.Conference.Shared.Sessions.DecisionSupport(ISessionSelectionUIService.cs:1); Result (ISessionSelectionUIService.cs:2); theEventIdentifierTypealias. - Concept introduced, the accepted-for-background-processing outcome expressed in one contract.
[Rubric §18, UI Architecture]assesses whether pages depend on narrow typed contracts instead of raw HTTP; the page sees two methods and never a URL.[Rubric §9, API & Contract Design]assesses interface segregation on the client side; decision support lives on its own contract rather than swelling ISessionUIService. The distinctive part is the documented semantics ofScoreSessionsAsync(ISessionSelectionUIService.cs:15-20): the endpoint only schedules the scoring pass and answers HTTP 202, which comes back as a success carrying theSessionsScored == -1sentinel. A duplicate trigger is deduplicated server-side rather than refused, so there is no "already running" failure to handle; the failure path is a 404 for an unknown event or for the scoring feature switched off. The distinction is written on the contract rather than left in the implementation, and it matches the controller, which checks the event before scheduling so an unknown id is not told 202 for work that would be refused (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Sessions/SessionSelectionController.cs:70-79,95,110).[Rubric §6, CQRS & Event-Driven]assesses read/write separation:GetDashboardAsyncis a pure query andScoreSessionsAsyncis a command with an asynchronous completion. - Walkthrough: two members, both scoped by
EventIdentifierType.GetDashboardAsync(eventId, ct)(ISessionSelectionUIService.cs:11-13): returnsTask<Result<SessionSelectionDashboardDTO>>.ScoreSessionsAsync(eventId, ct)(ISessionSelectionUIService.cs:21-23): returnsTask<Result<ScoreEventSessionsResultDTO>>with the 202/404 semantics above. The two map one to one onto two of the endpoints on SessionSelectionController: theGET dashboard/{eventId}read (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Sessions/SessionSelectionController.cs:41) and thePOST score/{eventId}command (SessionSelectionController.cs:83). The controller exposes three further analytical GETs (category distribution, speaker overlap, content similarity,:62,76,90) that this UI contract deliberately does not surface.
- Why it's built this way: keeping the analytical surface on its own interface matches its lifecycle, an organizer-only screen backed by dedicated controller endpoints, and lets the implementation extend AuthenticatedServiceBase rather than the CRUD base. Modelling the 202 as a success value rather than a separate method means the page needs no second endpoint and no polling contract on the service: polling is a rendering decision, and it lives beside the page.
- Where it's used: implemented by SessionSelectionService, registered
explicitly (
DependencyInjection.cs:45, explicit because it is not anIEntityService<,>and the assembly scan would not find it), injected into SessionSelectionDashboard (Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:18) and taken as a constructor argument by ScorePollSession (Pages/Sessions/Selection/ScorePollSession.cs:36), the fire-and-forget polling session whose own doc comment explains that it stays beside the page rather than moving onto this contract because every step it takes is a rendering decision (ScorePollSession.cs:30).
ISessionUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/ISessionUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
sessionsresource, an empty marker over IEntityService<TEntityDTO, TIdentifierType> bound to SessionDTO (ISessionUIService.cs:9-11). - Depends on: IEntityService<TEntityDTO, TIdentifierType> and SessionDTO.
- Concept: the same marker shape as IActivityUIService.
[Rubric §18, UI Architecture]. Worth pausing on what this contract does not carry: the personalized speaker-facing session reads live on a separate contract, ISpeakerDashboardUIService, because they must bypass the shared output cache. Keeping them apart is what lets this contract stay cache-friendly. - Walkthrough: no members (doc comment
ISessionUIService.cs:6-8). - Where it's used: implemented by SessionService; injected into the session list,
detail and create pages (
Pages/Session/SessionList.razor.cs:24,Pages/Session/SessionDetail.razor.cs:23,Pages/Session/SessionCreate.razor.cs:19), the public session and speaker pages (PublicSessionDetail:24, PublicSpeakerDetail:23), the organizer session-feedback page (Pages/Feedback/OrganizerSessionFeedback.razor.cs:20) and SpeakerDetail (Pages/Speaker/SpeakerDetail.razor.cs:28).
ISponsorUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sponsors/ISponsorUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
sponsorsREST resource, an empty marker over IEntityService<TEntityDTO, TIdentifierType> bound to SponsorDTO andSponsorIdentifierType(ISponsorUIService.cs:9-11). - Depends on: IEntityService<TEntityDTO, TIdentifierType>
and SponsorDTO (from
MMCA.ADC.Conference.Shared.Sponsors,ISponsorUIService.cs:1). - Concept: the marker shape taught under IActivityUIService; the doc comment
(
ISponsorUIService.cs:6-8) repeats the "uses generic CRUD" formula verbatim.[Rubric §15, Best Practices & Code Quality]is the point worth pausing on: the whole sponsor admin surface plus a public sponsor page costs exactly one empty interface and one tiny class (SponsorService), because the CRUD algorithm, the auth, the retry and the result translation are all inherited.[Rubric §18, UI Architecture]. - Walkthrough: no members.
- Why it's built this way: sponsor management is plain CRUD from the client's point of view, so the
contract adds nothing; the named marker exists so the assembly scan inside
AddUIModule<ConferenceUIModule>()can bind a concrete implementation to a name the pages inject (DependencyInjection.cs:30). - Where it's used: implemented by SponsorService; injected into
SponsorList (
Pages/Sponsor/SponsorList.razor.cs:23), SponsorDetail (Pages/Sponsor/SponsorDetail.razor.cs:22), SponsorCreate (Pages/Sponsor/SponsorCreate.razor.cs:19) and the anonymous PublicSponsorList (Pages/Public/PublicSponsorList.razor.cs:26).
IActivityUIService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Activities/IActivityUIService.cs:9· Level 4 · interface
- What it is: the UI-service contract for the
activitiesREST resource (the conference's social and networking programme). It is an empty marker interface,public interface IActivityUIService : IEntityService<ActivityDTO, ActivityIdentifierType>(IActivityUIService.cs:9-11), that adds no members of its own. - Depends on: IEntityService<TEntityDTO, TIdentifierType>
(the shared CRUD contract, imported from
MMCA.Common.UI.Common.InterfacesatIActivityUIService.cs:2) and ActivityDTO (the transported shape, fromMMCA.ADC.Conference.Shared.ActivitiesatIActivityUIService.cs:1).ActivityIdentifierTypeis the module id alias. - Concept introduced, the per-entity marker UI-service interface.
[Rubric §18, UI Architecture]assesses whether the front end talks to a typed service abstraction rather than a rawHttpClient; here every Blazor page injects an interface, never the concrete HTTP class.[Rubric §1, SOLID]assesses interface segregation at the injection point: the marker gives each aggregate its own name to depend on even though the shape is entirely inherited. The generic CRUD surface all comes from IEntityService<TEntityDTO, TIdentifierType>, whose seven members (GetAllAsync,GetPagedAsync,GetAllForLookupAsync,GetByIdAsync,AddAsync,UpdateAsync,DeleteAsync) every one return a Result: the same railway value the server produced, read back from its Problem Details response with the original ErrorType intact, so a page branches on an outcome instead of catching an exception (MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/Interfaces/IEntityService.cs:10-16,25-68). There is a second, load-bearing reason for the body-less specialization: registration is done by a Scrutor assembly scan, not by hand.AddUIModule<ConferenceUIModule>()scans the Conference UI assembly for everyIEntityService<,>implementation and registers it with a scoped lifetime (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:28-30), so the named marker is exactly what a page gets to inject. Every plain-CRUD sibling in this group repeats this shape. - Walkthrough: no members. The whole contract is "be an
IEntityServicebound toActivityDTOplusActivityIdentifierType, under a name pages can inject". The doc comment (IActivityUIService.cs:6-8) states plainly that it "uses generic CRUD". - Why it's built this way: a named per-entity interface (rather than injecting the open generic directly) keeps the scan's registration unambiguous, and it lets one entity later grow an extra method without disturbing the others, which is exactly what IEventUIService, IRoomUIService and ISpeakerUIService did.
- Where it's used: implemented by ActivityService; injected into the organizer
activity list, detail and create pages (
Pages/Activity/ActivityList.razor.cs:24,Pages/Activity/ActivityDetail.razor.cs:23,Pages/Activity/ActivityCreate.razor.cs:20) and into the anonymous PublicActivityList (Pages/Public/PublicActivityList.razor.cs:27). Note that the same contract serves both audiences: the client does not scope the data, the server does.
PartnerService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Partners·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Partners/PartnerService.cs:10· Level 5 · class (sealed)
- What it is: the concrete HTTP service for the
partnersresource, a body-less class that inherits every CRUD method from the shared base and supplies only the endpoint name (PartnerService.cs:10-14). It implements IPartnerUIService. - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>
as its base, ITokenStorageService,
PartnerDTO, and BCLIHttpClientFactory. - Concept: the same four-line concrete UI service as ActivityService: a primary
constructor forwards
IHttpClientFactoryand ITokenStorageService plus the literal resource name"partners"to EntityServiceBase<TEntityDTO, TIdentifierType> closed overPartnerDTOandPartnerIdentifierType(PartnerService.cs:10-14); the class body is empty. See ActivityService for the Template Method rubric analysis and the two base behaviors (the constantIdempotency-Keyon create, theIf-Matchconcurrency header on update) it inherits for free.[Rubric §2, Design Patterns],[Rubric §15, Best Practices and Code Quality]. - Walkthrough: no members. The whole class is the base call carrying the resource root
"partners"and the declaration that it satisfies IPartnerUIService (PartnerService.cs:11-13). - Why it's built this way: the endpoint name is the only thing that varies for a plain CRUD
aggregate, so the concrete class carries exactly that and nothing else.
sealed(PartnerService.cs:10) closes the leaf. - Where it's used: never named in DI by hand. Because it is an
IEntityService<,>implementation in the Conference UI assembly, the same Scrutor scan insideAddUIModule<ConferenceUIModule>()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:28-30) registers itAsImplementedInterfaces()with a scoped lifetime, which is what makes IPartnerUIService resolvable in PartnerCreate (Pages/Partners/PartnerCreate.razor.cs:20), PartnerDetail (Pages/Partners/PartnerDetail.razor.cs:23), and PartnerList (Pages/Partners/PartnerList.razor.cs:24).
QuestionService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Questions/QuestionService.cs:10· Level 5 · class (sealed)
- What it is: a body-less concrete CRUD service for the
questionsWebAPI resource. It extendsEntityServiceBase<TEntityDTO, TIdentifierType>overQuestionDTOandQuestionIdentifierType, passes the resource name to the base constructor, and implements the equally emptyIQuestionUIService, inheriting the entire CRUD implementation with no added code (QuestionService.cs:10-14). - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>;ITokenStorageService;QuestionDTO;IQuestionUIService; BCLIHttpClientFactory. - Concept: the thin-leaf CRUD service taught at
ActivityService, over a different resource.[Rubric §2, Design Patterns],[Rubric §15, Best Practices & Code Quality]. - Walkthrough: a primary-constructor class whose base call is the only content
(
QuestionService.cs:10-12):EntityServiceBase<QuestionDTO, QuestionIdentifierType>("questions", httpClientFactory, tokenStorageService), with an empty body (:13-14). - Why it's built this way: questions need nothing beyond CRUD in the UI, so an empty subclass is the
smallest concrete type that still gives DI a binding for
IQuestionUIServiceand keeps the resource name in exactly one place. - Where it's used: picked up automatically by the Scrutor scan inside
AddUIModule<ConferenceUIModule>()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30), so no explicitAddScopedline exists for it. Injected asIQuestionUIServiceintoQuestionList(Pages/Questions/QuestionList.razor.cs:31),QuestionDetail(Pages/Questions/QuestionDetail.razor.cs:18),QuestionCreate(Pages/Questions/QuestionCreate.razor.cs:11),OrganizerEventFeedback(Pages/Feedback/OrganizerEventFeedback.razor.cs:19) andOrganizerSessionFeedback(Pages/Feedback/OrganizerSessionFeedback.razor.cs:19), where the question text labels each captured answer.
RoomService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Rooms·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Rooms/RoomService.cs:13· Level 5 · class (sealed)
- What it is: the concrete Room CRUD service. It extends
EntityServiceBase<TEntityDTO, TIdentifierType>over"rooms"but overridesAddAsyncto reshape the create payload, adds the parent-scopedDeleteAsync(roomId, eventId)declared byIRoomUIService, and implements that contract's check-in-code read and rotate (RoomService.cs:13-64). - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>, itsEndpointproperty (EntityServiceBase.cs:42),SendGetAsync(EntityServiceBase.cs:248) and bothSendRequestAsyncoverloads (AuthenticatedServiceBase.cs:171,201);NewIdempotencyKey()inherited fromAuthenticatedServiceBase(MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:65);ITokenStorageService;RoomDTOandRoomCheckInCodeDTO(RoomService.cs:2);IRoomUIService;Result; theRoomIdentifierType/EventIdentifierTypealiases; BCLCultureInfo.InvariantCulture(RoomService.cs:1). - Concept: cross-reference the thin-leaf CRUD pattern at
ActivityServicefor the inherited half. Three things makeRoomServicemore than a four-liner.- It overrides the base's
virtual AddAsync(EntityServiceBase.cs:168) because the create endpoint's contract recordAddRoomRequestbinds a nullableRoomIdentifierType? RoomIdproperty, not the DTO'sId(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/RoomsController.cs:32,38, bound at:218and read at:224). The override therefore posts an anonymous body that remaps the DTO id intoRoomIdalongside the remaining room fields (RoomService.cs:27-39), sending a default id asnullso the handler allocates one instead of treating an explicit0as a client-chosen id (RoomService.cs:29-31), while still routing through the baseSendRequestAsyncso it keeps the Polly retry and the Result conversion. Like the baseAddAsync(EntityServiceBase.cs:177-180), it passesidempotencyKey: NewIdempotencyKey()(RoomService.cs:42); the comment atRoomService.cs:21-23gives the reason: the endpoint is[Idempotent](RoomsController.cs:216) and the server allocates the id, so without a key a create is never retried after a lost response and a manual retry lands a second room. The override is a plainTask-returning method that returns the base call's task directly rather than anasyncmethod that awaits it (RoomService.cs:17,24).[Rubric §9, API & Contract Design](assesses whether the client honors the server's request contract rather than assuming DTO/request symmetry). - It adds a parent-scoped delete, because a room is addressed under its event.
- It reaches the room's check-in-code sub-resource, served by
RoomCheckInCodesController(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/RoomCheckInCodesController.cs:37,61). The rotate endpoint is also[Idempotent](RoomCheckInCodesController.cs:62), so the rotate call carries a fresh key as well.
- It overrides the base's
- Walkthrough
AddAsync(dto, ct)override (RoomService.cs:17-43): guards a null DTO (:19), then returnsSendRequestAsync<RoomDTO>posting the anonymous object{ RoomId = dto.Id == default ? (RoomIdentifierType?)null : dto.Id, dto.EventId, dto.Name, dto.Sort, dto.Capacity, dto.Floor, dto.Location, dto.AccessibilityInfo }toEndpoint(:24-40), with a new idempotency key (:42).DeleteAsync(roomId, eventId, ct)(RoomService.cs:45-49): builds{Endpoint}/{roomId}?eventId={eventId}withstring.Create(CultureInfo.InvariantCulture, ...)so the ids format culture-stably (:48), and dispatches it through the valuelessSendRequestAsync(:46), returning theResultthe base produces.GetCheckInCodeAsync(roomId, ct)(RoomService.cs:51-54): aSendGetAsync<RoomCheckInCodeDTO>of{Endpoint}/{roomId}/check-in-code, built culture-invariantly (:53).RotateCheckInCodeAsync(roomId, eventId, ct)(RoomService.cs:56-63): a body-lessPostAsync(content: null,:60) to{Endpoint}/{roomId}/check-in-code?eventId={eventId}(:59) throughSendRequestAsync<RoomCheckInCodeDTO>, with a new idempotency key (:63).
- Why it's built this way: the create-payload remap keeps the UI honest about the server's
AddRoomRequestshape, the parent-scoped delete and rotate exist because rooms belong to an event and those endpoints bind the parent id as a query argument, and every write that the server marks[Idempotent]carries a key so a retry is replayed instead of re-executed. - Where it's used: registered by the
AddUIModule<ConferenceUIModule>()entity-service scan (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30) and injected asIRoomUIServiceintoRoomList(Pages/Rooms/RoomList.razor.cs:17),RoomDetail(Pages/Rooms/RoomDetail.razor.cs:20, which also reads and rotates the check-in code at:130,282),RoomCreate(Pages/Rooms/RoomCreate.razor.cs:12),SessionCreate(Pages/Sessions/SessionCreate.razor.cs:22),SessionDetail(Pages/Sessions/SessionDetail.razor.cs:38) andPublicSessionDetail(Pages/Public/Sessions/PublicSessionDetail.razor.cs:29) for room wayfinding, and taken as a parameter bySessionLookups(Pages/Sessions/SessionLookups.cs:35).
QuestionUIServiceExtensions
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Questions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Questions/QuestionUIServiceExtensions.cs:8· Level 5 · static class (extension methods)
- What it is: one extension method on
IQuestionUIService,GetAllForEntityAsync, that reads every question of one owning entity type (for example"Event"or"Session"), in display order, without silent truncation (QuestionUIServiceExtensions.cs:8-47). - Depends on:
IQuestionUIService(itsGetPagedAsyncread);PagedReadAllfor the paging loop;QuestionDTO,PagedCollectionResult<T>,PaginationMetadataandResult. No Blazor. - Concept: paging to exhaustion behind a bounded loop is taught at
PagedReadAll; this type is the question-specific adapter onto it. The doc comment states the reason in one line (QuestionUIServiceExtensions.cs:11-14): a single page read would truncate in silence because the API clamps the page size, and the shared pager fails withPagedReadAll.TruncatedCoderather than returning a partial list when its runaway guard stops the read.[Rubric §12, Performance & Scalability](assesses whether an unbounded read is actually bounded): the loop asks forPagedReadAll.PageSize = 500rows per request and stops after at most 40 pages (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/PagedReadAll.cs:21,33).[Rubric §19, State Management & Data Flow](assesses whether data reaches the screen complete or visibly failed): a page failure is passed through unchanged, and a read the guard stops is a namedPagedReadAll.Truncatedfailure rather than a short list (PagedReadAll.cs:79-82,98-104). - Walkthrough
GetAllForEntityAsync(this IQuestionUIService questions, string questionEntity, CancellationToken)(QuestionUIServiceExtensions.cs:20-46) guards the service argument (:25), then builds the single server filterQuestionEntity equals <questionEntity>with an ordinal comparer (:27-30).- It hands
PagedReadAll.ReadAllAsynca page-fetch lambda (:32-45) that callsGetPagedAsync(filters, pageNumber, PagedReadAll.PageSize, "Sort", "asc", ...)(:35-36), so questions come back in their display order rather than insertion order. GetPagedAsyncanswers a rows-plus-total pair, while the pager reads the total offPaginationMetadata, so the lambda adapts one to the other: on success it wrapsrows.Itemsin aPagedCollectionResult<T>whose metadata carriesrows.TotalItems(:38-42); on failure it forwardspage.Errors(:43).
- Why it's built this way: a feedback report is one of the few screens where a missing row is worse
than a slow load, and both organizer reports need the same notion of "all questions". Putting the
adapter on the service interface as an extension keeps that notion in one place, and delegating the
loop to the shared pager keeps the stop conditions identical to every other read-all in the UI. The
filter-as-operator-plus-value shape is the client data-access contract of
Website/docs-src/adr/094-client-entity-data-access.md: the caller never touchesHttpClient, only the typedI*UIService. - Where it's used:
OrganizerEventFeedback(Pages/Feedback/OrganizerEventFeedback.razor.cs:88, with"Event") andOrganizerSessionFeedback(Pages/Feedback/OrganizerSessionFeedback.razor.cs:85, with"Session").
SessionSelectionService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sessions.Selection·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/Selection/SessionSelectionService.cs:14· Level 5 · class (sealed)
- What it is: the HTTP service behind the organizer's session-selection decision-support dashboard.
It reads the dashboard projection for an event and starts an AI scoring run over that event's sessions
(
SessionSelectionService.cs:14-62). It extendsAuthenticatedServiceBaseand implementsISessionSelectionUIService. - Depends on:
AuthenticatedServiceBase;HttpResultExecutorandProblemDetailsResultReader;SessionSelectionDashboardDTOandScoreEventSessionsResultDTO;ITokenStorageService; theEventIdentifierTypealias; BCLSystem.Net.HttpStatusCode,IHttpClientFactoryandCultureInfo.InvariantCulture. - Concept introduced, retry follows replay safety (not the verb), and 202 is an answer. This class
shows that a POST can sit under the same retry policy as a GET once a replay is known to be harmless.
GetDashboardAsyncis a read and goes through the inheritedSendRequestAsync<T>helper (SessionSelectionService.cs:21-27), which creates the request client, runs the call inside the shared PollyRetryPolicyand reads the body (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/AuthenticatedServiceBase.cs:171-189).ScoreSessionsAsyncis a POST, and it also runs underRetryPolicy(SessionSelectionService.cs:45-47). The inline comment states why that is safe (SessionSelectionService.cs:35-41): the trigger only schedules the pass, and a replay is cheap and self-deduplicating because the pass takes a per-event claim and skips sessions already scored. The server endpoint records the same reasoning on its[NonIdempotent(...)]attribute (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Sessions/SessionSelectionController.cs:83-85). The client mints one idempotency key per click withNewIdempotencyKey()and builds the client withCreateRequestClientAsync(...)(SessionSelectionService.cs:42;AuthenticatedServiceBase.cs:65,232), which, per the comment, is what lets the policy resend a POST whose response was lost rather than only one that never left the client.[Rubric §29, Resilience & Business Continuity](assesses whether retry is applied only where the operation can safely be repeated): here the replay safety is argued on both sides of the wire rather than assumed from the HTTP verb. The second idea is the 202 Accepted path. Scoring runs in the background, so the endpoint can answer 202 with no body. A body-less 2xx would look like a failure toProblemDetailsResultReader, which is also why this method is built by hand onHttpResultExecutorrather than throughSendRequestAsync(comment atSessionSelectionService.cs:40-41). The status is checked before the reader is reached and answered with a sentinelScoreEventSessionsResultDTOcarryingSessionsScored = -1(SessionSelectionService.cs:49-56). That sentinel is not a magic number left for the reader to guess: the page turns it into a polling session rather than a finished-run report.[Rubric §9, API & Contract Design](assesses whether an asynchronous operation is represented honestly at the boundary rather than being made to look synchronous).
- Walkthrough
GetDashboardAsync(eventId, ct)(SessionSelectionService.cs:18-27): expression-bodied, it returns theSendRequestAsync<SessionSelectionDashboardDTO>task directly (:21). The lambda buildssessionselection/dashboard/{eventId}withstring.Create(CultureInfo.InvariantCulture, ...)(:24) and returns theGetAsynctask (:25); client creation, retry and body reading all live in the base helper.ScoreSessionsAsync(eventId, ct)(SessionSelectionService.cs:29-61): also expression-bodied, returning theHttpResultExecutor.ExecuteAsynctask (:32). Inside it creates a client carrying a fresh idempotency key (:42), buildssessionselection/score/{eventId}(:44), POSTs with no body through the retry policy (:45-47), takes the 202 short-circuit described above (:53-56), and otherwise reads the body withProblemDetailsResultReader.ReadAsync(:58-59).
- Why it's built this way: decision support is a projection plus a long-running job, neither of which
is CRUD, so the service sits on the authenticated base and spells out both calls. The read reuses the
base helper because nothing about it is special; the trigger is hand-built only because its 202 has no
body. Keeping the 202 branch inside the service means the page never sees an HTTP status code, only a
typed result it can branch on. The typed-service shape is the client data-access contract of
Website/docs-src/adr/094-client-entity-data-access.md. - Where it's used: registered explicitly as
ISessionSelectionUIServiceatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:45, and injected intoSessionSelectionDashboard(Pages/Sessions/Selection/SessionSelectionDashboard.razor.cs:18), which loads the projection at:152, starts a run at:217and branches on theSessionsScored == -1sentinel at:234.ScorePollSessionthen re-reads the dashboard while the run proceeds (Pages/Sessions/Selection/ScorePollSession.cs:74). Covered bySessionSelectionServiceTests(MMCA.ADC/Tests/Modules/Conference/MMCA.ADC.Conference.UI.Tests/Services/SessionSelectionServiceTests.cs). - Caveats / not-in-source: the retry behavior for a lost response depends on how the shared
RetryPolicytreats a request carrying an idempotency key, which lives inAuthenticatedServiceBase, not here. The-1sentinel is a convention between this service and its page; it is documented on the interface (ISessionSelectionUIService.cs:18), not on the DTO.
SessionService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sessions·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sessions/SessionService.cs:10· Level 5 · class (sealed)
- What it is: a body-less concrete CRUD service for the
sessionsWebAPI resource, extendingEntityServiceBase<TEntityDTO, TIdentifierType>overSessionDTOandSessionIdentifierType, and implementingISessionUIService(SessionService.cs:10-14). - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>;ITokenStorageService;SessionDTO;ISessionUIService. - Concept: the thin-leaf CRUD service taught at
ActivityService, over the busiest resource in the module.[Rubric §2, Design Patterns],[Rubric §15, Best Practices & Code Quality]. It is worth noticing what this one class carries without knowing it: the base'sGetPagedAsyncbuilds the filter, sort and paging query string (EntityServiceBase.cs:92-118), which is exactly the surfacePublicSessionScheduleServicecomposes over for the "My Schedule"Id IN (...)scope. - Walkthrough: a primary-constructor class, base call only (
SessionService.cs:10-12):EntityServiceBase<SessionDTO, SessionIdentifierType>("sessions", httpClientFactory, tokenStorageService), with an empty body (:13-14). - Why it's built this way: sessions need nothing beyond generic CRUD from the UI's point of view, so
the empty subclass is enough to give DI a concrete type behind a named interface. The two session reads
that are special, the speaker's own sessions and the offline-first public schedule, live in their own
services (
SpeakerDashboardServiceandPublicSessionScheduleService) rather than as overrides here. - Where it's used: registered by the
AddUIModule<ConferenceUIModule>()scan (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30), and injected asISessionUIServiceintoSessionList(Pages/Session/SessionList.razor.cs:24),SessionDetail(Pages/Session/SessionDetail.razor.cs:23),SessionCreate(Pages/Session/SessionCreate.razor.cs:19),PublicSessionDetail(Pages/Public/PublicSessionDetail.razor.cs:24),PublicSpeakerDetail(Pages/Public/PublicSpeakerDetail.razor.cs:23),SpeakerDetail(Pages/Speaker/SpeakerDetail.razor.cs:28) andOrganizerSessionFeedback(Pages/Feedback/OrganizerSessionFeedback.razor.cs:20). It is also consumed service-to-service byPublicSessionScheduleService(Services/PublicSessionScheduleService.cs:18), which is how the public schedule reaches the API.
SponsorService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Sponsors/SponsorService.cs:10· Level 5 · class (sealed)
- What it is: a body-less concrete CRUD service for the
sponsorsWebAPI resource. It extendsEntityServiceBase<TEntityDTO, TIdentifierType>overSponsorDTOandSponsorIdentifierType, passes the resource name to the base constructor, and implements the equally emptyISponsorUIService(ISponsorUIService.cs:9-11), inheriting the entire CRUD implementation with no added code (SponsorService.cs:10-13). - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>;ITokenStorageService;SponsorDTO;ISponsorUIService; theSponsorIdentifierTypealias, anint(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/MMCA.ADC.Conference.GlobalUsings.IdentifierType.cs:26); BCLIHttpClientFactory. - Concept: the thin-leaf CRUD service taught at
ActivityService, over a different resource.[Rubric §2, Design Patterns],[Rubric §15, Best Practices & Code Quality](assesses what a new resource costs: here four lines plus an empty interface, with the verbs, retry, auth and error translation all inherited). - Walkthrough: a primary-constructor class whose base call is the only content
(
SponsorService.cs:10-12):EntityServiceBase<SponsorDTO, SponsorIdentifierType>("sponsors", httpClientFactory, tokenStorageService), with an empty body (:13). The base constructor takes only the endpoint, the HTTP client factory and the token store, with no UI read cache (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/EntityServiceBase.cs:35-38), so every read goes to the API through the plainSendGetAsynchelper (EntityServiceBase.cs:164,:226). - Why it's built this way: sponsors need nothing beyond CRUD in the UI, so an empty subclass is the
smallest concrete type that still gives DI a binding for
ISponsorUIServiceand keeps the resource name in exactly one place. - Where it's used: picked up automatically by the Scrutor scan inside
AddUIModule<ConferenceUIModule>()(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30), so no explicitAddScopedline exists for it. Injected asISponsorUIServiceintoSponsorList(Pages/Sponsor/SponsorList.razor.cs:23),SponsorDetail(Pages/Sponsor/SponsorDetail.razor.cs:22),SponsorCreate(Pages/Sponsor/SponsorCreate.razor.cs:19) andPublicSponsorList(Pages/Public/PublicSponsorList.razor.cs:26).
ActivityService
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Services.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Services/Activities/ActivityService.cs:10· Level 5 · class (sealed)
- What it is: the concrete HTTP service for the
activitiesresource, a body-less class that inherits every CRUD method from the shared base and supplies only the endpoint name (ActivityService.cs:10-14). It implementsIActivityUIService. - Depends on:
EntityServiceBase<TEntityDTO, TIdentifierType>as its base (fromMMCA.Common.UI.Services,ActivityService.cs:2);ITokenStorageService(fromMMCA.Common.UI.Services.Auth,ActivityService.cs:3);ActivityDTO; BCLIHttpClientFactory. - Concept introduced, the four-line concrete UI service (Template Method with a supplied endpoint).
The primary constructor forwards
IHttpClientFactoryandITokenStorageServiceplus the literal resource name"activities"toEntityServiceBase<TEntityDTO, TIdentifierType>closed overActivityDTOandActivityIdentifierType(ActivityService.cs:10-12); the class body is empty (:13-14). Everything a page calls (GetAllAsync,GetPagedAsync,GetByIdAsync,GetAllForLookupAsync,AddAsync,UpdateAsync,DeleteAsync) lives on the base (MMCA.Common/Source/Presentation/MMCA.Common.UI/Services/Api/EntityServiceBase.cs:90,108,154,165,184,210,237), along with the auth, the Polly retry, the read cache, the conditional-write header and the Result conversion. Two base behaviors are worth knowing here, because the leaf inherits them for free: a create attaches a freshIdempotency-Keyheld constant across retries (EntityServiceBase.cs:193-198), and an update sends the DTO's concurrency token asIf-Match(EntityServiceBase.cs:205, ADR-035).[Rubric §2, Design Patterns](assesses whether a shared algorithm is factored once and specialized by leaves; the base owns the CRUD algorithm and the leaf supplies the resource name, a textbook Template Method) and[Rubric §15, Best Practices & Code Quality](assesses the cost of one more like-for-like feature; a new plain-CRUD resource costs one tiny class). - Walkthrough: no members. The whole class is the base call carrying the resource root
"activities"and the declaration that it satisfiesIActivityUIService(ActivityService.cs:11-12). The doc comment (:7-9) says only that it provides standard CRUD. - Why it's built this way: the endpoint name is the only thing that varies for a plain CRUD
aggregate, so the concrete class carries exactly that and nothing else.
sealed(ActivityService.cs:10) closes the leaf: specialization belongs on the interface or in the base, not in a subclass of a subclass. - Where it's used: never named in DI by hand. Because it is an
IEntityService<,>implementation in the Conference UI assembly, the assembly scan insideAddUIModule<ConferenceUIModule>()registers it under its implemented interfaces (ScanRegistration.ImplementedInterfaces) with a scoped lifetime (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/DependencyInjection.cs:30callingMMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:493-497), which is what makesIActivityUIServiceresolvable inActivityList(Pages/Activity/ActivityList.razor.cs:24),ActivityDetail(Pages/Activity/ActivityDetail.razor.cs:23),ActivityCreate(Pages/Activity/ActivityCreate.razor.cs:20) andPublicActivityList(Pages/Public/PublicActivityList.razor.cs:27).
OrganizerEventFeedback
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Feedback/OrganizerEventFeedback.razor.cs:18· Level 7 · class (Blazor code-behind)
- What it is: the organizer's read-and-moderate view of event feedback. It loads every question and every answer submitted for one event, groups the answers under their question, averages the rating questions, and lets the organizer delete an individual free-text answer after confirming it.
- Depends on:
IOrganizerEventFeedbackUIService(line 20),IQuestionUIService(line 21) read through theQuestionUIServiceExtensions.GetAllForEntityAsyncextension (line 88),IEventLookupService(line 22) returningEventInfo, andIToastService(line 23); theQuestionDTOandEventQuestionAnswerDTOshapes;ConferenceRoutePaths. Externals: Blazor[Parameter], MudBlazor (MudCard,MudIconButton,BreadcrumbItem), and fromMMCA.Common.UIthePageLoadingState,DetailLoadStateContentandDeleteConfirmationcomponents (the last held in_deleteAnswerConfirm, line 45, and exposingShowAsyncatMMCA.Common/Source/Presentation/MMCA.Common.UI/Components/Forms/DeleteConfirmation.razor:24), theDetailLoadStateenum, andRatingStars. - Concept introduced, the inline page-level error state with a classified Retry. Unlike the create
and detail pages, which toast their failures, this page keeps a
_loadErrorstring (line 38) and rendersDetailLoadStateContentinstead of the body when the load failed (.../Pages/Feedback/OrganizerEventFeedback.razor:17-24). The distinction is deliberate: a toast expires, and a feedback page that silently shows zero responses after a failed fetch reads as "nobody answered". A second field,_loadNotFound(line 41), records whether the error is a missing record rather than a failed load: a missing event sets it together withL["Error.EventNotFound"](lines 81-82), and the template maps it toDetailLoadState.NotFoundversusDetailLoadState.Failed(.../OrganizerEventFeedback.razor:20). Only the failed state offers Retry, wired asOnRetry="LoadAsync"(.../OrganizerEventFeedback.razor:23): retrying a fetch can succeed, retrying a nonexistent event cannot.[Rubric §19, State Management & Data Flow]assesses where view state lives and how failure is represented: loading, not-found, failed, empty, and populated are distinct rendered states driven byIsLoading(line 36),_loadError,_loadNotFound, and the two collections.[Rubric §30, Compliance, Privacy & Data Governance]assesses control over user-submitted content: answer deletion is the organizer's moderation lever over free-text feedback (BR-53, cited in the type's own doc comment, lines 14-17), and because it removes an attendee's answer for good it sits behind a confirmation dialog (lines 119-124).[Rubric §23, Front-End Performance & Rendering]: aggregation happens client-side over one bulk answer fetch (line 98) rather than per-question round trips, and a delete re-reads nothing. - Walkthrough
- The route id arrives already typed as
[Parameter] public EventIdentifierType EventId(line 25), so the page passes it straight to the event lookup and feedback calls (lines 75, 98, 128) with no string parse step and no separate parsed-id field; the alias keeps the page compiling whichever primitive it maps to (ADR-048, revisited in ADR-085). - Every awaited call takes
LifetimeToken(line 32) instead of reading_cts.Tokendirectly: readingTokenoff a disposed source throwsObjectDisposedException, andDisposecancels before it disposes (lines 149-169), so a load or handler resuming after the user navigated away gets a cancelled token and stops through itsOperationCanceledExceptionpath. OnInitializedAsync(lines 47-57) only builds breadcrumbs (lines 49-54) and returnsLoadAsync()(line 56).LoadAsync(lines 60-115) is both the first load and the Retry action, so it starts by resettingIsLoading,_loadErrorand_loadNotFound(lines 62-64). It then resolves the event name from the lookup dictionary, flagging a lookup failure asError.LoadFailed(lines 69-73) and an unknown id as not-found (lines 75-84), loads every event question throughQuestionService.GetAllForEntityAsync("Event", ...)(line 88), then loads all answers for the event (line 98). That extension filters onQuestionEntity, orders bySort, and pages throughPagedReadAllso a form longer than one page is not truncated in silence (.../Services/Questions/QuestionUIServiceExtensions.cs:20-46). Thefinallyalways clearsIsLoading(lines 111-114).- Rendering (
.../Pages/Feedback/OrganizerEventFeedback.razor:41-92) pairs each question with_answers.Where(a => a.QuestionId == question.Id)(line 43). A question whoseQuestionTypeis"Rating"(case-insensitive, line 59) parses the answer values to integers, drops the unparseable ones, and renders aRatingStarsat the average with its ownAriaLabel, plus the average to one decimal and the ratings count (lines 61-74). Anything else renders each answer as pre-wrapped text with a delete icon button carrying anaria-labelthat hands the whole answer to the handler (lines 79-88,DeleteAnswerAsync(answer)at line 84).[Rubric §21, Accessibility]. DeleteAnswerAsync(lines 117-145) takes theEventQuestionAnswerDTO(line 117) and first asks_deleteAnswerConfirm.ShowAsync(answer.AnswerValue)(line 121), returning untouched when the organizer backs out (lines 121-124); the dialog is theDeleteConfirmationrendered once below the cards with its entity type fromL["Answer.EntityName"](.../Pages/Feedback/OrganizerEventFeedback.razor:95). It then deletes byanswer.Id(line 128) and, on failure, toastsSnackbar.AnswerDeleteFailedand stops (lines 129-133). On success it drops the answer from_answerslocally and toastsSnackbar.AnswerDeleted(lines 138-139), and nothing more: no re-read follows, because the per-question counts and rating averages are recomputed from_answerson every render (comment at lines 135-137), so the local removal already updates them.
- The route id arrives already typed as
- Why it's built this way: the organizer needs one screen that answers "what did attendees say about this event", and the aggregate-versus-free-text split follows from the question model itself: ratings are only meaningful in aggregate, free text is only meaningful individually (and is the only thing that can need moderating).
- Where it's used: the
/events/{EventId}/feedbackroute (.../Pages/Feedback/OrganizerEventFeedback.razor:1-2, organizer-only), reached from the "view feedback" button onEventDetail, which links throughConferenceRoutePaths.EventFeedbackOrganizer(.../Pages/Events/EventDetail.razor:142-144,.../ConferenceRoutePaths.cs:79). The attendee-facing counterpart lives in the Engagement module (EventFeedback). - Caveats / not-in-source: the delete affordance renders only in the non-rating branch
(
.../Pages/Feedback/OrganizerEventFeedback.razor:79-88), so a rating answer has no moderation button on this page.
OrganizerSessionFeedback
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Feedback·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Feedback/OrganizerSessionFeedback.razor.cs:18· Level 7 · class (Blazor code-behind)
- What it is: the session-scoped twin of
OrganizerEventFeedback. Same load-group-aggregate-moderate flow, one level down the hierarchy: answers for a single session instead of a whole event. - Depends on:
IOrganizerSessionFeedbackUIService(line 20),IQuestionUIService(line 21) read throughQuestionUIServiceExtensions.GetAllForEntityAsync(line 85), andISessionUIService(line 22) in place of the event lookup, plusIToastService(line 23) and theMMCA.Common.UIDeleteConfirmationcomponent (_deleteAnswerConfirm, line 45); theSessionQuestionAnswerDTOandQuestionDTOshapes;ConferenceRoutePaths. - Concept introduced: none new. The page-level error state with its not-found-versus-failed Retry
split (
_loadNotFound, line 41;.../Pages/Feedback/OrganizerSessionFeedback.razor:18-25), the rating-versus-text rendering split, theLifetimeTokenguard (line 32), and the confirm-then-remove-locally delete rule are the ones taught inOrganizerEventFeedback. - Walkthrough (only the differences from its twin):
- The route parameter is typed directly as
[Parameter] public SessionIdentifierType SessionId(line 25), so there is no parse step and no parsed-id field; the id goes straight to the session fetch and the feedback calls (lines 69, 95, 125). OnInitializedAsync(lines 47-57) again only builds breadcrumbs and returnsLoadAsync(), the load that doubles as the Retry action (lines 60-112).- The title comes from the session itself rather than a lookup dictionary:
SessionService.GetByIdAsync(SessionId, false, ...)withincludeChildren: false(line 69), since onlysession.Titleis needed (line 81). - Failure is classified, not flattened. The load distinguishes a genuine miss from any other error:
sessionResult.IsNotFound()sets_loadNotFound(line 74), which choosesL["Error.SessionNotFound"]and suppresses Retry, while anything else keeps the genericL["Error.LoadFailed"]with Retry (lines 75-77); the in-code comment (lines 72-73) records that this is theResult-based replacement for what used to arrive as a null success. The event twin makes the same split from a dictionary miss rather than from a fetch result. - The question filter is
"Session"(line 85), the other half of the same question table that the event page filters on"Event". DeleteAnswerAsync(lines 114-142) takes aSessionQuestionAnswerDTO, confirms through_deleteAnswerConfirm.ShowAsync(answer.AnswerValue)(line 118), then passes the route session id alongsideanswer.Id(line 125); on success it removes the answer locally and toasts (lines 135-136) with no re-read, since the tallies are computed from_answerson every render.- The template renders the session title as a
MudLinkback to its detail page (.../Pages/Feedback/OrganizerSessionFeedback.razor:28) where the event page renders plain text, places itsDeleteConfirmationat line 96, and ends with a back button to the same route (lines 98-102).
- The route parameter is typed directly as
- Why it's built this way: session and event feedback are two instances of one questionnaire model,
so the two pages stay structurally identical rather than sharing a parameterized component. The cost is
duplication; the benefit is that each page's queries and route contract read literally. The genuinely
shared part, the paged question read, lives once in the
QuestionUIServiceExtensions.GetAllForEntityAsyncextension overIQuestionUIService(.../Services/Questions/QuestionUIServiceExtensions.cs:20) rather than being duplicated. - Where it's used: the
/sessions/{SessionId}/feedbackroute (.../Pages/Feedback/OrganizerSessionFeedback.razor:1-2), reached from the Organizer-only "view feedback" button onSessionDetailthroughConferenceRoutePaths.SessionFeedbackOrganizer(.../Pages/Sessions/SessionDetail.razor:188-191,.../ConferenceRoutePaths.cs:80). The attendee-facing counterpart isSessionFeedback.
PublicSponsorList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Sponsors·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Sponsors/PublicSponsorList.razor.cs:21· Level 9 · class (Blazor code-behind)
- What it is: the public sponsor and exhibitor page. It groups the current (or next) event's sponsors by tier, orders them within each tier, and renders them as logo cards. Read-only and anonymous, BR-43 (class doc,
PublicSponsorList.razor.cs:12-20). - Depends on:
ISponsorUIServiceandIEventLookupService(:28-29),SponsorDTOandSponsorTier(:52),EventInfo(through the lookup),CurrentEventSelector(:79-84), and the injectedTimeProvider(:30) that supplies "now" to the selector (:84); MudBlazor and the page'sIStringLocalizer(PublicSponsorList.razor:3). LikePublicActivityListit derives fromComponentBasedirectly (:21). - Concept introduced, the deterministic grouped read and the graceful empty state. Like
PublicActivityList, this page is not a data grid: the roster is small and needs a fixed visual hierarchy, so the page fetches one bounded page and shapes it in memory.- Bounded read:
MaxSponsors = 200with the reasoning stated on the constant, a conference sells dozens, not thousands (:23-24).[Rubric §12, Performance & Scalability]. - Deterministic order: sponsors are grouped by tier, tiers ordered ascending because that is package order (Platinum first), and each group ordered by
SortthenName(:109-117), so the strip does not depend on insertion order. The comment states the rule (:106-108). - Empty state with no dead link: when the event has no sponsors the page falls back to the sponsorship-packet call to action, and when the event publishes no packet URL that call to action is hidden entirely rather than offering a dead link (class doc
:17-19, field doc:45-49, assigned at:88).[Rubric §24, Forms, Validation & UX Safety]and[Rubric §25, Navigation & Information Architecture]: a missing value removes an affordance instead of producing a broken one. - The event lookup fails closed; the sponsor fetch fails soft. A failed event lookup sets
_loadFailedand returns before any fetch is issued (:71-75), and the markup hands that flag toListNoRecordsContentwithOnRetry="LoadAsync"(PublicSponsorList.razor:26-27), so the reader gets an error with a retry. The doc onLoadAsyncstates the reason (:59-64): falling through to a fetch with no event filter would show every edition's sponsors; a successful lookup that genuinely finds no current or next event still keeps the unscoped fetch, matchingPublicSpeakerList. A failed sponsor fetch (:104) stays non-fatal and falls back to the sponsorship call to action (:102-103). OnlyOperationCanceledExceptionis caught (:120-123) as expected teardown or an InteractiveAuto transition, and thefinallyalways clears_isLoading(:124-127).[Rubric §29, Resilience & Business Continuity]and[Rubric §11, Security](an audience-scoped read never silently widens). - Only a published event can be featured. The selector is fed
events.Values.Where(e => e.IsPublished)(:80): the event lookup is unscoped for staff callers, so it can hold a draft that is live today, and the comment at:77-78(OBS-7) records why. The class doc now says the same (:15-16): the server scopes non-privileged callers and the page features only a published event for staff too. - Disposal-safe token. Every call passes
LifetimeToken(:37) rather than_cts.Token, because readingTokenoff a disposed source throwsObjectDisposedException;Disposecancels first, so a late-resuming load gets a cancelled token and stops through theOperationCanceledExceptionpath (comment:34-36; used at:71and:100).
- Bounded read:
- Walkthrough:
OnInitializedAsync(:57) delegates toLoadAsync(:65-128), which is also the retry target. It resets_isLoadingand_loadFailed(:67-68), loads the event lookup and stops on the error state when it fails (:71-75), resolves the current or next event among published events withCurrentEventSelectorpassing the four accessors explicitly andTimeProvider.GetUtcNow().UtcDateTimeas the clock (:79-84), remembers its name and sponsorship packet URL (:87-88), builds anEventId equalsfilter when an event resolved (:90-92), fetches one page sorted bySortascending (:94-100), and materializes_tiersas an ordered list of tier-to-sponsors pairs (:109-117).HasSocialLinks(:130-133, SP-01) is a static guard that is true when a sponsor has a LinkedIn URL or a Twitter handle, so the card's social row renders only when there is something to link.TierLabel(:55) localizes each tier name through the page'sIStringLocalizerwith aTier.{tier}key, so the tier enum never reaches the screen untranslated ([Rubric §27, Internationalization]). Disposal (:135-157) is the standard cancel-on-disposal pattern over theCancellationTokenSourceat:32. - Why it's built this way: the sponsor page is a marketing surface with a fixed hierarchy, so it wants deterministic grouping rather than sortable columns, and it must look intentional on an event that has not sold a sponsorship yet.
- Where it's used: the
/conference/sponsorsroute (PublicSponsorList.razor:1, matchingConferenceRoutePaths.PublicSponsorsatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:53). The roster it renders is authored by the organizer through the sponsor admin pages in this module. - Caveats / not-in-source: the page relies on the server scoping non-privileged callers to published events (class doc,
:15-16); that scoping is enforced in the Conference API, not here. For staff callers the page adds its own published-only filter (:80).
PublicActivityList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Activities·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Activities/PublicActivityList.razor.cs:22· Level 9 · class (Blazor code-behind)
- What it is: the public social and networking programme. It lists the current (or next) event's activities (pre-conference party, coffee connect, after-party, closing ceremony) ordered by start time then display order, read-only and anonymous, BR-43 (class doc,
PublicActivityList.razor.cs:13-21). - Depends on:
IActivityUIServiceandIEventLookupService(:29-30),ActivityDTO,EventInfo(through the lookup),CurrentEventSelector(:80-85),IMapNavigationService(:31),IToastService(:32), and the injectedTimeProvider(:33) that supplies "now" to the selector (:85). It derives fromComponentBasedirectly (:22), not from the list-page base. - Concept introduced, the bounded, deterministically ordered, single-shot read. This page is not a data grid, and reading it next to
PublicEventListis the clearest way to see when the base class is the wrong tool. An activity programme is a handful of items with a fixed narrative order (chronological), so there is nothing to page, sort or search.- Bounded read:
MaxActivities = 200with the reasoning written on the constant, a conference schedules a handful, not thousands (:24-25).[Rubric §12, Performance & Scalability](assesses that unbounded reads are avoided by design, not by luck). - Deterministic order: the server is asked for
StartTimeascending (:98-99), and the result is re-ordered in memory byStartTime, thenSortOrder, thenName(:109-115). The comment (:106-108) explains the layering: start time is the programme order, sort order breaks ties between activities that start together, and name is the final tiebreak so the list is deterministic rather than dependent on insertion order. - The event lookup fails closed; the activity fetch fails soft. A failed event lookup sets
_loadFailedand returns before any fetch is issued (:72-76), and the markup hands that flag toListNoRecordsContentwithOnRetry="LoadAsync"(PublicActivityList.razor:26-27), so the reader gets an error with a retry. The doc onLoadAsyncstates the reason (:60-65): falling through to a fetch with no event filter would list every edition's activities; a successful lookup that genuinely finds no current or next event still keeps the unscoped fetch, matchingPublicSpeakerList. The activity page itself (:104) stays non-critical: a failed fetch leaves the page on its empty state (:102-103). OnlyOperationCanceledExceptionis caught (:118-121) as expected teardown or an InteractiveAuto transition, and thefinallyalways clears_isLoading(:122-125).[Rubric §29, Resilience & Business Continuity]and[Rubric §11, Security](an audience-scoped read never silently widens). - Only a published event can be featured. The selector is fed
events.Values.Where(e => e.IsPublished)(:81): the event lookup is unscoped for staff callers, so it can hold a draft that is live today, and the comment at:78-79(OBS-7) records why the page filters it out. The server already scopes non-privileged callers; this closes the same gap for staff. - Disposal-safe token. Every call passes
LifetimeToken(:40) instead of reading_cts.Tokendirectly, because readingTokenoff a disposed source throwsObjectDisposedException;Disposecancels before it disposes, so a load or handler that resumes after the user navigated away gets a cancelled token and exits through theOperationCanceledExceptionpath (comment:37-39). It is used at:72,:100and:139. - Culture-aware time rendering:
FormatTimeRange(:52-56) formats start and end withCultureInfo.CurrentCultureand composes them through a localizedText.TimeRangeresource, so both the times and the separator follow the viewer's culture.[Rubric §27, Internationalization](assesses that formatting and phrasing are both localized, not just the strings). The class doc also draws the domain line that shapes the whole page (:18-20): activities are not sessions. They carry no room and no speakers, and an activity with its own venue offers the same directions affordance the public event page uses for the conference venue.
- Bounded read:
- Walkthrough
OnInitializedAsync(:58) delegates toLoadAsync(:66-126), which is also the retry target: reset_isLoadingand_loadFailed(:68-69), load the event lookup and stop on the error state when it fails (:72-76), resolve the current or next event, among published events only (:81), throughCurrentEventSelector.SelectCurrentOrNextwith the four accessors passed explicitly because the lookup returnsEventInforather thanEventDTO, and withTimeProvider.GetUtcNow().UtcDateTimeas the clock (:80-85), remember its id and name (:87-88), build anEventId equalsfilter when one resolved (:90-92), fetch one bounded page (:94-100), and materialize the ordered list (:109-115).OpenDirectionsAsync(:128-145): does nothing for an activity with no venue address (:130-133), otherwise launches the platform maps app on native heads or a maps site in a browser (:135-139), labelling the pin with the venue name and falling back to the activity name when the venue is unnamed (:138); a false return raises one warning toast (:141-144).- Disposal (
:147-169) is the standard cancel-on-disposal pattern over theCancellationTokenSourceat:35.
- Why it's built this way: a fixed-order programme wants a readable timeline, not sortable columns, and the read is small enough that one bounded call beats the machinery of server paging.
- Where it's used: the
/conference/activitiesroute (PublicActivityList.razor:1, the same string asConferenceRoutePaths.PublicActivitiesatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:54), reached fromPublicEventDetail'sViewActivitiesaction (PublicEventDetail.razor.cs:191). - Caveats / not-in-source: the page relies on the server scoping non-privileged callers to published events (class doc,
:15-17); that scoping is enforced in the Conference API, not here. For staff callers the page adds its own published-only filter (:81).
PublicSpeakerDetail
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Speakers/PublicSpeakerDetail.razor.cs:21· Level 10 · class (Blazor code-behind)
- What it is: the public speaker profile: photo, bio, social links, and the sessions that speaker presents at the conference the reader is allowed to see. Email is deliberately not rendered, BR-66 (class doc,
PublicSpeakerDetail.razor.cs:17-20). - Depends on: inherits
DetailPageBase(PublicSpeakerDetail.razor:6), which supplies the page-lifetimePageToken(MMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DetailPageBase.cs:38), theLatestLoadGuardexposed asLoadGuard(DetailPageBase.cs:34), theDetailLoadStateLoadState(DetailPageBase.cs:41),BeginLoad/CompleteLoad(DetailPageBase.cs:48,:78) and disposal (DetailPageBase.cs:28,:138-149). Injected:ISpeakerUIService,ISessionUIServiceandIEventUIService(:23-25),AuthenticationStateProviderread directly rather than as a cascading task (:26; theBL0013suppression at:246-248records why: it is read once per load, and signing out or switching account navigates away, so the instance never outlives the identity it read),IToastService(:28), the injectedTimeProvider(:29). AlsoSpeakerDTOandSessionDTO,ConferenceReadAudience(:249),CurrentEventDefaults(:256), andConferenceRoutePaths(:46,:260). The route parameterIdis typedSpeakerIdentifierTypedirectly (:31), so the page does not string-parse it. - Concept introduced, a prerender that fetches once and hands off, the server-side filter that replaced an in-memory one, fail-closed audience scoping, clearing stale child data before a reload, and a load state the page body states instead of a toast.
- Prerender fetches the speaker once and hands it over. When
!RendererInfo.IsInteractive,OnParametersSetAsyncreturnsPrerenderSpeakerAsync()(:85-88): under InteractiveAuto the interactive instance re-runs the method, so a naive page fetched the speaker and the session catalog twice per visit (comment,:80-84).PrerenderSpeakerAsync(:103-118) fetches only the speaker, withPageToken(:107), and stores it in the two[PersistentState]propertiesPrerenderedSpeakerandPrerenderedSpeakerId(:56-67), so persistent component state carries it to the interactive instance; an abandoned prerender'sOperationCanceledExceptionis swallowed (:114-117). The page state stays Loading, so the prerendered markup is the same skeleton (doc,:99-102), and the session read stays interactive-only. On the interactive sideTakePrerenderedSpeaker(:124-130) returns the persisted speaker only when it was fetched for the current routeId, and clears both properties either way, so it answers one load at most and never a different id. The interactive path still compares the typedIdwith_loadedId(:90, comment at:51-53: the load generation, not this id, is authoritative) and hands back theLoadSpeakerAsync()task (:96). ADR-056 is the render-mode strategy this works within.[Rubric §23, Front-End Performance & Rendering](assesses avoidable duplicate work per view). - Push the filter to the server.
LoadSpeakerSessionsAsync(:198-235) sends aSpeakerId equalsfilter withincludeChildren: false, sorted byStartsAtascending, capped atMaxSpeakerSessions = 100(:33-34, request at:219-226). The remarks block (:188-193) records what this replaced: the page used to pull the entire session catalog with all child collections and filter it in memory onSessionSpeakers, so viewing one speaker cost a full-catalog read. Since the page never renders those children, they are gone from the request too.[Rubric §12, Performance & Scalability]and[Rubric §8, Data Architecture](a bounded page size instead of an unbounded read). - Fail closed on the audience scope.
ResolveSessionEventScopeAsync(:243-258) returns an unscoped result for a privileged reader (:249-252) and otherwise resolves the current or next event throughCurrentEventDefaults, withTimeProvider.GetUtcNow().UtcDateTimeas "now" (:256); a failed events lookup returns(false, null)(:257), an unresolved scope rather than a wide one, and the caller turns that into a load failure (:208-212). The comment states the leak it prevents (:205-207): without this, a speaker who also presented at past conferences leaked those sessions to attendees here.[Rubric §11, Security]and[Rubric §26, Front-End Security]. - Clear the previous speaker's sessions up front.
LoadSpeakerAsyncresets_speakerSessionsto empty right afterBeginLoad()and before any await (:137-139, the L156 comment): the session list belongs to the previous speaker until this load replaces it, so a failed scope or fetch for the new speaker cannot leave the old speaker's sessions on screen.[Rubric §24, Forms, Validation & UX Safety](stale data is never shown under the wrong heading). - The page body states a missing or failed speaker.
CompleteLoad(generation, result)(:149) movesLoadStateto Loaded, NotFound or Failed, and only for the current generation (DetailPageBase.cs:67-82); the markup rendersDetailLoadStateContentfor every state but Loaded (PublicSpeakerDetail.razor:16), with Retry for a failure, so a not-found or failed speaker raises no toast (comment,:147-148). A transport fault is mapped toError.Unexpected("PublicSpeakerDetail.LoadFailed", ...)and completed the same way (:176); that catch-all is a deliberateCA1031suppression (:171-173), justified inline as the last-resort path that turns any fault into the failed-load body with Retry rather than a broken page. The one toast left is for a session-list failure after the speaker loaded (:162-165).[Rubric §24, Forms, Validation & UX Safety].[Rubric §30, Compliance, Privacy & Data Governance](assesses deliberate handling of personal data): the speaker email exists on the DTO but is never rendered on the public page, and the class doc names the rule.
- Prerender fetches the speaker once and hands it over. When
- Walkthrough
OnInitialized(:40-49) builds the Home / Speakers / Profile breadcrumbs; unlikePublicEventDetailit is synchronous, because the speaker list is reachable by every audience and the trail does not vary.HasSocialLinks(:72-76) collapses the four optional link fields into a single render guard, so the social row is absent rather than empty when a speaker supplied none.LoadSpeakerAsync(:132-182):BeginLoad()(:135) supersedes the load in flight throughLoadGuardand puts the page back in Loading (DetailPageBase.cs:48-51), returning the cancellation token and the generation together; empty_speakerSessions(:137-139); take the prerendered speaker, elseGetByIdAsync(Id, true, token)with the already-typed id (:143-145); whenCompleteLoadreports a superseded response or the result carries no speaker, clearSpeakeronly if this generation is still current and return (:149-158); otherwise setSpeaker(:160), load the sessions and toast one load failure if that resolver returned false (:162-165).OperationCanceledExceptionis swallowed (:167-170); any other exception completes the load as a failure and clearsSpeakerfor the current generation (:172-181).- Session links are plain
MudLinkmarkup toConferenceRoutePaths.PublicSessionDetails(session.Id)(PublicSpeakerDetail.razor:117), not a code-behind navigation method; the page keeps onlyNavigateToList(:260) for the back action. The page declares no disposal of its own:DetailPageBaseimplementsIDisposableand disposesLoadGuardand its token source (DetailPageBase.cs:125,:149), so the base that owns the load generation also owns cancellation of the in-flight fetch.
- Why it's built this way: a public profile is a read-only, cache-friendly page; keeping its fetches narrow (one speaker, fetched once across prerender and interactive render, that speaker's sessions for one event, no children) is what makes it cheap enough to serve to an anonymous crowd, and scoping those sessions to the reader's event keeps the profile consistent with the schedule they can actually browse.
- Where it's used: the
/conference/speakers/{Id:guid}route (PublicSpeakerDetail.razor:1), reached fromPublicSpeakerListcards and from session pages. Its markup renders theQrCodeButtonfor its own link (PublicSpeakerDetail.razor:47).
PublicSpeakerList
MMCA.ADC.Conference.UI ·
MMCA.ADC.Conference.UI.Pages.Public.Speakers·MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/Speakers/PublicSpeakerList.razor.cs:33· Level 10 · class (Blazor code-behind)
- What it is: the public speaker directory, rendered as a photo-forward responsive card grid with infinite scroll, the same layout on desktop and mobile. Read-only for everyone (BR-43), no emails (BR-66), and the server returns only speakers with a visible session in the listed event, or in any published event when no event filter is applied, BR-239 (class doc,
PublicSpeakerList.razor.cs:10-32). - Depends on: extends
EventFilteredListPageBase<TDto>closed overSpeakerDTO(:33), which itself extendsDataGridListPageBase<TDto>(MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Common/EventFilteredListPageBase.cs:25);ISpeakerUIService(:42),PublicReadAudience(:122), which appliesConferenceReadAudience's privileged roles (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Public/PublicReadAudience.cs:28), andInfiniteScrollSentinel(PublicSpeakerList.razor:146). Note what is absent: noMudDataGrid, noGridRefoverride, noMobileInfiniteScrollList<TItem>. - Concept introduced, borrowing a base class's plumbing for a layout it was not written for. A speaker is a face and a tagline, not a row of columns, so this page throws away the grid and keeps everything else. The class doc explains the trade (
:21-28): paging keeps the page-based model of the base's mobile path (MobileItems,MobileCurrentPage,MobileTotalItems,MobilePageSize, declared atMMCA.Common/Source/Presentation/MMCA.Common.UI/Pages/Common/DataGridListPageBase.cs:93-96), which already owns the cancellation token, the loading and failure flags, and the saved-state plumbing, and layers infinite scroll on top by appending each fetched page to_loadedSpeakers(:55) throughAppendNewSpeakers(:231-244, called at:215and:281) rather than replacing, which is what the base's mobile path does on its own. The event-filter half is not hand-rolled either:EventFilteredListPageBase<TDto>owns the events load, the"all"sentinel, the picker, and theEventIdfilter, and this page supplies four overrides.EventFilterIsUserControlled => _isPrivileged(:53) is the audience gate: only privileged readers pick their own event, so only their choice is persisted and restored, and everyone else is recomputed to the current or next event (doc at:49-52, base contract atEventFilteredListPageBase.cs:65).OnEventsLoadingAsync(:115-123) resolves privileged status before the events are fetched, because that decides whether a restored choice survives. It returns early, leaving the reader non-privileged, when no authentication state cascades (:117-120), and otherwise delegates toPublicReadAudience.IsPrivilegedReaderAsync(:122), whose catch degrades any non-cancellation failure to the least-privileged audience (PublicReadAudience.cs:30-34).ReloadForEventFilterAsync(:313),SavePageFilters/RestorePageFilters(:97-101) andOnRestoredStateAppliedAsync(:304-305, below) fill in the rest.[Rubric §15, Best Practices & Code Quality]and[Rubric §1, SOLID](assess reuse of one tested mechanism rather than a parallel implementation);[Rubric §11, Security]and[Rubric §26, Front-End Security]for the persistence gate. Six correctness details make that borrowing safe, and they are the real lesson of this page.- A generation counter supersedes in-flight fetches.
_generation(:89) is bumped by every reset (search, event filter, breakpoint change, retry) insideLoadSpeakersAsync(:191), and bothLoadSpeakersAsync(:204-211) andLoadMoreSpeakersAsync(:258,:267-270,:285-291) discard their rows when a newer generation has taken over. Without it a slow page-1 fetch could append to the list a later query had already cleared. The check also runs before the fetch: both callers pass their generation intoFetchCurrentPageAsync(int generation)(:135, called at:204and:265), which returns without fetching when a newer reset took over during theWaitForEventsAsync()await (:139-143) or the events re-lookup (:154-157). The doc (U-20,:125-134) gives the reason: the base hands the rows to whichever load enteredLoadMobileDataAsynclast, so a superseded reset that entered after its replacement would take the rows the newest reset needs and leave it painting "No speakers found."; checking with no await between the check and the call keeps the newest generation and the base's newest load the same.[Rubric §19, State Management & Data Flow]. - The list is cleared before the await, not after. The comment (
:197-198) states why: the grid, and with it the sentinel, is gone while page 1 is in flight, so a stray intersection-observer callback cannot ask for page 2 of the query being replaced. The id set is cleared alongside it (:199-200).[Rubric §18, UI Architecture & Component Design]. - The page number is committed only on success.
LoadMoreSpeakersAsyncsavespreviousPage, optimistically advances, and rolls back whenLoadFailedis set (:259-275), so the retry button re-requests the same page instead of silently skipping it.[Rubric §29, Resilience & Business Continuity]. - An unscoped query is refused rather than issued.
ScopeUnresolvedForPublicReader()(:172) is true exactly when a non-privileged reader has no event scope because the events fetch failed.FetchCurrentPageAsync(:135-169) re-resolves the events first in that state (:151-157), which heals a transient failure on the retry path. If the scope is still unresolved, the fetch delegate issues no request at all: it answers with a failedResultcarrying the lookup's ownEventsLoadErrors(:166) instead of falling through to an unscoped query that would show other conferences' speakers (:163-168). Because the refusal travels the base's ordinaryResultpath, the base words the toast with the mapped HTTP text and shows the failed state with Retry; the comment notes thatEventsLoadFailedis only ever set together with those (never empty) errors (:160-162). The comment above records the invariant and its one deliberate exception (:145-150): a successful fetch that genuinely found no published events keeps the unscoped default, matchingPublicSessionList.[Rubric §11, Security]and[Rubric §26, Front-End Security]. - Offset paging can repeat a row, so appends are de-duplicated and the end is detected.
_loadedSpeakerIds(:62) records every id shown, andAppendNewSpeakers(:231-244) adds only unseen speakers, lazily, so a repeat inside one page is skipped too (the cards are keyed by id, and a repeat would render two siblings with one key). Paging still advances by page number;EndReached(:82) is set when an append fetched a short page yet added nothing (:280-282), andHasMoreSpeakers(:95) includes!EndReached, so the sentinel stops instead of re-requesting empty pages forever whileMobileTotalItemsstill counts rows the shifting window skipped.[Rubric §29, Resilience & Business Continuity]. - "No speakers found." is withheld while a reset is still resolving scope.
_resetInFlight(:75) startstrue, is set again by every reset (:194), and is cleared in thefinallyonly by the reset of the current generation (:217-224). A reset resolves the event scope, with retries, before the base's loading flag flips, so without it the empty state would flash during that gap. For the same ordering reasonFetchCurrentPageAsyncfirst awaitsWaitForEventsAsync()(:139): the viewport subscription can fire a reset right after first render, before initialization's event load has finished. The same flag also covers the server prerender:LoadSpeakersAsyncreturns immediately when!RendererInfo.IsInteractive(:186-189), because the base's state write navigates and throws during prerender, which would bake "Error loading Speakers." into the prerendered HTML; instead the prerender shows the loading state and the interactive render loads the cards. The doc calls this a stopgap until the framework guards that write itself (:178-182).[Rubric §24, Forms, Validation & UX Safety].
- A generation counter supersedes in-flight fetches.
- Walkthrough
CardsPerPage = 12(:35-36) is assigned to the base'sMobilePageSizein the constructor (:38), with the reasoning on the constant: a multiple of 2, 3 and 4 so a full chunk fills whole rows at every breakpoint.[Rubric §22, Responsive & Cross-Browser].HasMoreSpeakers(:95) is true exactly while pages remain unfetched (and the end has not been detected), and that is exactly when the sentinel renders (PublicSpeakerList.razor:135-149, comment at:133-134), so the trigger and the condition cannot disagree; the markup comment notes that the sentinel's absence is the "everything is loaded" signal, for the reader and for the tests.OnInitializedAsync(:103-109) awaits the base first, because the base starts the events load before its own first await so the default event filter is resolved before the first speaker fetch, then runsLoadSpeakersAsync.FetchCurrentPageAsync(:135-169) delegates to the base'sLoadMobileDataAsync(DataGridListPageBase.cs:1577) with a fixedFullNameascending sort;ApplyFilters(:315-320) emitsFullName containsplus the base'sApplyEventFilter(:319,EventFilteredListPageBase.cs:216), which travels as the virtualEventIdfilter key that the speakers endpoint resolves through the EventSpeaker and SessionSpeaker joins, since a Speaker row has noEventIdcolumn (class doc,:19-20).OnMobileDataRequestedAsync(:298) is the base's breakpoint-change hook (DataGridListPageBase.cs:1999, invoked at:396and:419), overridden here to restart the accumulation rather than fetch one replacement page.RetryLoadAsync(:295),OnSearchChanged(:307-311, a non-asyncmethod returning the reset task),ReloadForEventFilterAsync(:313) andOnRestoredStateAppliedAsync(:304-305) all funnel throughLoadSpeakersAsync(:184-225), which is the single reset entry point. The last is the late-restore hook (M245, doc at:300-303): the page has no data grid for the base to reload, so a search or event restored from sessionStorage after first render (a new circuit) reloads the cards here whenneedsReloadis true.Initials(:322-330) builds the no-photo avatar text with spans, tolerating a blank first or last name;HasSocialLinks(:332-336) hides the social row when a speaker supplied none.
- Why it's built this way: attendees browse "the speakers at this conference", not a lifetime roster, so the default filter is the primary behavior and the picker is the privileged exception; and a directory of faces reads better as an endless wall of cards than as a pager. The class doc adds one more deliberate omission (
:29-31): category chips are absent because the paged endpoint is called withincludeChildren=false, soSpeakerCategoryItemsis empty on this DTO and asking for them would enlarge the payload. - Where it's used: the
/conference/speakersroute (PublicSpeakerList.razor:1, matchingConferenceRoutePaths.PublicSpeakersatMMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/ConferenceRoutePaths.cs:51); cards navigate toPublicSpeakerDetail. - Caveats / not-in-source: the join-based resolution of the virtual
EventIdfilter is asserted by the class doc comment; the resolution itself lives in the Conference API. A restored mobile page number is deliberately ignored (class doc,:27-28), so a reader returning to this page starts at page 1 rather than at the scroll depth they left.
⬅ ADC Conference - API, gRPC Contracts & Service Host • Index • ADC Engagement Module (Session Bookmarks) ➡