Onboarding guide
25. ADC Application Host, UI Shell & Cross-Module Composition
What this chapter covers. Every ADC module described so far (Conference, Engagement, Identity,
Notification) is consumed somewhere. This chapter is that somewhere: the client tier of ADC,
the code that turns the shared per-module Razor Class Libraries (MMCA.ADC.{Module}.UI) and the
framework UI packages (MMCA.Common.UI and its MAUI companion)
into running applications, and composes every conference module into one shell. Two application
shapes are built from the same component set: a Blazor Web app (Server prerender plus a
WebAssembly client) and a .NET MAUI Blazor Hybrid native app for Android, iOS, macOS (Catalyst),
and Windows. The types this group owns are deliberately thin: the MAUI-only services
(AppActionRouteMap, AppActionsInitializer,
AppActionTitleRefresher, and the DEBUG-only
DevelopmentCertificatePolicy), the MAUI-head composition and native entry surfaces (DeviceUIModule,
WebAuthenticatorCallbackActivity,
NowNextWidgetProvider with its local
NowNextSnapshot and NowNextSession records), and the MAUI
bootstrap chain (MauiProgram, the cross-platform App,
MainPage, and the per-OS entry points MainActivity,
MainApplication, AppDelegate with its iOS window-scene
partner SceneDelegate, the iOS Program, and the WinUI
App). The heavy lifting lives below them in the
modules, in MMCA.Common.UI, and in the
device-capability layer; this chapter is about wiring and
hosting, the half of "UI architecture" the modules cannot do for themselves. File paths in this
chapter are given as the unit table gives them, relative to MMCA.ADC/Source/Hosts/UI/.
Three hosts, one shared component set. The central idea, taught in
primer §2, "Write-once UI, render everywhere",
is that a page is authored once as a Razor component in a module's UI library and then rendered
by every host without per-platform reimplementation. There are three host projects under
MMCA.ADC/Source/Hosts/UI/: MMCA.ADC.UI.Web (the Blazor Server host, SSR prerender plus the
interactive Server circuit), MMCA.ADC.UI.Web.Client (the Blazor WebAssembly client, compiled
to run in the browser), and MMCA.ADC.UI (the .NET MAUI host, which packages the same
components into a native app and renders them in a BlazorWebView). Read the three composition
roots side by side (MMCA.ADC.UI.Web/Program.cs:25-160, MMCA.ADC.UI.Web.Client/Program.cs:22-80,
MMCA.ADC.UI/MauiProgram.cs:47-207) and the family resemblance is obvious: the same MudBlazor
registration, the same AddUIShared(...) (on the Server head both run inside the framework's
composed AddMmcaBlazorWebHost call,
MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:98-107,
invoked at MMCA.ADC.UI.Web/Program.cs:27), the same four conditional module registrations, then a
short tail of host-specific adapters. The Server head is the shortest of the three because the
registration and pipeline order every Blazor web head shares lives in that framework package, and
the file keeps only what ADC decides (MMCA.ADC.UI.Web/Program.cs:8-10). [Rubric §18, UI Architecture] assesses
cohesive, composable components and a clean host/shell split; [Rubric §22, Responsive & Cross-Browser/Device] assesses that one UI renders correctly across browsers and devices. Both are
embodied by this single-component-set, multi-host design: adding a platform is "add a host that
references the shared libraries", not "fork the UI". The MAUI head makes the point literally in
XAML: its BlazorWebView mounts the shared MMCA.Common.UI Routes component at #app
(MMCA.ADC.UI/MainPage.xaml:17-21), the same router the browser heads run.
The shared-vs-host boundary: interfaces in Common, implementations per host. The reason one
component can run in three places is that everything platform-specific hides behind interfaces
declared in MMCA.Common.UI. A component never asks "am I on
MAUI?"; it asks an injected abstraction, and each host supplies the adapter. [Rubric §1, SOLID]
(Dependency Inversion) and [Rubric §3, Clean Architecture] are visible right here: the shared
library defines the contracts, the host supplies the adapters, and the framework depends on nothing
host-specific. Home-page content:
IHomePageContent lets the shared / route
render an app-specific landing page, and all three heads register the same
ADCHomePageContent from Conference's UI library
(web MMCA.ADC.UI.Web/Program.cs:79 and MMCA.ADC.UI.Web.Client/Program.cs:42, MAUI
MMCA.ADC.UI/MauiProgram.cs:133). Token storage:
ITokenStorageService abstracts where JWTs
live, and each head picks its implementation in one line: AddCommonMauiTokenStorage() on MAUI
(MMCA.ADC.UI/MauiProgram.cs:172, backed by the framework's
SecureStoreTokenStorageService
over the MauiSecureTokenStore adapter,
MMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/DependencyInjection.cs:137-140),
AddCommonServerTokenStorage() on the Server head (inside the composed call,
MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:134, backed by
ServerTokenStorageService), and an
explicit WasmTokenStorageService
registration in the browser client (MMCA.ADC.UI.Web.Client/Program.cs:45). The refresher behind
ITokenRefresher splits the same way: the two
browser heads use
SameOriginProxyTokenRefresher
(BlazorWebHostExtensions.cs:141, MMCA.ADC.UI.Web.Client/Program.cs:46) while MAUI, which has no
same-origin proxy to lean on, uses
DirectApiTokenRefresher
(MMCA.ADC.UI/MauiProgram.cs:173). OAuth button availability
(IOAuthUISettings) needs no head code at all:
AddUIShared itself TryAdds
ConfigurationOAuthUISettings over
the head's configuration
(MMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:257), as the comments on
both the MAUI and the Server head record (MMCA.ADC.UI/MauiProgram.cs:89-91,
MMCA.ADC.UI.Web/Program.cs:77-78). The device-capability layer
(IDeepLinkDispatcher and its siblings,
AddBrowserDeviceCapabilities() on the web heads versus UseMauiDeviceCapabilities() on MAUI) works
the same way and is described in Group 15 and the
Group 26 device-capability layer.
Registration order is load-bearing. A detail worth internalizing before reading any host's
composition root: AddUIShared installs its defaults with TryAdd, so an override must be
registered either before it (to pre-empt the TryAdd) or after it (so "last registration
wins"). MauiProgram states the whole contract once, as a numbered comment block
above the registration sequence, so the per-call comments can stay short
(MMCA.ADC.UI/MauiProgram.cs:72-85). Clause one: everything that overrides a shared null/neutral
default goes after AddUIShared, which covers AddCommonMauiAppUserAgent(), which
appends a handler to the APIClient that AddUIShared registers so every API call carries an app
User-Agent and the signed-in devices list can name the device (MauiProgram.cs:93-97),
UseMauiDeviceCapabilities(...) (MauiProgram.cs:108), the push token providers
AddMauiPushDeviceTokenProvider()
(ADR-044,
MauiProgram.cs:131), UseCommonBarcodeScanner(...) for badge-check-in QR scanning
(MauiProgram.cs:162-164), and AddBrowserDeviceCapabilities() on the web heads
(MMCA.ADC.UI.Web.Client/Program.cs:37, and inside the Server head's composed call at
MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:107-109).
Clause two: a module that registers its own default with a plain Add must be beaten the same way,
which is why AddCommonMauiPublicLinkBuilder() (the framework's MAUI
IPublicLinkBuilder, so a copied link points
at the public web site rather than at the WebView origin) stays after every module registration
(MauiProgram.cs:148-152). The opposite direction, registering before a TryAdd so it becomes a
no-op, is how the Blazor host's composed call wires its dynamic Content-Security-Policy provider:
AddCommonBlazorCsp(), backed by
BlazorCspPolicyProvider, is registered
before AddCommonSecurityHeaders(...), whose static default is a TryAdd
(BlazorWebHostExtensions.cs:155-157), feeding the framework's
SecurityHeadersMiddleware over the
ICspPolicyProvider boundary. Two calls
in the sequence are ordering-insensitive, and their comments say so. UseMmcaMauiErrorHandling()
(MauiProgram.cs:110-115) installs last-chance AppDomain.UnhandledException and
TaskScheduler.UnobservedTaskException handlers at build time so an uncaught managed exception is
logged rather than silently killing the app, and AddInAppDiagnostics() (MauiProgram.cs:117-122)
adds an in-memory logger provider holding the last 500 Information-or-above entries, so a store build
(where the Debug logger is compiled out) still has a log the attendee can copy or share from Device
settings, with nothing written to disk or sent unless the user shares it. Together they are a small
but real [Rubric §13, Observability & Operability] contribution on a platform with no server-side
log sink.
Which modules are in the build is configuration, not code. All three heads gate every module UI
behind
UIModuleConfiguration.IsModuleEnabled
(MMCA.ADC.UI/MauiProgram.cs:136-146, MMCA.ADC.UI.Web/Program.cs:85-95,
MMCA.ADC.UI.Web.Client/Program.cs:52-62), reading the Modules section (all four enabled in the
MAUI head's embedded settings, MMCA.ADC.UI/appsettings.json:8-13), so a deployment can ship
Conference-only, or Conference plus Engagement, without touching source. That is the client-side
mirror of the server-side module system in Group 14: each
enabled module contributes its IUIModule descriptor,
and the shell composes nav items, routable assemblies, and layout components from whatever is
registered. On the web host the composition is explicit at the end of Program.cs: the framework's
GetMmcaRazorComponentAssemblies concatenates MMCA.Common.UI, MMCA.Common.UI.Web (the shared
SSR error page) and the WASM client assembly with every registered IUIModule's Assembly,
deduplicated with the first occurrence kept
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:228-246),
and the head hands that list to MapRazorComponents<App>().AddAdditionalAssemblies(...)
(MMCA.ADC.UI.Web/Program.cs:154-158). This is the group's cleanest
[Rubric §15, Best Practices & Code Quality] and [Rubric §25, Navigation, Routing & IA] moment: routes and
navigation are discovered from the enabled module set rather than maintained in a central list.
The landing page has no host code. The conference landing page is not owned by this group,
and neither is the adapter that points the shared / route at it: ADCHome and
ADCHomePageContent both live once in Conference's
UI library and are documented in Group 21. One adapter beside
the page serves every head, and the page's editorial image ships once as a static web asset of that
library (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.UI/Pages/Home/ADCHomePageContent.cs:5-11).
The adapter names the component (ADCHomePageContent.cs:14) and returns the page title, "Atlanta
Developers Conference", with an explicit // i18n: allow comment that marks the brand name as a
deliberate localization exemption (ADCHomePageContent.cs:17,
ADR-027). What is left in the
hosts is one identical AddSingleton<IHomePageContent, ADCHomePageContent>() line per head, which is
a good measure of how far the write-once story actually goes.
The MAUI bootstrap chain
(ADR-042). Every
platform entry point does nothing but call MauiProgram.CreateMauiApp():
MainApplication on Android
(MMCA.ADC.UI/Platforms/Android/MainApplication.cs:17), AppDelegate plus the iOS
Program on iOS (MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:19,
MMCA.ADC.UI/Platforms/iOS/Program.cs:10-11), and the WinUI App on Windows
(MMCA.ADC.UI/Platforms/Windows/App.xaml.cs:16), while MainActivity is the
Android launcher activity (MMCA.ADC.UI/Platforms/Android/MainActivity.cs:25-29). CreateMauiApp
(MMCA.ADC.UI/MauiProgram.cs:47) builds the entire DI and configuration graph. It first composes
the MAUI builder chain itself, registering the app type, the CommunityToolkit required by the
ADR-042 speech-to-text capability, the OpenSans font, and the OnAppAction handler
(MauiProgram.cs:49-59). Because MAUI does not auto-load appsettings.json from disk, it next
reads the file from an embedded resource and layers it into the builder's configuration
(MauiProgram.cs:61-70). Then come the BlazorWebView and MudBlazor services
(MauiProgram.cs:86-87), the shared UI (MauiProgram.cs:91), the audit-history client
(MauiProgram.cs:100), the native capabilities (MauiProgram.cs:108), the home content
(MauiProgram.cs:133), the module UIs (MauiProgram.cs:136-146), and the MAUI flavors of the
token, refresh, and auth-state services (MauiProgram.cs:172-175). The native-capabilities call
also names the folder where a personal-data export is staged for the share sheet: the framework
empties it before each write and purges it at app start, and the head keeps the folder name earlier
versions used so their leftovers are purged too (MauiProgram.cs:102-108). The head also registers
its own two composition pieces: DeviceUIModule as an
IUIModule contributing the Device settings
NavItem plus five layout components (the shared
DeepLinkListener, BiometricGate, PushRegistrationListener and NativeThemeSync, and the
head's own AppActionTitleRefresher)
(MauiProgram.cs:168, MMCA.ADC.UI/DeviceUIModule.cs:68-78), and
AppActionsInitializer as an IMauiInitializeService that sets localized
home-screen quick actions after build (MauiProgram.cs:169). The cross-platform App
(MMCA.ADC.UI/App.xaml.cs:9) creates the single window hosting MainPage, titled
"AtlDevCon" for the Windows title bar and the Mac Catalyst window chrome, the same name the csproj
gives the installed app (App.xaml.cs:11-13,24, pinned by
MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Ui/MauiHostShellTests.cs:226), and,
before returning it, attaches that window to the framework's shared
app-lifecycle notifier (App.xaml.cs:37-41). That forwarding is what lets the app-lock overlay
re-arm: a hybrid head keeps its Blazor render tree alive across a background and foreground cycle,
so without it the biometric gate engages once at first render and never again, and anyone handed the
unlocked device reopens straight into the signed-in session (App.xaml.cs:26-32). The service
lookup is written defensively, the handler's MauiContext first and IPlatformApplication.Current
as the fallback, so a window created before the app handler exists cannot take the whole head down
over a lock that would simply stay armed (App.xaml.cs:34-41). And
MainPage (MMCA.ADC.UI/MainPage.xaml.cs:12) is a two-member class: InitializeComponent() and a
HostWebView override returning the XAML-declared BlazorWebView
(MMCA.ADC.UI/MainPage.xaml.cs:14,17). Everything about the platform back gesture lives in the
framework base MainPageBase
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/MainPageBase.cs:21), which consumes the
gesture (MainPageBase.cs:216-221), forwards it to the WebView's own history through
MauiBackNavigationBridge
(MainPageBase.cs:255), and quits only when the WebView reports it is at the root
(MainPageBase.cs:256-259). [Rubric §25, Navigation, Routing & IA] shows up in that bridge: native
back must map onto in-app navigation, not OS app-switching, or the native experience feels broken.
MainActivity's ConfigurationChanges attribute (MainActivity.cs:29) is the other native
subtlety: it stops Android from destroying the activity (and with it the Blazor render tree and all
component state) on rotation or a dark-mode toggle. Its OnCreate also turns on edge-to-edge
drawing on every Android version, not only on API 35 and later where the system enforces it, with
transparent system bars and light status-bar icons, and does so after base.OnCreate because MAUI
swaps the splash theme for the main theme inside that call (MainActivity.cs:52-64).
Native entry surfaces all funnel into one dispatcher
(ADR-042 /
ADR-043).
Several MAUI-head types exist for one purpose: to bring the platform's native entry points back into
the same in-app navigation the WebView already runs. MainActivity declares an
IntentFilter for verified Android App Links (https URLs on the pinned public web host,
MainActivity.cs:30-36,45) that claims only the deep-linkable path prefixes, the same set the iOS
applinks declare, so any other page on the host (such as /login) stays in the browser
(MainActivity.cs:15-17,35), plus a second filter for the Essentials app-action intent
(MainActivity.cs:37-39). Both OnCreate and OnNewIntent hand the intent to the framework's
PlatformDeepLinks.TryPublish (MainActivity.cs:71,93), which ignores anything but an
ACTION_VIEW intent, drops the scheme and host, composes the encoded path, query and fragment into
a route through DeepLinkDispatcher.TryComposeRoute, and publishes it to
IDeepLinkDispatcher
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/Capabilities/Navigation/PlatformDeepLinks.cs:17,30-39).
A route that is not app-relative is dropped silently rather than thrown out of the platform callback
(PlatformDeepLinks.cs:6-11): the activity is exported and MainLauncher, so any app on the device
can hand it an explicit ACTION_VIEW intent that bypasses the manifest filters' scheme and host,
and the route shape check (in
DeepLinkDispatcher) is what keeps such a
link inside the app origin (PlatformDeepLinks.cs:25-29). Dropping the host is also what lets the
app's own widget tap through on a placeholder host
(MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:85-88). Two
lifecycle details keep a link from replaying or going stale: OnCreate publishes only on a fresh
launch, because a restore after process death carries the original, already-delivered launch intent
(MainActivity.cs:66-72), and OnNewIntent replaces Activity.Intent with the link being handled
so a later recreation reads that one (MainActivity.cs:89-91). Its OnResume and OnNewIntent
overrides also forward to EssentialsPlatform so a cold-start shortcut tap actually raises
OnAppAction (MainActivity.cs:76-82,92). On iOS the same two jobs live on
SceneDelegate, not on the app delegate: the head runs the UIKit scene life
cycle, which apps built against the iOS 27 SDK must adopt, and under it UIKit stops calling the app
delegate's continueUserActivity and performActionForShortcutItem hooks
(MMCA.ADC.UI/Platforms/iOS/SceneDelegate.cs:8-27). The Info.plist scene manifest names the class
for the default scene configuration (MMCA.ADC.UI/Platforms/iOS/Info.plist:40,51-52). A running app
receives a Universal Link in ContinueUserActivity, which hands a browsing-web activity's
WebPageUrl to the iOS overload of the same helper and falls through to the base handler when it
declines, so a crafted link cannot throw out of a UIKit callback (SceneDelegate.cs:50-59,
PlatformDeepLinks.cs:52-66); a cold launch delivers the link in the connection options of
WillConnect, which publishes the first browsing-web activity that succeeds and forwards a launch
shortcut item to Essentials (SceneDelegate.cs:30-47); and PerformAction forwards a running
app's shortcut tap to Essentials with the completion handler attached (SceneDelegate.cs:62-69).
What stays on AppDelegate is application-level: the CreateMauiApp override
(MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:19) and the two fixed UIKit selectors that publish the
APNs device token (or a null on failure) into the framework's ApnsTokenBridge
(AppDelegate.cs:27-34,
ADR-044). The custom-scheme
OAuth completion redirect (atldevcon://) lands on
WebAuthenticatorCallbackActivity
(MMCA.ADC.UI/Platforms/Android/WebAuthenticatorCallbackActivity.cs:14-21) so MAUI's
WebAuthenticator can resume the pending social-login flow. Home-screen quick actions are split
across three types on purpose:
AppActionsInitializer owns the platform half (checking
AppActions.Current.IsSupported, resolving the localizer, and setting the actions
fire-and-forget so startup can never block on them, MMCA.ADC.UI/Services/AppActionsInitializer.cs:26-40;
its shared SetActionsAsync builds the three localized actions and swallows a launcher's runtime
FeatureNotSupportedException, AppActionsInitializer.cs:49-66), while
AppActionTitleRefresher is a render-nothing component that calls the
same SetActionsAsync once per WebView boot, because an in-app language switch reloads only the
WebView and the launcher shortcuts would otherwise keep the old language until the next cold start
(MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:6-13,22-31), and
AppActionRouteMap owns the pure id-to-route mapping and references no
Microsoft.Maui.* API at all (MMCA.ADC.UI/Services/AppActionRouteMap.cs:22,49-63).
MauiProgram.HandleAppAction calls AppActionRouteMap.RouteFor(action.Id) and publishes the result
into the same dispatcher (MauiProgram.cs:221-234). The Android home-screen
NowNextWidgetProvider is a self-contained, best-effort surface: on each
update it fetches the anonymous Events/now-next snapshot into its local
NowNextSnapshot and NowNextSession records
(MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:107-126,130,132), renders one "Now" and
one "Next" line, and taps back into MainActivity's deep-link path
(NowNextWidgetProvider.cs:85-96); it never throws, keeping the last rendered content on any
failure (NowNextWidgetProvider.cs:57-62), which with the widget's own 8-second HTTP timeout
(NowNextWidgetProvider.cs:117) is a compact [Rubric §29, Resilience] statement about an optional
surface. The web side of the link association is served by the Blazor host, which maps the App Links
and Universal Links association documents from configuration
(MMCA.ADC.UI.Web/Program.cs:135-146), and the applinks components mirror the same Blazor routes
the app uses: identical URLs on web and device, no route translation table.
Testability of a head that has no test project. No MAUI target framework in this workspace has a
test project, so the ordering contract inside MauiProgram is pinned from outside: the
architecture test MauiHostShellTests reads the file as text and asserts both clauses, the
overrides after AddUIShared and the public link builder after every Add*UI module call, and the
file says so (MMCA.ADC.UI/MauiProgram.cs:81-85,
MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Ui/MauiHostShellTests.cs:202). The rule
that goes with it: anything expressible without a MAUI type belongs outside the MAUI-targeted
file. AppActionRouteMap is the first worked example. It is deliberately
MAUI-free (AppActionRouteMap.cs:9-20), which lets it compile under a plain .NET target, and it is
linked into MMCA.ADC.Engagement.UI.Tests as a <Compile Include> item and asserted directly
(MMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/MMCA.ADC.Engagement.UI.Tests.csproj:26,
MMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/Services/AppActionRouteMapTests.cs:22-43).
DevelopmentCertificatePolicy is the second: the DEBUG build's
certificate rule touches no MAUI API, so it is linked into the same project
(MMCA.ADC.Engagement.UI.Tests.csproj:27) and its four behaviors (a development address may use an
untrusted certificate, a public host keeps full validation, a valid certificate passes for any host,
an unknown sender is refused) are asserted there
(MMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/Services/DevelopmentCertificatePolicyTests.cs:29,46,54,62).
Its route constants come from the modules' own published path constants
(EngagementRoutePaths and
NotificationRoutePaths,
AppActionRouteMap.cs:58-60), with one literal for the "my schedule" case because it is the session
list route carrying a mine=true filter rather than a route of its own
(AppActionRouteMap.cs:33-38). [Rubric §14, Testability] is exactly this: pushing the decidable
logic out of an untestable host so it can be asserted where a test runner exists.
Host security: platform-appropriate token handling. The token-storage choices are a compact
study in secret handling matched to the threat model. On the browser heads the high-value refresh
token is never exposed to JavaScript: it stays in an HttpOnly cookie and is exchanged through a
same-origin proxy refresher
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:141-142,
MMCA.ADC.UI.Web.Client/Program.cs:46), and the Server head's composed host additionally runs a
cookie-backed SSR authentication scheme,
SessionCookieAuthenticationHandler, plus an
SSR cookie-refresh step ahead of authentication, so [Authorize] component routes survive F5
and open-in-new-tab (BlazorWebHostExtensions.cs:128-129,203-205). On MAUI, which has no DOM and
therefore no XSS surface, the framework's
MauiSecureTokenStore stores both
tokens in OS SecureStorage (MMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/Services/MauiSecureTokenStore.cs:22-25), the platform secure enclave (Android Keystore, iOS Keychain, Windows
DPAPI). [Rubric §11, Security] (at-rest secret handling) and [Rubric §26, Front-End Security] (no
token reachable from page JS) are both directly embodied; the deeper design note is
MMCA.ADC/TokenStorageDesignNote.md. One deliberate development-only relaxation lives in
MauiProgram: a #if DEBUG block installs a SocketsHttpHandler (managed TLS, because Android's
native SSL layer rejects the dev cert before the .NET callback fires) whose certificate callback
defers to DevelopmentCertificatePolicy
(MauiProgram.cs:177-204), so a Debug build on the LAN or the emulator can reach a gateway on the
ASP.NET dev cert. The relaxation is narrow even inside DEBUG: a certificate that validates is always
accepted, and a failing one only when the host is a development address (localhost, loopback, the
RFC 1918 private IPv4 ranges including the emulator's 10.0.2.2, IPv4 link-local, or IPv6 link-local
and unique-local), while a host name other than localhost never qualifies, so DNS cannot steer a
public name onto the relaxed rule and every public host, the production gateway the embedded
settings name included, keeps full TLS validation
(MMCA.ADC.UI/Services/DevelopmentCertificatePolicy.cs:14-18,33-34,49-82). The same comment block
records that this second AddHttpClient("APIClient") call only appends a primary-handler factory, so
the shared 90-second request budget registered by AddUIShared survives the override
(MauiProgram.cs:189-194).
Hardening the UI's own front door
(ADR-088). The
Blazor host is a separate externally reachable origin from the YARP Gateway, with its own
Container Apps FQDN, so the Gateway's edge rate limiter never sees a single request to the page a
browser actually loads
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:10-16).
Two ceilings close that gap. Neither is owned by this group: both ship in the framework's
MMCA.Common.UI.Web package as a UI-host kit distinct from the one in MMCA.Common.Gateway, because
that package is the reverse-proxy kit and a Blazor host is not a reverse proxy
(UiRateLimitingSettings.cs:17-25), and they are documented with the rest of the framework UI in
Group 15. What this host owns is the numbers; the framework's composed host does the wiring. The
first ceiling is an edge rate limiter:
UiRateLimitingExtensions chains a
per-client-IP fixed window with a replica-wide concurrency ceiling so a request must satisfy both, and
rejects with 429 without queuing
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:146-154,179-184,214,233-237).
The framework defaults in
UiRateLimitingSettings are 300 requests
per IP per 60-second window and 200 in flight per replica, and the type's own remarks tell a host
whose audience sits behind one address to raise the window (UiRateLimitingSettings.cs:45-76). ADC
does exactly that: 1200 requests per IP per 60-second window, four times the storefront's figure,
because on conference day the whole venue sits behind one NAT and presents to the limiter as a
single client IP, while the in-flight ceiling stays at 200
(MMCA.ADC.UI.Web/appsettings.json:15-24). Both counts are per process, so the effective allowance
is multiplied by the replica count, the same deliberate trade the Gateway kit documents: an edge
limiter answers on every request and a shared counter would put a network round trip in front of the
whole site (UiRateLimitingSettings.cs:26-31). The section is bound, data-annotation validated, and
validated on start (UiRateLimitingExtensions.cs:203-204). The exemptions are the interesting part:
the liveness and readiness probes, /_framework, /_content, and /hubs (plus the proxied hub
prefix) take the no-limiter partition, so the static assets a single page load pulls never throttle
the first attendee, while /_blazor is deliberately left unexempt from the per-IP window because the
negotiate endpoint is exactly what opens a circuit; it is kept out of the concurrency ceiling only,
because the same prefix carries the circuit WebSocket, whose permit would otherwise be held for the
whole circuit lifetime (UiRateLimitingExtensions.cs:58,71-74,80-82,177). An unresolvable client IP
fails open rather than collapsing every unattributable request into one shared bucket
(UiRateLimitingExtensions.cs:135-140). The host does not register it itself: the composed
AddMmcaBlazorWebHost call does
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:96), and the
composed pipeline places the middleware after the forwarded headers, so the partition key is the
caller's address and not the ingress's, and before anything that renders a page or opens a circuit
(BlazorWebHostExtensions.cs:185-187, invoked at MMCA.ADC.UI.Web/Program.cs:120, or :122 on the net10.0 line).
Bounding circuits, not just arrival rate. The second ceiling bounds resident state. Because
the app renders Interactive Auto, every first page load opens a Blazor Server circuit, and a circuit
stays resident for as long as the connection lives, so a caller who opens circuits slowly enough to
stay inside the rate window still accumulates them; CircuitOptions cannot express the limit,
because its DisconnectedCircuit* settings bound only circuits that have already dropped their
connection
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:9-16).
The framework's BoundedCircuitHandler is
therefore a CircuitHandler that counts opens and closes and refuses anything past
BlazorCircuitLimitSettings.MaxActiveCircuits,
200 per replica by default, derived from the 0.25 vCPU / 0.5 GiB container a Blazor UI host typically
runs in and explicitly an abuse ceiling rather than a capacity plan
(BlazorCircuitLimitSettings.cs:22-38). ADC keeps the 200 and its configuration records why that is
generous: the busiest measured conference day peaked near 67 concurrent users
(MMCA.ADC.UI.Web/appsettings.json:25-31). The handler increments first and rolls back on refusal,
so two simultaneous opens cannot both observe the last free slot, and it returns a faulted task
because OnCircuitOpenedAsync has no "refuse" return value: the one place in this codebase where the
Result pattern gives way to an
exception, because the contract being implemented belongs to ASP.NET Core
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:64-84,
rationale at BoundedCircuitHandler.cs:24). Closes floor at zero, so a teardown that was never
counted cannot hand out permits forever (BoundedCircuitHandler.cs:88-108), and the refusal is logged
through a source-generated LoggerMessage (BoundedCircuitHandler.cs:111).
BlazorCircuitLimitExtensions wires
both halves from that one configuration section, deliberately as two calls because they attach to
different builders: RetentionFrom(...) supplies the CircuitOptions callback for
AddInteractiveServerComponents, while AddBoundedBlazorCircuits() registers the handler as a
singleton, since circuit handlers resolve from each circuit's own scope and a scoped registration
would count to one and cap nothing
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitExtensions.cs:28-40,46-60,
wired by the composed host at
MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:91-95, which
the head's own comment records at MMCA.ADC.UI.Web/Program.cs:51-55). The retention numbers are where this host departs
from the framework defaults: 25 retained disconnected circuits (the framework kit's own default,
against ASP.NET Core's 100), but a retention period of 180 seconds instead of the kit's 60, because
the kit's remarks name a conference venue's flaky shared network as exactly the case that raises it
back towards ASP.NET Core's three minutes (BlazorCircuitLimitSettings.cs:40-57,
MMCA.ADC.UI.Web/appsettings.json:28-32). Unlike the MAUI head, this host does have a test
project, and both ceilings are asserted there against the real composition root: the tightened
circuit limits the host binds
(MMCA.ADC/Tests/Hosts/MMCA.ADC.UI.Web.Tests/BoundedCircuitHandlerTests.cs:24), and the edge
limiter's shedding of a burst past the window, its pass-through of exempt paths, and the
conference-day window it carries
(MMCA.ADC/Tests/Hosts/MMCA.ADC.UI.Web.Tests/UiRateLimitingTests.cs:29,60,81).
[Rubric §11, Security] and [Rubric §29, Resilience] both read on this pair: the availability of
the one origin a user actually types is a security property, and shedding load is how a 0.25 vCPU
container survives a flood instead of OOM-restarting under it.
Localization and theming of the shell
(ADR-027 /
ADR-028). All three heads share one
localization stance and each implements its own half of it. The Blazor Server host's composed
pipeline sets the request culture from the culture cookie before SSR prerender and maps a
culture-switch endpoint
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:201,214);
the WASM client mirrors the same cookie into the browser thread culture through
MmcaCultureBootstrap before the app runs,
so there is no locale flash or prerender/hydration mismatch
(MMCA.ADC.UI.Web.Client/Program.cs:66-71). On MAUI the same convention flows into composition:
DeviceUIModule declares its nav item with a resource key and a
TitleResource type rather than a literal (MMCA.ADC.UI/DeviceUIModule.cs:66-71),
AppActionsInitializer resolves quick-action titles through an
IStringLocalizer before handing them to the OS
(MMCA.ADC.UI/Services/AppActionsInitializer.cs:35,53-58), and
AppActionTitleRefresher sets them again under the newly applied
culture after an in-app language switch reloads the WebView
(MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:22-31). The handful of strings that must
resolve before Build() (so before any service provider or IStringLocalizer exists) are read by
MauiProgram straight from a ResourceManager over the co-located MauiProgram.resx pair
(MMCA.ADC.UI/MauiProgram.cs:40-41,218-219). [Rubric §27, Internationalization & Localization]
assesses externalized strings and culture-aware formatting; the rule this codebase follows is
"localize the chrome, exempt the branded and editorial data on purpose, and mark the exemption in
source", which is exactly what the shared ADCHomePageContent adapter does with the conference brand
name. Theming crosses the same boundary on MAUI: DeviceUIModule's layout list includes the shared
NativeThemeSync component so MAUI's own AppTheme follows the in-app Blazor theme preference
instead of tracking the OS independently (DeviceUIModule.cs:29-30, :33). That component is also the
only place the theme is persisted: App deliberately keeps no mirror of its own, because
NativeThemeSync saves the choice natively on every change and
MainPageBase applies it before the page's
first frame, whereas a mirror written only on sleep went stale after a quick kill and relaunched
into the previous theme (MMCA.ADC.UI/App.xaml.cs:15-19). MainPage.xaml pins the
pre-paint native page background to the light and dark surface colors with an AppThemeBinding so
nothing flashes white before the WebView renders (MMCA.ADC.UI/MainPage.xaml:8,10-15).
How it all fits at runtime. A request to the Blazor Web host passes forwarded headers, the
shared security-header middleware and this origin's own edge limiter
(MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:185-187),
then renders the shared layout from
MMCA.Common.UI; the navbar is composed from each enabled
module's IUIModule descriptor, and / renders the Conference landing page through
ADCHomePageContent. After prerender, the interactive Server circuit or the
downloaded WASM runtime takes over; auth state flows through
JwtAuthenticationStateProvider
reading whichever ITokenStorageService the
host registered, and the WASM client discovers its API endpoint at startup from the Server host's
/client-config endpoint instead of having it baked into the static bundle (mapped by the composed
pipeline, BlazorWebHostExtensions.cs:211, with ADC's own extras at
MMCA.ADC.UI.Web/Program.cs:162-167; read at MMCA.ADC.UI.Web.Client/Program.cs:29-30), with exactly one
retry on a cold start and a loud failure after that through the framework's
MmcaClientConfigBootstrap
(MMCA.ADC.UI.Web.Client/Program.cs:24-30), and a discarded
TokenHydrationWarmup warm-up overlapping
first render (MMCA.ADC.UI.Web.Client/Program.cs:73-78). On MAUI the same component tree runs inside a
BlazorWebView with SecureStorage-backed tokens, the framework back-button bridge, App Link and
Universal Link entry, OAuth callback resumption, quick actions, and the home-screen widget, all
funneled into one deep-link dispatcher. In every case the application talks to the backend only
through the YARP Gateway: the same boundary that makes the modules independently extractable
(ADR-007 gRPC extraction,
ADR-008
service-extraction topology) also makes the UI host-agnostic. The client points at one origin
(Api:ApiEndpoint, pinned in the MAUI head's embedded MMCA.ADC.UI/appsettings.json:35-36), and
the Gateway routes to whichever service owns the endpoint. That is the unifying theme of this
chapter: thin hosts over shared components, talking to one gateway, with every platform difference
pushed behind a Common interface.
NowNextSession
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:132· Level 0 · record (sealed, private)
- What it is: a tiny wire-shape record for one session row rendered by the Android home-screen widget:
Title, an optionalRoomName, and aStartsAtLocaltimestamp. It is a private nested type of NowNextWidgetProvider, declared at the very bottom of that file. - Depends on: only the BCL (
string,DateTime). No first-party types. - Concept introduced, the local mirror of a server DTO. The widget deliberately does not reference the
MMCA.ADC.Conference.Sharedassembly just to deserialize one payload; instead it declares its own record whose property names match the JSON the server sends. The inline comment atMMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:128-129states exactly that.System.Text.Jsonpopulates it by name from theEvents/now-nextresponse, whose server-side shape is NowNextDTO (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.Shared/Sessions/NowNextDTO.cs). The coupling is by property name only, which is the price of the decoupling. - Walkthrough: the positional record (
MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:132) is consumed only byFormatRow(:100-107), which formatsStartsAtLocalasHH:mmunderCultureInfo.InvariantCulture(:102), appends the room in parentheses when it is non-blank (:103), and adds a+Nsuffix when more than one session shares the slot (:104). - Why it's built this way: keeping the widget's dependency surface to the BCL plus the Android SDK avoids pulling a module-shared contract assembly into a
BroadcastReceiverthat runs in a minimal process. The property-name coupling to the server DTO is the trade-off, documented inline rather than left implicit. - Where it's used: the
NowandNextlists on NowNextSnapshot; read byNowNextWidgetProvider.BuildViewsandFormatRow.
NowNextSnapshot
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:130· Level 1 · record (sealed, private)
- What it is: the deserialized
Events/now-nextpayload the widget renders: anEventName, anIsLiveflag, and two lists of NowNextSession (NowandNext). Like its sibling it is a private nested record on NowNextWidgetProvider. - Depends on: NowNextSession; BCL
List<T>,string,bool. - Concept introduced: reuses the local mirror of a server DTO idea introduced by NowNextSession (the shared comment at
MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:128-129covers both records). No new pattern. - Walkthrough: produced by
FetchSnapshotAsyncviaJsonSerializer.Deserialize<NowNextSnapshot>(json, JsonSerializerOptions.Web)(MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:124), which applies the web (camelCase) naming policy so the record's PascalCase members bind to the server's JSON.BuildViews(:67-98) readsEventNameinto the header text view (:70) and takes the first entry ofNowandNext, substituting a localized "nothing scheduled" string for an emptyNowlist and an empty string for an emptyNextlist (:76-81). - Why it's built this way: one flat record keeps the deserialize-then-render path allocation-light and independent of the Conference module contracts.
- Where it's used: returned by
NowNextWidgetProvider.FetchSnapshotAsync; consumed byNowNextWidgetProvider.BuildViews. - Caveats / not-in-source:
IsLiveis declared on the record (:132) and deserialized, but no code path in this file reads it; whether a future render uses it is not determinable from source. Note also that the NowNextSnapshot in the Engagement module is an unrelated same-named type, not this one.
MainPage
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/MainPage.xaml.cs:12· Level 3 · class (partial)
- What it is: the single MAUI content page that hosts the
BlazorWebViewcontrol declared in the paired XAML. It is a six-line class body: it derives from the framework's MainPageBase and hands it the WebView instance to work with. - Depends on: MainPageBase from
MMCA.Common.UI.Maui(base class,MMCA.ADC.UI/MainPage.xaml.cs:2,12) andMicrosoft.AspNetCore.Components.WebView.Maui.BlazorWebView(:1,17). - Concept introduced, bridging a native gesture into Blazor navigation. In a Blazor Hybrid host the OS back button is a native event, but the user's mental model of "back" is a route change inside the WebView. The class summary records the contract (
MMCA.ADC.UI/MainPage.xaml.cs:6-11): the platform back-button gesture (Android hardware back, iOS swipe) is handled by MainPageBase, which forwards it to the WebView's internal history stack and exits the app only when the WebView has nowhere left to go. [Rubric §25, Navigation & IA] assesses whether the app presents one coherent navigation model: a single back affordance drives in-app history instead of dumping the user out of the app. [Rubric §15, Best Practices & Code Quality] applies to the shape of this file: the back-navigation mechanism lives once in the shared framework package and every app head contributes only its WebView reference. - Walkthrough: two members. The constructor (
MMCA.ADC.UI/MainPage.xaml.cs:14) is an expression body callingInitializeComponent().HostWebView(:17) is the one member the base requires an override for, returning theblazorWebViewfield generated from the paired XAML. That is the entire class: no event handlers, no interop, no lifecycle overrides. - Why it's built this way: the back-gesture handling was hoisted into
MMCA.Common.UI.Mauiso both the framework's own hybrid heads and this app share one implementation. Reducing the app-side page to aHostWebViewproperty makes the extension point obvious and leaves nothing here to drift. - Where it's used: constructed by App as the content of the single window (
MMCA.ADC.UI/App.xaml.cs:15); it is the visual root on every platform head. - Caveats / not-in-source: the
blazorWebViewfield returned atMMCA.ADC.UI/MainPage.xaml.cs:17is generated from the pairedMainPage.xaml, which is not part of this file; the back-navigation logic itself lives in MainPageBase and is taught in Group 26.
App
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/App.xaml.cs:9· Level 4 · class (partial)
- What it is: the cross-platform MAUI
Applicationroot. It creates the single window that hosts MainPage, and therefore the Blazor WebView, titles it with the app's brand, and wires that window's background/foreground callbacks into the shared app-lock lifecycle. (The Windows head has its own separateAppclass deriving fromMauiWinUIApplicationatMMCA.ADC.UI/Platforms/Windows/App.xaml.cs:8, which forwards toMauiProgram.CreateMauiApp()at:16.) - Depends on: MainPage; MAUI's
Application,Window,IActivationState, andHandler.MauiContext.Services/IPlatformApplication.Current.Services(MMCA.ADC.UI/App.xaml.cs:37), to reach the DI-registeredIAppLifecycleNotifierbehindAttachMmcaAppLifecycle. - Concept introduced, the MAUI application object. One
Appper process owns the window graph. HereCreateWindow(MMCA.ADC.UI/App.xaml.cs:22) builds a singleWindowwrapping a freshMainPage, titled with theWindowTitleconstant (:24), then arms the app-lock overlay on it.WindowTitleis"AtlDevCon"(:13): the brand the Windows title bar and the Mac Catalyst window chrome show, and the same name the csproj'sApplicationTitlegives the installed app (comment at:11-12), which MauiHostShellTests pins together (WindowTitle_IsTheApplicationTitle,MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Ui/MauiHostShellTests.cs:226). Contrast this with the per-platform entry points (AppDelegate, MainApplication, Program), which boot the framework and then defer to this shared class. - Walkthrough: three members. The private
WindowTitleconstant (MMCA.ADC.UI/App.xaml.cs:13) is described above. The constructor (:19) is an expression body callingInitializeComponent()from the XAML-generated partial, and nothing else. The comment above it (:15-18) records whyAppno longer mirrors the Day/Dark theme: the framework'sNativeThemeSyncsaves the choice natively on every change, and MainPageBase applies it before the page's first frame and hands it to the WebView's pre-paint, whereas a mirror written only on sleep was stale after a quick kill, so a relaunch right after a switch painted the previous theme (Run 17 X-27).CreateWindow(IActivationState?)(:22-44) is the window override: it creates theWindow(:24), then forwards the window's background/foreground callbacks to the sharedIAppLifecycleNotifierviawindow.AttachMmcaAppLifecycle(services)(SEC-ADC-67, comment at:26-36, call at:40), which is what lets the app-lock overlay re-arm. A hybrid head keeps its Blazor render tree alive across a background/foreground cycle, so without this the biometric gate engaged once at first render and never again, letting anyone handed an unlocked device reopen it straight into the signed-in session;ReLockAfteris left at the framework default of 30 seconds, short enough that a device handed over mid-conference re-prompts and long enough that a glance at a notification does not (:30-32). The services lookup falls back fromHandler?.MauiContext?.ServicestoIPlatformApplication.Current?.Services(:37) and is guarded withif (services is not null)(:38-41), because a window created before the app handler exists must not take the whole head down over a lock that would simply stay armed (:34-36). There are no lifecycle overrides and no DI registration here; that all lives in MauiProgram. - Why it's built this way: keeping
Appto a single-window factory concentrates composition inMauiProgram, navigation inMainPage, and theme persistence in the framework, so the application root stays trivial and platform-agnostic; the app-lock wiring is attached defensively here becauseCreateWindowis the one place that owns the window instance the lifecycle notifier needs to observe. Naming the window title once as a constant gives the text-reading fitness test a single literal to compare with the csproj. - Where it's used: named as the app type in
builder.UseMauiApp<App>()(MMCA.ADC.UI/MauiProgram.cs:51); the MAUI framework instantiates it after each platform head callsCreateMauiApp().
SceneDelegate
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/iOS/SceneDelegate.cs:27· Level 5 · class
- What it is: the iOS window-scene delegate. It owns the two scene-level hooks of the iOS head: Universal Links (ADR-043), handed to the framework's
PlatformDeepLinkshelper, and home-screen quick actions (ADR-042 Wave 2), forwarded to Essentials, each on both the cold-launch and the running-app path. The application-level APNs callbacks stay on AppDelegate (class summary,MMCA.ADC.UI/Platforms/iOS/SceneDelegate.cs:8-25). - Depends on: MAUI's
MauiUISceneDelegate(MMCA.ADC.UI/Platforms/iOS/SceneDelegate.cs:27); the framework's staticPlatformDeepLinkshelper fromMMCA.Common.UI.Maui.Capabilities.Navigation(:2; defined atMMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/Capabilities/Navigation/PlatformDeepLinks.cs:17), which composes the route through DeepLinkDispatcher.TryComposeRouteand publishes it through IDeepLinkDispatcher; theMicrosoft.Maui.ApplicationModel.PlatformEssentials helper aliased asEssentialsPlatform(:4); andFoundation/UIKit. - Concept introduced, the UIScene life cycle. Apps built against the iOS 27 SDK must adopt UIScene or they abort at launch on iOS 27 (
:9-11). TheUIApplicationSceneManifestinMMCA.ADC.UI/Platforms/iOS/Info.plist:40-56names this class asUISceneDelegateClassName(:51-52) for MAUI's default scene configuration (:50) and declares a single window (UIApplicationSupportsMultipleScenesfalse,:42-43). Under that life cycle UIKit stops calling the app delegate'sapplication:continueUserActivity:andapplication:performActionForShortcutItem:(SceneDelegate.cs:11-13), and each event arrives twice over: on a cold launch inside theUISceneConnectionOptionspassed toWillConnect, and for a running app through a dedicated scene callback (:15-21). The product concept matches MainActivity's App Links but the plumbing differs: iOS delivers the tapped web URL as anNSUserActivityof typeBrowsingWeb. A second concept is ask before you publish: an exception escaping a UIKit callback terminates the app, so the delegate never calls the dispatcher's throwingPublishwith a raw route. It hands the URL toPlatformDeepLinks.TryPublish, whose shape check (SEC-ADC-65) drops a crafted link instead of throwing (:17-18). [Rubric §25, Navigation & IA] applies because deep links and shortcuts resolve to in-app routes on iOS exactly as on Android, through the same helper and dispatcher. - Walkthrough
WillConnect(UIScene, UISceneSession, UISceneConnectionOptions)(:30-47) runs the base first (:32), then walksconnectionOptions.UserActivities(:34-41) and publishes the firstBrowsingWebactivity whoseWebPageUrlPlatformDeepLinks.TryPublishaccepts, breaking out after it (:36-40). If the connection options carry aShortcutItemit forwards it toEssentialsPlatform.PerformActionForShortcutItemwith a no-op completion handler (:43-46), covering a cold launch from a quick action.ContinueUserActivity(UIScene, NSUserActivity)(:50-59) is the running-app Universal Link path: it returnstrueonly when the activity isBrowsingWebandTryPublishsucceeds (:52-56); every other case, including a rejected route, defers to the base implementation (:58).PerformAction(UIWindowScene, UIApplicationShortcutItem, Action<bool>)(:62-69) is the running-app quick-action path: it forwards toEssentialsPlatform.PerformActionForShortcutItemand relays the result to UIKit's completion handler (:66-69). Without the Essentials forwarding the app opens butOnAppActionnever fires (:19-21).- The iOS
TryPublishoverload (PlatformDeepLinks.cs:52-66) returnsfalsefor a null URL (:54-57), splits the URL withNSUrlComponentsand composes the route from its percent-encoded path, query and fragment throughDeepLinkDispatcher.TryComposeRoute(:59-64), which drops a route that is not app-relative, then resolves IDeepLinkDispatcher fromIPlatformApplication.Current.Servicesand publishes, returningfalsewhen no dispatcher is registered (:69-78). - The
[Register("SceneDelegate")]attribute (SceneDelegate.cs:26) exposes the type to the Objective-C runtime under the name the Info.plist manifest uses.
- Why it's built this way: mirroring the Android deep-link path through one shared helper and dispatcher means the in-app navigation logic is written once in the shared
DeepLinkListener, and turning a native link into a route is written once inPlatformDeepLinks, so the delegate only forwards its native event. The dispatcher enforces the route shape atPublishso no head can forget it, while the helper asks the same rule first so that enforcement never surfaces as a crash. Handling both the connection options and the running-app callbacks keeps cold-start and warm-start links and shortcuts behaviorally identical, the same guarantee MainActivity gets fromOnCreateplusOnNewIntent. - Where it's used: instantiated by UIKit for the application scene named in
MMCA.ADC.UI/Platforms/iOS/Info.plist:51-52; no C# code constructs it, and the only source reference is thecrefin the AppDelegate class summary (MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:11). - Caveats / not-in-source: whether iOS actually routes a tapped URL to the app depends on the associated-domains entitlement and a live
apple-app-site-associationfile on the public host, an operational fact outside this repo.
MainActivity
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/MainActivity.cs:40· Level 0 · class
- What it is: the Android launcher activity for the MAUI host. It does three jobs: declare which configuration changes it handles in-process (so Android does not restart the activity and tear down the Blazor WebView), receive verified https App Links (ADR-043) and hand each link to the framework's
PlatformDeepLinkshelper, which publishes its route to the shared deep-link dispatcher, and forward the MAUI app-action intent to Essentials so quick-action taps actually raiseOnAppAction. - Depends on: the framework's static
PlatformDeepLinkshelper fromMMCA.Common.UI.Maui.Capabilities.Navigation(MMCA.ADC.UI/Platforms/Android/MainActivity.cs:4; defined atMMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/Capabilities/Navigation/PlatformDeepLinks.cs:17), which in turn uses DeepLinkDispatcher.TryComposeRouteand publishes through IDeepLinkDispatcher; MAUI'sMauiAppCompatActivityand theMicrosoft.Maui.ApplicationModel.PlatformEssentials helper aliased asEssentialsPlatform(:5); AndroidX'sEdgeToEdgeandSystemBarStyle(:62-64); and the Android intent/activity SDK. - Concept introduced,
ConfigurationChangesand WebView preservation. By default Android destroys and recreates an activity on orientation, theme, or density changes; for aBlazorWebViewthat destruction tears down the hosted component tree and loses UI state. The[Activity(... ConfigurationChanges = ScreenSize | Orientation | UiMode | ScreenLayout | SmallestScreenSize | Density)]attribute (MMCA.ADC.UI/Platforms/Android/MainActivity.cs:25-29) tells Android the activity handles those events itself, so no recreation happens. The second concept is verified App Links: the first[IntentFilter](:30-36) claimshttpsURLs onPublicWebHostwithAutoVerify = true, narrowed byDataPathPrefixesto/conference/,/engage/,/happening-now,/feedback/,/auth/oauth-completeand/auth/sign-in-linkso only those routes open the app and any other page on the host (such as/login) stays in the browser (MMCA.ADC.UI/Platforms/Android/MainActivity.cs:35; the same set iOS applinks declares, class summary:15-17), which only takes effect if a liveassetlinks.jsoncarrying the Play App Signing fingerprint is served from that host (class summary,:21-23). The third is the app-action intent filter (:37-39) paired with theOnResume/OnNewIntentforwarding: without both, a launcher shortcut tap resolves to nothing (:18-21). The fourth is route shape validation before publish, now owned by the framework: this activity is exported, so any app on the device can reach it with an explicit intent that bypasses the manifest filters' scheme and host, and the route shape check is what keeps such a link inside the app origin (PlatformDeepLinks.cs:25-29). A route that is not app-relative (for example a protocol-relative path, which the WebView would resolve to an external site) is dropped silently instead of thrown out of a platform callback (SEC-Common-88, SEC-ADC-65;PlatformDeepLinks.cs:6-11). [Rubric §25, Navigation & IA] applies because deep links and shortcuts both land the user on the right in-app route; [Rubric §22, Responsive/Cross-Browser] applies because the config-change handling is what keeps the single WebView UI stable across rotations and theme switches. - Walkthrough:
PublicWebHost(MMCA.ADC.UI/Platforms/Android/MainActivity.cs:45) is a compile-time constant naming the production UI container-app host, and it must matchPublicSite:BaseUrlin the embeddedappsettings.json(MMCA.ADC.UI/appsettings.json:32-33), and theapplinksentry inPlatforms/iOS/Entitlements.plist, so a custom-domain cutover touches these three binary spots plus the verification URLs inDocs/MobileReleaseRunbook.md(comment at:42-44, ADR-043 trade-off note).OnCreate(:48-73) does two things after the base call. First it enables edge-to-edge drawing on every Android version withAndroidX.Activity.EdgeToEdge.Enable(this, SystemBarStyle.Dark(Color.Transparent.ToArgb()))(:62-64):MauiAppCompatActivityalready lays the window out behind the system bars and the page pads itself for them (the status-bar spacer inindex.htmlplus the navigation-bar fallback MainPageBase hands the page), but below API 35 the bars kept the theme's opaquecolorPrimaryDark, so this call makes older devices draw the same transparent chrome. It runs afterbase.OnCreatebecause MAUI swaps the splash theme for the main theme inside it and the decor view must not be created under the splash theme, and theDarkstyle keeps light status-bar icons because the spacer under them is the dark app-bar colour in both Day and Dark mode (comment at:52-61). Second, it callsPlatformDeepLinks.TryPublish(Intent)only whensavedInstanceState is null(:69-72), covering a fresh cold start: a restore (recreation after process death, or after a configuration change this activity does not handle in-process) carries the original launch intent, which was already delivered, so republishing it would replay that link (A-27, comment at:66-68).OnResume(:76-82) callsEssentialsPlatform.OnResume(this)so Essentials can process a pending app-action intent on a cold-start shortcut launch (:81).OnNewIntent(:85-94) first assignsIntent = intent(:91) soActivity.Intentstays in step with the link being handled and a later recreation reads this intent rather than the one that first launched the activity (:89-90; the activity isLaunchMode.SingleTop,:28), then forwards toEssentialsPlatform.OnNewIntent(intent)(:92) and hands the intent toPlatformDeepLinks.TryPublish(intent)(:93), covering warm re-entry. The AndroidTryPublishoverload (PlatformDeepLinks.cs:30-39) ignores anything that is not anActionViewintent carrying data (:32-35), composes the route from the intent URI's encoded path, query and fragment throughDeepLinkDispatcher.TryComposeRoute(:37), which drops a route that is not app-relative, and only then publishes it: the privatePublish(:69-78) resolves IDeepLinkDispatcher fromIPlatformApplication.Current.Services, returnsfalsewhen it is absent, and otherwise callsPublish(route), which buffers one route across a cold start until the sharedDeepLinkListenerdrains it. The activity ignores the returnedbool. The scheme and host are dropped (PlatformDeepLinks.cs:9-10), which is why the widget's placeholder host still works. - Why it's built this way: the config-changes list is not boilerplate; dropping any entry silently reintroduces an activity restart that only shows up on a physical device rotation or theme switch. Routing both intent callbacks through one helper keeps cold-start and warm-start deep links behaviorally identical, and gating the cold-start publish on
savedInstanceStateplus keepingIntentcurrent inOnNewIntenttogether make each link deliver exactly once even across activity recreation. The Essentials forwarding is required plumbing rather than a choice. The framework, not this activity, owns turning a link into a route and the route-shape rule:PlatformDeepLinksis the one helper both this activity and the iOS SceneDelegate hand their links to, so every head reads a link the same way (PlatformDeepLinks.cs:7-9), while the platform callbacks themselves stay in the head (:13-14). - Where it's used: the Android launcher (
MainLauncher = true,MMCA.ADC.UI/Platforms/Android/MainActivity.cs:27); it is also the explicit target of the widget's tapPendingIntentin NowNextWidgetProvider (MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:89). - Caveats / not-in-source: whether Android has actually verified the App Link association depends on the live
assetlinks.jsonon the production host, which is an operational fact outside this repo (the class summary points atDocs/MobileReleaseRunbook.md,:22-23).
DeviceUIModule
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/DeviceUIModule.cs:19· Level 8 · class (sealed)
- What it is: the MAUI-head-only UI module (ADR-042 Wave 2). It contributes the Device settings page plus its nav item, and it registers the layout components that turn native device events into in-app behavior. Web heads never register it, so none of its pages or components exist there.
- Depends on: IUIModule (implements) and NavItem; the shared
DeepLinkListener,BiometricGate, andPushRegistrationListenercomponents fromMMCA.Common.UI.Components.Capabilities,NativeThemeSyncfromMMCA.Common.UI.Maui.Components, and the head's own AppActionTitleRefresher fromMMCA.ADC.UI.Services(MMCA.ADC.UI/DeviceUIModule.cs:1-7);System.Reflectionand MudBlazorIcons. - Concept introduced, UI modules as a composition unit. IUIModule lets each module contribute nav items, layout components, and its own assembly to the shared router. The shared router's
AppAssemblyisMMCA.Common.UI, so a module'sAssembly(MMCA.ADC.UI/DeviceUIModule.cs:35) has to reachAdditionalAssembliesbefore its[Route]pages resolve at all (class summary,:11-18).NavItems(:23-26) exposes one Device settings entry whose title is a resource key ("Nav.DeviceSettings") rather than display text, resolved at render time by the sharedNavMenuagainst the co-locatedDeviceUIModule.resxpair via thetypeof(DeviceUIModule)resource marker (ADR-027, comment at:21-22; the resx pair isMMCA.ADC.UI/DeviceUIModule.resxandMMCA.ADC.UI/DeviceUIModule.es.resx). [Rubric §18, UI Architecture] assesses how features compose into a shell: this is the extension point that lets a device-only capability slot into a shared Blazor UI without the web heads knowing it exists. [Rubric §27, i18n] is touched by deferring the nav title to a resource lookup instead of hardcoding English. - Walkthrough: three get-only properties are the entire surface.
NavItems(MMCA.ADC.UI/DeviceUIModule.cs:23-26) holds the single nav entry pointing at/settings/devicewith theAppSettingsAlticon (:25).LayoutComponentTypes(:33) lists five components the shared layout renders once each, in order:DeepLinkListener,BiometricGate,PushRegistrationListener,NativeThemeSync, which per the adjacent comment drives MAUI's ownAppThemefrom the Blazor theme preference so the native chrome stops tracking the OS independently of the in-app toggle (ADR-028,:29-30), and AppActionTitleRefresher, which re-sets the home-screen quick actions on every WebView boot so their titles follow an in-app language switch, a switch that reloads only the WebView (:31-32).Assembly(:35) is an expression-bodied property returning this project's assembly. There is no constructor logic: the module is a declarative manifest. - Why it's built this way: registering device concerns through the same IUIModule contract the business modules use keeps the MAUI head from special-casing composition. Hosting the quick-action title refresh as a layout component ties it to the WebView's own boot, which is the one event an in-app language switch triggers, rather than to process start.
- Where it's used: registered as a singleton
IUIModulein MauiProgram (MMCA.ADC.UI/MauiProgram.cs:168); its components render inside the sharedMMCA.Common.UIlayout.
WebAuthenticatorCallbackActivity
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/WebAuthenticatorCallbackActivity.cs:19· Level 9 · class
- What it is: the Android activity that catches the custom-scheme OAuth completion redirect and hands control back to MAUI's
WebAuthenticator. After the Identity service'sCompleteAsyncfinishes a social login it redirects the system browser toatldevcon://oauth-complete?code=..., Android routes that URI here, and the base class resumes the pendingAuthenticateAsyncwith the captured parameters (ADR-043, documented atMMCA.ADC.UI/Platforms/Android/WebAuthenticatorCallbackActivity.cs:7-13). - Depends on:
Microsoft.Maui.Authentication.WebAuthenticatorCallbackActivity(base class,:19) and the Android SDK activity/intent attributes (:1-3). No first-party types. - Concept introduced, custom-scheme OAuth return on mobile. Unlike the web heads, which get an ordinary HTTP redirect back to an origin the browser already trusts, a native app receives the OAuth result through a registered URI scheme. The
[IntentFilter](:15-18) declares the app as a handler forActionViewintents whoseDataSchemeis theCallbackSchemeconstant, with theDefaultandBrowsablecategories so a browser can launch it.NoHistory = trueandLaunchMode.SingleTop(:14) keep the callback out of the back stack and reuse the existing task instead of stacking a second one. [Rubric §26, Front-End Security] assesses how client auth flows avoid token leakage: the scheme is an allowlisted return target and the class body holds nothing but a constant, so there is no place here for a code or token to be logged or mishandled. [Rubric §11, Security] applies to the same allowlist coupling on the server side. - Walkthrough: the class is behavior-free by design (
:19-22): the whole contract lives in the attributes, andCallbackScheme = "atldevcon"(:21) must stay in lockstep withOAuth:MobileRedirectSchemein the embeddedappsettings.json(MMCA.ADC.UI/appsettings.json:43, which is"atldevcon") and with the Identity service'sOAuth:AllowedReturnUrlSchemesallowlist (class summary,:11-12). - Why it's built this way: subclassing the MAUI base activity is the framework-sanctioned way to receive the redirect; all the app supplies is the scheme and the intent-filter metadata. Keeping the scheme constant next to the filter makes the three-place coupling (app attribute, app config, Identity allowlist) easy to keep aligned during a cutover.
- Where it's used: invoked by the Android OS during the OAuth flow enabled by the IOAuthUISettings that
AddUISharedregisters in MauiProgram (MMCA.ADC.UI/MauiProgram.cs:91, aConfigurationOAuthUISettingsover the embedded configuration,MMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:257); it is never called from managed code.
NowNextWidgetProvider
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:22· Level 2 · class (sealed)
- What it is: the Android home-screen
AppWidgetProvider(ADR-042 Wave 8) that renders a "Now / Next" card. On each update it fetches the anonymous, cachedGET Events/now-nextsnapshot (the id-less form, where the server picks the live-or-next published event) and renders one "Now" and one "Next" line. It never throws: a failed fetch leaves the previousRemoteViewsin place (class summary,MMCA.ADC.UI/Platforms/Android/NowNextWidgetProvider.cs:11-18). The endpoint it calls is[AllowAnonymous]and output-cached under theNowNextCachepolicy (MMCA.ADC/Source/Modules/Conference/MMCA.ADC.Conference.API/Controllers/Events/EventsController.cs:176-178). - Depends on: NowNextSnapshot and NowNextSession (its private records), MainActivity (the tap target,
:89),IConfigurationresolved fromIPlatformApplication.Current.Services(:111),System.Net.Http.HttpClient,System.Text.Json, and the Android widget SDK. - Concept introduced, best-effort background rendering under a platform time budget.
OnUpdate(:24-35) must return fast, so after null-guarding its three arguments (:26-29) it callsGoAsync()(:33) to keep the broadcast alive while the snapshot downloads, then startsUpdateWidgetsAsyncwithout awaiting it (:34); the comment at:31-32records that the platform budget is roughly 10s, far above one cached GET.UpdateWidgetsAsync(:37-67) wraps the whole flow in atry/catchthat swallows every exception, with theCA1031suppression justified inline (:57-59: a widget update is best-effort and the last rendering stays), and always callspendingResult?.Finish()infinally(:63-66). [Rubric §29, Resilience & Business Continuity] assesses graceful degradation: a network or parse failure degrades to the stale card rather than to a visible error. [Rubric §23, Front-End Performance] is engaged by leaning on the server's output cache and a short client timeout instead of any local polling loop. - Walkthrough:
BuildViews(:69-97) inflates thenownext_widgetlayout (:71), sets the event-name text (:72), reads three localized strings from Android resources (:74-76), and fills the Now/Next lines throughFormatRow, showing the "nothing scheduled" string whenNowis empty and an empty string whenNextis empty (:78-83). It then builds an explicit tap intent targeting MainActivity withActionViewand the app-internalhttps://app.internal/happening-nowURI (:88-91); the comment above it (:85-87) records that this is an app-internal route rather than an external address, and that only the URI path is consumed by the deep-link publisher, which makes the host part a placeholder. ThePendingIntentis createdUpdateCurrent | Immutable(:92-93) and attached to the widget root (:94).FormatRow(:99-105) does the invariantHH:mmformatting described under NowNextSession.FetchSnapshotAsync(:107-126) readsApi:ApiEndpointfrom configuration (:111, whose value is the gateway base URL atMMCA.ADC.UI/appsettings.json:19), returnsnullwhen it is missing (:112-115), builds a short-livedHttpClientwith an 8s timeout (:117), GETs the relativeEvents/now-next(:118), returnsnullon a non-success status (:119-122), and otherwise deserializes withJsonSerializerOptions.Web(:125). - Why it's built this way: a widget runs in a minimal broadcast process where an unhandled exception is user-visible as a broken card, so every path is null-guarded and every failure returns quietly to preserve the prior render. The
GoAsync/Finishpairing is the Android-sanctioned way to do async work from a receiver without triggering an ANR. - Where it's used: registered through
[BroadcastReceiver],[IntentFilter], and[MetaData](:19-21) and driven by the AndroidAppWidgetManager; its tap routes into MainActivity's deep-link path. - Caveats / not-in-source: the widget layout and string ids (
Resource.Layout.nownext_widget,Resource.Id.*,Resource.String.*) resolve against generated Android resources declared underPlatforms/Android/Resources, not in this file. The comment at:109-110asserts that MainApplication has already initialized MAUI by the time a receiver runs in this process; the code still bails quietly if configuration turns out to be unresolvable.
MauiProgram
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/MauiProgram.cs:31· Level 11 · class (static)
- What it is: the composition root for the MAUI Blazor Hybrid app.
CreateMauiAppbuilds the DI and configuration graph that runs Blazor components inside a native WebView on Android, iOS, macOS (Catalyst), and Windows: it loads embedded configuration, registers MudBlazor and the shared UI services, conditionally registers each module's UI, opts into push and the camera barcode scanner, and wires the MAUI-specific auth and device-capability services. - Depends on: the shared registrations
AddUIShared,AddAuditHistoryUI,UseMauiDeviceCapabilities,UseMmcaMauiErrorHandling,AddInAppDiagnostics,AddCommonMauiAppUserAgent,AddMauiPushDeviceTokenProvider,AddCommonMauiPublicLinkBuilder,AddCommonMauiTokenStorage, andUseCommonBarcodeScanner; UIModuleConfiguration, IOAuthUISettings with ConfigurationOAuthUISettings (both registered insideAddUIShared), IHomePageContent with ADCHomePageContent, IUIModule with DeviceUIModule, AppActionsInitializer and AppActionRouteMap, DevelopmentCertificatePolicy, MauiSecureTokenStore with SecureStoreTokenStorageService, ITokenRefresher with DirectApiTokenRefresher, JwtAuthenticationStateProvider, IPublicLinkBuilder, IBarcodeScannerService, IDeepLinkDispatcher, and App; externals MudBlazor, CommunityToolkit.Maui, theMMCA.Common.UI.Mauipackage, the four module UI packages,System.Resources.ResourceManager, andSocketsHttpHandler. - Concept introduced, registration-order-sensitive composition on top of
TryAdddefaults. The shared framework registers safe defaults withTryAdd, so this host must place each override at the right point in the sequence: a later plainAddwins, and aTryAddno-ops once something is already present. This file states the rule once, as a two-clause ordering contract atMMCA.ADC.UI/MauiProgram.cs:72-85, so the per-call comments below it can stay short. Clause 1 (:74-77): everything that overrides a shared default goes afterAddUIShared, becauseAddUISharedTryAdds a null or neutral implementation per capability contract and a plainAddonly beats one by being the last registration for that contract;UseMauiDeviceCapabilities, the push token providers, andUseCommonBarcodeScannerall depend on that. Clause 2 (:78-80): a module that registers its own default with a plainAddmust be overridden the same way, which is whyAddCommonMauiPublicLinkBuilderstays after every module registration. The same comment block records how the contract is enforced (:81-85): no MAUI TFM has a test project in this workspace, so MauiHostShellTests reads this file as text and pins both clauses, the overrides afterAddUISharedand the public link builder after everyAdd*UImodule call (MauiProgram_RegistersEachOverrideAfterAddUIShared_AndThePublicLinkBuilderAfterEveryModule,MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Ui/MauiHostShellTests.cs:202). Anything expressible without a MAUI type belongs outside this file instead, with AppActionRouteMap and DevelopmentCertificatePolicy named as the pattern, linked into the plain (non-MAUI)MMCA.ADC.Engagement.UI.Testsproject and asserted there. [Rubric §18, UI Architecture] assesses how the UI host is composed: one shared component graph parameterized per platform head. [Rubric §22, Responsive/Cross-Browser] applies because the same Blazor code targets four platforms from this single builder. [Rubric §14, Testability] is served despite the missing MAUI test project, by the text-reading fitness test plus logic exported into MAUI-free types. [Rubric §11, Security] and [Rubric §17, DevOps] both bear on the#if DEBUGblock below. - Walkthrough
StartupResources(MMCA.ADC.UI/MauiProgram.cs:40-41): a staticResourceManageroverMMCA.ADC.UI.MauiProgram, needed because some startup strings are handed to a registration made beforeBuild(), where no service provider and therefore noIStringLocalizerexists yet to inject, unlike AppActionsInitializer, which runs insideBuild()and can resolve one (doc comment at:33-39). It is the same co-located resx convention every other localized string in this head uses (MMCA.ADC.UI/MauiProgram.resxand its.es.resxsibling), read through the resource manager instead of the localizer.- Builder chain (
:49-59):UseMauiApp<App>()(:51),UseMauiCommunityToolkit()(:54, required by the speech-to-text capability, ADR-042 Wave 4, and the toolkit analyzer insists the call sits in the app's own chain,:52-53), a font registration (:55), andConfigureEssentials(essentials => essentials.OnAppAction(HandleAppAction))for home-screen quick actions (:59), whose titles AppActionsInitializer sets once the app is built (:56-58). - Configuration (
:61-70): MAUI does not auto-load config files, so the executing assembly'sMMCA.ADC.UI.appsettings.jsonmanifest resource stream is read (:62-63) and added throughAddJsonStream(:67), guarded by a null check on the stream (:64). - Core UI services:
AddMauiBlazorWebView()andAddMudServices()(:86-87), thenAddUIShared(builder.Configuration)(:91), which also registers the OAuth button settings over this configuration, theOAuthsection of the embedded appsettings (comment at:89-90; the framework'sTryAddSingleton<IOAuthUISettings>of aConfigurationOAuthUISettingsatMMCA.Common/Source/Presentation/MMCA.Common.UI/DependencyInjection.cs:257), so the head registers no OAuth settings of its own and the ADR-043 broker routes the social logins through the system browser. After it comeAddCommonMauiAppUserAgent()(:97, see the next bullet),AddAuditHistoryUI()(:100, the audit-history client that the organizer detail pages' history panels read through, ADR-075, comment at:99), andUseMauiDeviceCapabilities("mmca-exports")(:108). AddCommonMauiAppUserAgent()(:97, defined atMMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/DependencyInjection.cs:190) makes the app identify itself on everyAPIClientcall (AtlDevCon/{version} ({platform} {os}; MmcaApp)), so the refresh session records a User-Agent and the signed-in devices list reads "AtlDevCon app on Android" instead of "Unrecognized device". It appends a handler to theAPIClientthatAddUISharedregisters, so it must run afterAddUIShared(comment at:93-96).UseMauiDeviceCapabilities("mmca-exports")(:108, defined atMMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/HostingDependencyInjection.cs:40) registers the native capability overrides, which is why it must followAddUIShared(ordering-contract clause 1), and also wiresPlugin.LocalNotificationand the notification-tap deep-link bridge (comment at:102-104). Its argument names the temp folder where the sensitive-file saver stages the personal-data export for the share sheet (L162): the framework empties that folder before each write and purges it at app start (HostingDependencyInjection.cs:30-32), and the head keeps the folder name earlier versions of this head staged in, so their leftovers are purged too (:104-107).UseMmcaMauiErrorHandling()(:115) installs last-chance handlers forAppDomain.UnhandledExceptionandTaskScheduler.UnobservedTaskExceptionso a managed exception nobody caught is logged instead of silently killing the app. Its comment (:110-114) flags that, unlike its neighbours, this call is ordering-insensitive: the handlers are installed when the app is built, so a logging provider registered after this line is still picked up. [Rubric §13, Observability & Operability] is the category this call serves.AddInAppDiagnostics()(:122) registers the in-app diagnostics log: anILoggerProviderthat keeps the last 500 Information-or-above entries in memory, so a store build (where the Debug logger is compiled out) still has a log the attendee can copy or share from Device settings. Its comment (:117-121) records that nothing is written to disk or sent anywhere unless the user shares it, and that the call is ordering-insensitive like the line above, because the logger factory reads every registered provider when the app is built. This is the same §13 concern carried into release builds.AddMauiPushDeviceTokenProvider()(:131) registers the credentialed push token providers (ADR-044): the framework picks FCM on Android and APNs on iOS/MacCatalyst, and its plainAddbeats theTryAddnull default. The comment (:124-130) records that the registration is config-gated (withPush:Fcmblank andPush:Apns:Enabledfalse, both providers yield null and the pipeline stays inert) and that the platform wiring stays app-side: thePOST_NOTIFICATIONSdeclaration inAndroidManifest.xmland the two iOS callbacks on AppDelegate that publish into the frameworkApnsTokenBridge.IHomePageContentlanding content (:133), bound to ADCHomePageContent fromMMCA.ADC.Conference.UI.Pages.Home(imported at:12), then module registration (:135-146): fourifblocks gated onUIModuleConfiguration.IsModuleEnabled(builder.Configuration, "...")add the Identity (:136-137), Conference (:139-140), Engagement (:142-143), and Notification (:145-146) UI packages.AddCommonMauiPublicLinkBuilder()(:152) overrides the browser-origin IPublicLinkBuilder default so shared and copied links carry the public web URL rather than the WebView's internal origin; the framework builder resolves againstPublicSite:BaseUrlfrom the embedded appsettings (:148-151), the same key that must match MainActivity'sPublicWebHost. It stays after the module registrations by ordering-contract clause 2.UseCommonBarcodeScanner(...)(:162-164) enables camera QR scanning for badge check-in, passing deferredcancelText/cameraDescriptiondelegates that callStartupText. The comment (:154-161) separates the two reasons for its position: it must sit afterAddUIShared(a real DI requirement, since that is the call whichTryAdds the nullIBarcodeScannerService) but sitting belowAddEngagementUIis convention rather than a requirement, because Engagement owns the check-in surface but registers no scanner of its own. The same comment explains why the call stays opt-in: it brings in the ZXing handlers, so a head that never scans ships neither the handler nor the camera permission.- MAUI-only composition and services: the DeviceUIModule singleton (
:168) and the AppActionsInitializerIMauiInitializeService(:169), introduced by the comment at:166-167; then the auth stack ofAddCommonMauiTokenStorage()(:172, the framework helper atMMCA.Common/Source/Presentation/MMCA.Common.UI.Maui/DependencyInjection.cs:137-141that registers MauiSecureTokenStore as the scoped rawISecureTokenStoreover the platform secure store and SecureStoreTokenStorageService as the scoped ITokenStorageService above it, which checks expiry and refreshes proactively; the split keeps the graph acyclic because the refresher depends on the raw store rather than back on storage,DependencyInjection.cs:128-129), DirectApiTokenRefresher (:173), JwtAuthenticationStateProvider (:174) andAddAuthorizationCore()(:175). - The
#if DEBUGblock (:177-204) adds Blazor WebView developer tools (:178), then appends aSocketsHttpHandlerprimary handler to theAPIClient(:195-203) whoseRemoteCertificateValidationCallbackdelegates to DevelopmentCertificatePolicy.Accept(sender, sslPolicyErrors)(:200-201). That policy accepts a certificate that validates, and a failing one only when the request goes to a development address (MMCA.ADC.UI/Services/DevelopmentCertificatePolicy.cs:33-34):localhost, loopback, the RFC 1918 private IPv4 ranges (which include the Android emulator's host alias 10.0.2.2), IPv4 link-local, or IPv6 link-local and unique-local, never a host name other thanlocalhost(DevelopmentCertificatePolicy.cs:15-18). So a Debug build can reach a Gateway on the ASP.NET dev cert over the LAN or from the emulator, while every public host, the production gateway the embedded settings name included, keeps full TLS validation (comment atMauiProgram.cs:180-183). The managedSocketsHttpHandleris used because Android's native SSL layer rejects the dev cert at the Java level, for hostname verification oflocalhostagainst a LAN IP, before the .NET callback would ever fire (:184-187). A second comment (:189-194) records that this repeatAddHttpClient("APIClient")call only appends a primary-handler factory, so the client-configure delegates fromAddUISharedstill run and the 90 secondHttpClient.Timeoutthey pin survives; a future edit that replaced rather than added would silently fall back to the BCL's uncoordinated 100 second default. StartupText(string key, string fallback)(:218-219) reads one string fromStartupResourcesunderCultureInfo.CurrentUICulture, falling back to the supplied literal if the key is ever dropped from the resx. The remarks (:213-217) record that since MMCA.Common v1.147.0 the scanner registration takes deferred delegates, so this runs once per scan, after MauiCultureInitializer has restored the persisted culture (ADR-027): the scan page follows the in-app language choice, not the device locale at process start.HandleAppAction(AppAction action)(:221-234) maps the action id to a route via AppActionRouteMap.RouteFor(:223), returns when the id is unknown (:224-227), and otherwise publishes the route into IDeepLinkDispatcher (:231-233), which buffers it on cold start and dispatches it live otherwise (:229-230).
- Why it's built this way: the embedded-resource config load is forced by MAUI's lack of on-disk config discovery. The stated ordering contract exists because
TryAdd-versus-Addprecedence is invisible at the call site and easy to break silently during a refactor, and with no MAUI test project the only automated guard is a fitness test that reads this file as text. The deferredStartupTextdelegates exist because eager evaluation at registration time would freeze the scanner's chrome to whatever culture was current before the persisted language was restored. The certificate relaxation is fenced twice:#if DEBUGkeeps it out of every shipped build, and DevelopmentCertificatePolicy keeps even a Debug build validating every public host, with the rule in a MAUI-free type a plain test project can assert. - Where it's used: called by every platform head: MainApplication on Android (
MMCA.ADC.UI/Platforms/Android/MainApplication.cs:17), AppDelegate on iOS (MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:19), the MacCatalyst delegate (MMCA.ADC.UI/Platforms/MacCatalyst/AppDelegate.cs:14), and the WinUIApp(MMCA.ADC.UI/Platforms/Windows/App.xaml.cs:16). It is the one place all UI DI is assembled for the mobile and desktop shells. - Caveats / not-in-source: which modules are actually enabled depends on the embedded
appsettings.jsonvalues read byUIModuleConfiguration.IsModuleEnabled, and whether the push providers activate depends on thePush:*values; those runtime values are not determinable from this file.
AppDelegate
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:16· Level 12 · class
- What it is: the iOS application delegate. It boots MAUI by returning MauiProgram's app and carries the two application-level APNs registration callbacks (ADR-044). Nothing else: the app runs the UIScene life cycle, so the scene-level hooks (Universal Links and home-screen quick actions) live on SceneDelegate, because UIKit no longer calls the app delegate's
continueUserActivityorperformActionForShortcutItemonce a scene manifest is present (class summary,MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:8-13). - Depends on: MauiProgram, the framework's
ApnsTokenBridgefromMMCA.Common.UI.Maui.Capabilities.Notifications(MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:2), MAUI'sMauiUIApplicationDelegate(:16), andFoundation/UIKit. - Concept introduced, the fixed-selector native callback.
RegisteredForRemoteNotificationsandFailedToRegisterForRemoteNotifications(MMCA.ADC.UI/Platforms/iOS/AppDelegate.cs:27-34) are bound by the Objective-C registrar to this instance through their[Export]selectors (:27,:32), so they cannot be static and their signatures are dictated by UIKit, which is why theCA1822"make static" analyzer is suppressed around exactly those two members (:25,:35; comment at:21-24). A second concept is the application-level versus scene-level split: APNs registration belongs to the application, not to a window scene, so it stays here while every scene-delivered event moved to SceneDelegate. [Rubric §3, Clean Architecture] applies to the push split: only these two platform hooks stay app-side, and everything downstream of them lives in the framework (:23-24). - Walkthrough:
CreateMauiApp(:19) delegates toMauiProgram.CreateMauiApp(). The two APNs hooks publish into the framework'sApnsTokenBridge: success hands over the device token as a lowercase hex string viaConvert.ToHexStringLower(:28-29), failure publishesnull(:33-34) so the framework'sApnsPushDeviceTokenProvider, which awaits that rendezvous, is unblocked rather than left hanging when there is no entitlement or no network (:31). The[Register("AppDelegate")]attribute (:15) is what makes the type visible to the Objective-C runtime. - Why it's built this way: the delegate publishes a token into a bridge and the framework owns everything after that, so the app-side surface is two one-line methods. Keeping the deep-link and quick-action hooks off this class is not a style choice: the scene manifest the iOS 27 SDK requires makes UIKit route those events to the scene delegate, so an app-delegate override would compile and never run.
- Where it's used: Program passes this type to
UIApplication.Main(MMCA.ADC.UI/Platforms/iOS/Program.cs:11). MacCatalyst compiles a separate same-named delegate underMMCA.ADC.UI/Platforms/MacCatalyst/AppDelegate.cs:12that forwardsCreateMauiApp(:14) and still overrides the app-delegatePerformActionForShortcutItem(:17-21), but declares no scene delegate and handles neither Universal Links nor APNs, so the APNs path taught here and the Universal Link path on SceneDelegate are iOS-only.
MainApplication
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/Android/MainApplication.cs:10· Level 12 · class
- What it is: the Android
MauiApplicationsubclass, the process-level Android application object that boots MAUI by returning MauiProgram's app. - Depends on: MauiProgram; MAUI's
MauiApplicationand the Android runtime interop typesIntPtrandJniHandleOwnership(MMCA.ADC.UI/Platforms/Android/MainApplication.cs:1-2). - Concept introduced: reuses the per-platform bootstrapper pattern (see App), where each platform provides a thin entry that calls the shared
MauiProgram. No new concept. - Walkthrough: the
[Application]attribute (:9) marks it as the Android application class. The(IntPtr handle, JniHandleOwnership ownership)constructor (:12-15) is the JNI-marshalling constructor the Android runtime requires and simply forwards to the base.CreateMauiApp(:17) delegates toMauiProgram.CreateMauiApp(). - Why it's built this way: Android instantiates the application object before any activity, so this is the earliest point where MAUI can be created; keeping it a one-line delegate concentrates composition in MauiProgram.
- Where it's used: the Android runtime instantiates it at process start; it constructs the DI graph that MainActivity and NowNextWidgetProvider later resolve services from via
IPlatformApplication.Current.
Program
MMCA.ADC.UI ·
MMCA.ADC.UI·MMCA.ADC.UI/Platforms/iOS/Program.cs:8· Level 13 · class (static)
- What it is: the iOS native entry point.
Mainlaunches the UIKit application with AppDelegate as the delegate type. - Depends on: AppDelegate;
UIKit.UIApplication(MMCA.ADC.UI/Platforms/iOS/Program.cs:1). - Concept introduced, the iOS managed
Main. Unlike Android, where the OS instantiates MainApplication, iOS starts from a classicMain.UIApplication.Main(args, null, typeof(AppDelegate))(:10-11) hands control to UIKit and names the delegate that will callCreateMauiApp. [Rubric §22, Responsive/Cross-Browser] applies loosely: one codebase, one launcher per platform. - Walkthrough: a single static
Main(string[] args)(:10-11) and no other members. - Why it's built this way: the MAUI iOS template requires an explicit
Mainthat names theAppDelegate; there is nothing app-specific to customize here. - Where it's used: the iOS process entry point; it never runs on the other platform heads. The MacCatalyst head has its own parallel
Program/AppDelegatepair underMMCA.ADC.UI/Platforms/MacCatalyst/.
DevelopmentCertificatePolicy
MMCA.ADC.UI ·
MMCA.ADC.UI.Services·MMCA.ADC.UI/Services/DevelopmentCertificatePolicy.cs:24· Level 0 · class (internal, static)
- What it is: the DEBUG build's server-certificate rule for the MAUI head's
"APIClient": a certificate that validates is always accepted, and a failing one only when the connection is to a development address (MMCA.ADC.UI/Services/DevelopmentCertificatePolicy.cs:7-13). It lets a Debug build reach a gateway on the ASP.NET dev certificate over the LAN or from the emulator while any public host keeps full TLS validation. - Depends on: BCL only:
System.Net(IPAddress),System.Net.Security(SslPolicyErrors,SslStream) andSystem.Net.Sockets(AddressFamily) (:1-3), plusHttpRequestMessage. No first-party type and no MAUI API. - Concept introduced, scoping a TLS relaxation by destination rather than by build. A Debug mobile build that talks to a developer's gateway hits a certificate issued for
localhostwhile the device dials a LAN IP or the Android emulator's host alias, so validation fails. The blunt fix is a callback that returnstruefor every host in Debug; the remarks (:14-18) record why this type is narrower: the embedded settings point at the production gateway, so a blanket bypass would also strip validation from production traffic in a Debug build. Onlylocalhost, loopback, RFC 1918 private IPv4, IPv4 link-local, and IPv6 link-local or unique-local addresses qualify, and a host name other thanlocalhostnever does, "so DNS cannot steer a public name onto the relaxed rule" (:17-18). [Rubric §11, Security] assesses whether transport security holds by default and every exception is bounded; here the exception is bounded twice, by#if DEBUGat the call site and by address range inside the type. [Rubric §14, Testability] applies because, like AppActionRouteMap, it touches no MAUI API so it is linked into a plain test project (remarks,:19-22). - Walkthrough
Accept(object? sender, SslPolicyErrors sslPolicyErrors)(MMCA.ADC.UI/Services/DevelopmentCertificatePolicy.cs:33-34) is the callback body:truewhensslPolicyErrors == SslPolicyErrors.None, otherwiseIsDevelopmentHost(HostOf(sender)). A clean certificate therefore never depends on the host check.HostOf(object? sender)(:39-44) pattern-matches the sender: anHttpRequestMessagewith aRequestUriyieldsuri.Host, anSslStreamyieldsTargetHostName, and anything else yieldsnull, which the doc comment (:38) notes refuses.IsDevelopmentHost(string? host)(:49-75): null or whitespace isfalse(:51-54);localhostmatches case-insensitively (:56-59); otherwise the host must parse as an IP literal after trimming IPv6 brackets (:61-64), an IPv4-mapped IPv6 address is unwrapped to IPv4 (:66-69), and the result is loopback, or for IPv6IsIPv6LinkLocal || IsIPv6UniqueLocal, or for IPv4 the private/link-local byte test (:71-74).IsPrivateOrLinkLocalIPv4(byte[] bytes)(:78-82) checks the first octets:10,172with a second octet from 16 to 31,192.168, and169.254, as the comment above it lists (:77).
- Why it's built this way: the comment at the call site (
MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:180-187) explains both choices: relax only for development addresses so the production gateway keeps validation, and useSocketsHttpHandler(managed TLS) because Android's native SSL layer rejects the dev certificate before a .NET callback could run. Extracting the decision out ofMauiProgramfollows the rule a comment there states: no MAUI target has a test project, so anything expressible without a MAUI type belongs outside that file, withAppActionRouteMapandDevelopmentCertificatePolicynamed as the pattern (MauiProgram.cs:81-85). - Where it's used: inside
#if DEBUG(MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:177-204), as theRemoteCertificateValidationCallbackof theSocketsHttpHandlerthat a secondAddHttpClient("APIClient")installs as the primary handler (:195-201). Tested through the linked compile itemMMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/MMCA.ADC.Engagement.UI.Tests.csproj:27, byMMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/Services/DevelopmentCertificatePolicyTests.cs:14: development addresses including10.0.2.2,[::1],[fe80::1]and[fd00::5]are accepted with a failing certificate (:16-34), public hosts and range edges such as172.32.0.1,172.15.255.255andlocalhost.example.comare refused (:36-51), a clean certificate is accepted for any host (:53-59), and an unknown or null sender is refused (:61-66). - Caveats / not-in-source: a Release build compiles the whole override out, so the
"APIClient"keeps its default handler and validation there. Which sender object the TLS stack actually passes to the callback underSocketsHttpHandler(request message orSslStream) is runtime behavior, not determinable from source; the type handles both, and the tests exercise only theHttpRequestMessage, arbitrary-object andnullcases.
AppActionRouteMap
MMCA.ADC.UI ·
MMCA.ADC.UI.Services·MMCA.ADC.UI/Services/AppActionRouteMap.cs:22· Level 6 · class (internal, static)
- What it is: the pure lookup from a home-screen quick-action id (the long-press app-icon shortcuts, ADR-042 Wave 2) to the app-relative route that activation should navigate to. It holds the three action-id constants, one literal route, and a single
RouteForswitch. - Depends on: EngagementRoutePaths and NotificationRoutePaths for the route constants (
MMCA.ADC.UI/Services/AppActionRouteMap.cs:1-2). Nothing else: no BCL beyondstring, and pointedly noMicrosoft.Maui.*type at all. - Concept introduced, extracting the testable core out of a platform-bound file. The MAUI head multi-targets the platform TFMs and has no test project in this workspace (
MMCA.Common's ownUI.Mauipackage sets the same precedent). Rather than leave the id-to-route decision untested inside a MAUI-only class, the decision is isolated into a type that references no MAUI API, so it compiles under a plainnet10.0target and can be pulled into an existing test project as a linked compile item. That is exactly what happens:MMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/MMCA.ADC.Engagement.UI.Tests.csproj:24declares<Compile Include="...\AppActionRouteMap.cs" Link="Linked\AppActionRouteMap.cs" />, andMMCA.ADC/Tests/Modules/Engagement/MMCA.ADC.Engagement.UI.Tests/Services/AppActionRouteMapTests.cs:20asserts every branch including the unknown-id and blank-id cases (:44,:52). [Rubric §14, Testability] assesses whether logic is reachable by a test without its hosting infrastructure: this file is the textbook move, an untestable TFM forced a boundary and the boundary turned out to be the right design anyway. [Rubric §1, SOLID] applies through the single responsibility, mapping and nothing else. [Rubric §25, Navigation & IA] applies because these three ids are OS-level jump points into deep in-app routes. - Walkthrough
- The three id constants (
MMCA.ADC.UI/Services/AppActionRouteMap.cs:25,:28,:31) arehappening_now,my_schedule, andnotifications, the ids the platform reports back on activation. MyScheduleRoute(:38) is"/conference/sessions?mine=true", a literal rather than aConferenceRoutePathsconstant. The doc comment (:33-37) explains why: it is the session-list route carrying a filter, not a route of its own.RouteFor(string? actionId)(:49-63) returnsnullfor a null, empty, or whitespace id (:51-54), then switches to EngagementRoutePaths.HappeningNow(which resolves to/happening-now,MMCA.ADC/Source/Modules/Engagement/MMCA.ADC.Engagement.UI/EngagementRoutePaths.cs:11),MyScheduleRoute, or NotificationRoutePaths.NotificationInbox(/notifications/inbox,MMCA.Common/Source/Presentation/MMCA.Common.UI/Common/NotificationRoutePaths.cs:10), with_ => nullfor anything unrecognized (:56-62). The parameter is nullable and whitespace-tolerant on purpose: the value crosses a platform boundary, so it is never assumed to be well formed (:44-47).
- The three id constants (
- Why it's built this way: the file-level comment (
:9-20) states the contract for future edits directly: keep every MAUI dependency (AppActions.Current, the localized titles, the dispatcher lookup) on the caller side in AppActionsInitializer and MauiProgram so this file stays linkable. It even explains why those two callers are named in prose instead of bycref: this file also compiles inside the test project, where the MAUI-bound types are absent and acrefwould not resolve. - Where it's used: called by
MauiProgram.HandleAppActionon activation (MMCA.ADC.UI/MauiProgram.cs:223), and its id constants are re-exported by AppActionsInitializer (MMCA.ADC.UI/Services/AppActionsInitializer.cs:21-23) so the registration side and the activation side cannot drift apart.
AppActionsInitializer
MMCA.ADC.UI ·
MMCA.ADC.UI.Services·MMCA.ADC.UI/Services/AppActionsInitializer.cs:19· Level 2 · class (sealed)
- What it is: a MAUI startup service that publishes the three home-screen quick actions once the app is built, with titles resolved from the co-located resx pair. It is the registration half of the quick-action feature; the activation half lives in MauiProgram, and the id-to-route decision both halves depend on lives in AppActionRouteMap. Its
SetActionsAsyncis also the method AppActionTitleRefresher calls again on every WebView boot. - Depends on:
IMauiInitializeService(the MAUI hosting contract it implements,MMCA.ADC.UI/Services/AppActionsInitializer.cs:19),IStringLocalizer<AppActionsInitializer>(:1,:35), MAUI Essentials'AppActions/AppAction/FeatureNotSupportedException, AppActionRouteMap for the ids (:21-23), and IDeepLinkDispatcher indirectly, as the destination the resolved routes are published into (:2, class summary at:9-12). - Concept introduced, native quick actions as a navigation entry point. [Rubric §25, Navigation & IA] assesses whether an app exposes coherent first-class entry points: the three shortcuts are OS-level jump points into deep routes, reachable without opening the app first. [Rubric §27, i18n] applies because the shortcut labels are resolved from
MMCA.ADC.UI/Services/AppActionsInitializer.resx(and its.es.resxsibling) through the localizer passed toSetActionsAsync(:55-57), so they read in the culture current at the call rather than shipping as English literals; the method's summary (:42-48) records that the AppActionTitleRefresher re-call is how the titles follow an in-app language switch. [Rubric §29, Resilience & Business Continuity] is touched lightly: every failure mode here degrades to "no shortcuts appear" rather than to a broken launch. - Walkthrough
- The three
internal constids (MMCA.ADC.UI/Services/AppActionsInitializer.cs:21-23) are aliases of the AppActionRouteMap constants, not independent literals, so registration and routing cannot fall out of sync. Initialize(IServiceProvider services)(:26-40): null-guards the provider (:28), returns immediately whenAppActions.Current.IsSupportedis false (:30-33), resolves the localizer (:35), then startsSetActionsAsyncfire-and-forget with a discard (:39) so a slow or failing shortcut registration can never block or fail app startup. The inline comment states that intent at:37-38.SetActionsAsync(IStringLocalizer<AppActionsInitializer>)(:49-66) isinternal static, so a component in the same assembly can call it without resolving the initializer. It builds the threeAppActions with localized titles and theappiconicon (:53-58), awaitsAppActions.Current.SetAsync(:59), and catchesFeatureNotSupportedException(:61-65) because some launchers report support and then reject the call at runtime, in which case the shortcuts simply do not appear.
- The three
- Why it's built this way: registration and activation are deliberately split. This initializer sets the shortcuts and their titles; MauiProgram wires
ConfigureEssentials(essentials => essentials.OnAppAction(HandleAppAction))(MMCA.ADC.UI/MauiProgram.cs:59) to the activation path. Both ends resolve the same route table and publish into the ADR-042 deep-link dispatcher, which buffers a cold-start activation until the sharedDeepLinkListenerrenders (class summary,MMCA.ADC.UI/Services/AppActionsInitializer.cs:9-12). The class summary also records why the mapping was moved out (:13-17): what remains here is only the part that genuinely needs the platform. BecauseInitializeruns once per process, the titles it sets are fixed until something sets them again; the summary names AppActionTitleRefresher as that second caller (:8-9). - Where it's used: registered as a singleton
IMauiInitializeServicein MauiProgram (MMCA.ADC.UI/MauiProgram.cs:169), which is what makes MAUI runInitializeduringBuild();SetActionsAsyncis called again by AppActionTitleRefresher (MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:30). - Caveats / not-in-source: whether a given launcher actually surfaces the shortcuts is runtime platform behavior, not determinable from source; the code only handles the explicit rejection case.
AppActionTitleRefresher
MMCA.ADC.UI ·
MMCA.ADC.UI.Services·MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:17· Level 3 · class (sealed)
- What it is: a Blazor component that renders nothing and, on its first render in each WebView boot, sets the home-screen quick actions again, so their titles follow an in-app language switch. It is the second caller of AppActionsInitializer's
SetActionsAsync. - Depends on:
ComponentBase(Microsoft.AspNetCore.Components,MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:1,:17), an injectedIStringLocalizer<AppActionsInitializer>(:19), MAUI Essentials'AppActions.Current.IsSupported(:25), and AppActionsInitializer.SetActionsAsync(:30). It reaches the layout through DeviceUIModule (class remarks,:14-16). - Concept introduced, a headless layout component as a per-boot hook. The quick-action titles are set from native code once per process, but a language switch in this app reloads only the WebView, not the process. The class summary (
:6-13) spells out the consequence it fixes: without a second call the launcher shortcuts kept the old language until the next cold start. A component in the layout is the cheapest code that runs once on every WebView boot, under whatever culture that boot applied, so the fix is a component with no markup rather than a native lifecycle hook. [Rubric §27, i18n] assesses whether every user-visible string follows the selected culture, including strings rendered outside the page; this type extends that to OS-owned launcher labels. [Rubric §18, UI Architecture] applies through the extension point it uses: the device module contributes it to the shared layout as a type, so no shared layout file names an ADC-only component. - Walkthrough
Localizer(MMCA.ADC.UI/Services/AppActionTitleRefresher.cs:19) is an[Inject]property of the sameIStringLocalizer<AppActionsInitializer>the initializer resolves, so both callers read the sameAppActionsInitializer.resxpair.OnAfterRenderAsync(bool firstRender)(:22-31) returnsTask.CompletedTaskunless this is the first render andAppActions.Current.IsSupportedis true (:25-28); the inline comment (:24) states why one call per boot suffices: the culture cannot change without another reload. Otherwise it returnsAppActionsInitializer.SetActionsAsync(Localizer)(:30), so the platform-rejection handling (MMCA.ADC.UI/Services/AppActionsInitializer.cs:61-65) is shared rather than duplicated.
- Why it's built this way: running the refresh in
OnAfterRenderAsyncrather than in a native startup callback ties it to the WebView's lifetime, which is the lifetime a language switch resets. The comment beside its registration (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/DeviceUIModule.cs:31-32) records the same reason. ReusingSetActionsAsynckeeps the ids, icon and titles defined once, consistent with AppActionRouteMap being the single source of the ids. - Where it's used: listed last in DeviceUIModule's
LayoutComponentTypes(MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/DeviceUIModule.cs:33), besideDeepLinkListener,BiometricGate,PushRegistrationListenerandNativeThemeSync; it is named in AppActionsInitializer's class summary (MMCA.ADC.UI/Services/AppActionsInitializer.cs:8-9) and thecrefin itsSetActionsAsyncsummary (:44). - Caveats / not-in-source: that an in-app language switch reloads the WebView while the process stays alive is stated in comments here and in
DeviceUIModule.cs:31-32; the reload itself is implemented elsewhere and was not read for this section. Whether a launcher repaints an already-pinned shortcut title afterSetAsyncis platform behavior, not determinable from source.
App
MMCA.ADC.UI ·
MMCA.ADC.UI.WinUI·MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/Platforms/Windows/App.xaml.cs:8· Level 12 · class (partial)
- What it is: the Windows (WinUI 3) entry point of the MAUI head, and a different type from the cross-platform App taught earlier in this chapter. Same simple name, different namespace (
MMCA.ADC.UI.WinUI,MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/Platforms/Windows/App.xaml.cs:4), different base class, and it compiles only into the Windows target framework. Its whole job is to hand control to MauiProgram. - Depends on: MauiProgram; MAUI's
MauiWinUIApplicationbase class and theMauiAppit returns. Its XAML half lives beside it inPlatforms/Windows/App.xaml, whose root element is amaui:MauiWinUIApplicationwithx:Class="MMCA.ADC.UI.WinUI.App"(MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/Platforms/Windows/App.xaml:1-6), which is what makes the C# halfpartialand suppliesInitializeComponent(). - Concept introduced: no new pattern. This is the fourth instance of the per-platform bootstrapper shape already seen in MainApplication (Android), AppDelegate and Program (iOS): every platform head implements whatever its OS demands as an application object, then delegates to the one shared
CreateMauiApp(). What is worth pausing on here is the name collision:MMCA.ADC.UI.Appis the MAUIApplicationthat owns the window graph, whileMMCA.ADC.UI.WinUI.Appis the Windows App SDK application object that hosts the MAUI runtime on Windows. Both exist in the same assembly on the Windows build, disambiguated only by namespace. The file carries nousingdirectives at all:MauiProgramresolves becauseMMCA.ADC.UI.WinUIis nested insideMMCA.ADC.UIfor name lookup, and the MAUI types resolve through the SDK's implicit global usings (ImplicitUsingsisenableatMMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MMCA.ADC.UI.csproj:21). [Rubric §22, Responsive/Cross-Browser] assesses whether one codebase genuinely serves every form factor rather than forking per device; this file is the Windows leg of that claim, with the shared Blazor UI reached through exactly the same builder every other head calls. [Rubric §33, Developer Experience] applies too: the Windows leg is opt-in by machine, so a macOS or Linux contributor never has to install the Windows App SDK to build the MAUI project (see the TFM condition below). - Walkthrough: three lines of authored code, in order.
namespace MMCA.ADC.UI.WinUI;(App.xaml.cs:4), file-scoped and deliberately distinct from the sharedMMCA.ADC.UInamespace so the twoApptypes can coexist.public partial class App : MauiWinUIApplication(:8).MauiWinUIApplicationis MAUI's Windows application base, resolved from theMicrosoft.Mauinamespace that the paired XAML imports asxmlns:maui="using:Microsoft.Maui"(App.xaml:5). It owns the Windows-side application lifecycle and calls back into theCreateMauiApp()override below when it needs the MAUI app instance; the internals of that base class live in the MAUI SDK, not in this repository.- The constructor
public App() => InitializeComponent();(:14) is an expression body calling the XAML-generated initializer. Its doc comment (:10-13) names it precisely: "the first line of authored code executed, and as such is the logical equivalent ofmain()orWinMain()". The actual processMainis generated by the WinUI XAML build tooling, not written here. protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();(:16) is the single override and the only application-specific behavior in the file. It returns the fully composedMauiAppbuilt atMMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MauiProgram.cs:47, which is whereUseMauiApp<App>()(MauiProgram.cs:51) names the cross-platform App as the MAUI application root. So the WindowsAppboots the MAUI runtime, and the MAUI runtime then instantiates the otherApp, which creates the window hosting MainPage and the Blazor WebView.
- Why it's built this way: the Windows App SDK requires a XAML-declared
Applicationsubclass as the packaged/unpackaged app object, so this file cannot be avoided; keeping it to a constructor plus a one-line override means the Windows head adds zero divergent composition. Every service registration, configuration read, and module wiring stays in MauiProgram, which is what keeps the ADR-042 capability layer (native overrides on device, fallbacks elsewhere) a single composition point rather than four. The surrounding project settings are what make the Windows leg optional and desktop-shaped:MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI/MMCA.ADC.UI.csproj:8appendsnet10.0-windows10.0.19041.0toTargetFrameworksonly under$([MSBuild]::IsOSPlatform('windows')), so on any other OS this file is not compiled at all;:36setsWindowsPackageTypetoNone(unpackaged, plain.exedistribution); and:41-42pin the supported and minimum Windows platform to10.0.17763.0. The two side-car manifests complete the Windows identity:Platforms/Windows/app.manifest:11-14declares PerMonitorV2 DPI awareness and long-path awareness, andPlatforms/Windows/Package.appxmanifestcarries the still-templated packaged identity (:9,maui-package-name-placeholder, publisherCN=User Name) with therunFullTrustrestricted capability (:43). - Where it's used: never from managed application code. The WinUI runtime instantiates it as the process application object on the Windows head; it is the Windows counterpart of MainApplication on Android and AppDelegate on iOS. Nothing in the repository references
MMCA.ADC.UI.WinUIoutside the three Windows platform files themselves (App.xaml.cs:4,App.xaml:2,6,app.manifest:3). - Caveats / not-in-source:
InitializeComponent()and the WinUI-generatedMainare emitted by the XAML compiler fromApp.xamlat build time and are not present in the repository, so the exact startup sequence between process start and theAppconstructor is not determinable from source. ThePackage.appxmanifestvalues are the unmodified MAUI template placeholders; becauseWindowsPackageTypeisNone(MMCA.ADC.UI.csproj:36) that manifest is not the shipping identity for the current unpackaged build, but whether a packaged Windows artifact is ever produced is not determinable from this project file alone.
⬅ ADC Identity Module (Users, Profiles, GDPR Export/Erasure) • Index • Device Capability Abstraction Layer (Native Contracts, MAUI, Browser & Fallback Adapters) ➡