Component: Smrt.CloudProviders.UI.WinUI3¶
Canonical source:
SmrtApps/src/Smrt.CloudProviders.UI.WinUI3/README.md(mirrored below)
Smrt.CloudProviders.UI.WinUI3¶
Overview & Responsibilities¶
- WinUI 3 UI surface for managing SmrtHub cloud provider profiles (vendor cards, profiles, and connection testing).
- Hosts credential entry UX and profile management while delegating all provider logic (routing, secrets discipline, connection tests) to
Smrt.CloudProviders. - Designed to be embedded in Settings hosts (primary:
SettingsHost).
Non-Responsibilities¶
- No vendor SDK calls and no direct HTTP to provider APIs.
- No secret persistence in config/state; secrets are stored only via Windows Credential Manager through
Smrt.CloudProviders.
Key Integrations¶
Smrt.CloudProviders/Smrt.CloudProviders.Contractsprovide:- Profile config/state models.
- Secret storage helpers (Credential Manager targets).
- Connection test implementation and structured results.
Smrt.UIprovides theming resources; consuming apps should merge Smrt.UI dictionaries at startup.SmrtHub.Loggingis used for UI-safe logging (never log secrets or full URLs with query strings).
Configuration & Log Paths¶
- This library does not own persistent storage.
- Profile config/state is stored by
Smrt.CloudProvidersviaSmrt.Configto canonical roaming paths. - Secrets are stored by
Smrt.CloudProvidersvia Windows Credential Manager.
Observability and diagnostics¶
- Uses
SmrtHub.Loggingfor UI-safe logging; never log secrets, tokens, or full URLs with query strings. - Host applications are responsible for emitting and exporting unified logs (including HTML exports) and for collecting logs via Support Bundle.
Support Bundle¶
- This library does not generate bundles directly, but its host’s logs (for example, Settings Host) should be included in Support Bundle exports.
- Use Support Bundle when triaging provider configuration or deep-link routing issues.
Runtime Workflow (Hosted)¶
- Host app references
Smrt.CloudProviders.UI.WinUI3. - Host app provides a Settings page/region and embeds
CloudProvidersSettingsView. - The control loads provider config/state through
Smrt.CloudProvidersand renders vendor cards. - User changes are saved back through
Smrt.CloudProviders(config/state) and secrets are routed through Credential Manager.
Enabling Connection Tests¶
Connection tests are gated by a non-secret options file because endpoint URIs must not be hard-coded.
- The UI displays the exact options file path.
- Fill in the endpoint URIs in that file, save it, then click Refresh.
- Until the file contains valid absolute URIs for the required keys, tests that depend on those endpoints will report
NotConfiguredwith details.
Discovery cache (models/locations/processors)¶
This UI can display cached discovery results for supported services and can refresh the cache via a metadata-only remote call.
- The cached discovery results live in provider state (
CloudProvidersState.DiscoveryCache) and are metadata-only. - This UI currently displays a best-effort count + timestamp, plus a bounded preview list, when cached data exists.
- For supported services, the UI provides "Refresh" actions that:
- Calls the core discovery runner in
Smrt.CloudProviders(no vendor SDK calls from UI). - Persists the returned cache entry to provider state (non-secret).
- Shows a UI-safe summary and details (best-effort; never logs secrets).
Currently surfaced discovery kinds:
- models (OpenAI, Anthropic, Google Gemini API, Azure OpenAI, AWS Bedrock)
- locations (Google Cloud DocumentAI, VertexAI, AWS Bedrock (shown as "regions" in the UI))
- processors (Google Cloud DocumentAI)
Deep links (Providers vendor/profile)¶
SettingsHost can navigate to the Providers page and optionally pass a vendor/profile selection to this UI.
Vendor matching rules: - Case-insensitive. - Leading/trailing whitespace is ignored. - Prefer the canonical vendor ids below when generating deep links.
Supported vendor ids and aliases (all treated equivalently by the deep-link parser):
| Vendor | Canonical vendor id | Accepted aliases |
|---|---|---|
| OpenAI | openai |
open-ai |
| Microsoft Azure (incl. Azure OpenAI) | azure |
microsoftazure, microsoft-azure, msazure, ms-azure, aoai, azureopenai, azure-openai |
| Google Cloud | google |
googlecloud, google-cloud, gcp |
| AWS | aws |
amazon, amazonaws, amazon-aws |
| Anthropic | anthropic |
(none) |
| OCR.Space | ocrspace |
ocr-space, ocr.space, ocr_space |
Note: for developer convenience, the parser also accepts VendorId enum names (for example, MicrosoftAzure). Prefer the canonical vendor ids above for external deep links.
Testing & Validation¶
- Build:
dotnet build SmrtApps/src/Smrt.CloudProviders.UI.WinUI3/Smrt.CloudProviders.UI.WinUI3.csproj -c Debug -r win-x64 - Run C# tests via repo scripts under
Tools/Run-Tests/.
Policy References¶
- Documentation: README.Files/System/Policies/SmrtHub-Documentation-Policy-v1.0.README.md
- UI theming: README.Files/System/Policies/SmrtHub-UI-Theming-Policy.README.md
- Privacy/security: README.Files/System/Policies/SmrtHub-Privacy-and-Security-Policy.README.md
- Operational data: README.Files/System/Policies/SmrtHub-Operational-Data-Policy-v1.0.README.md
Related docs¶
- Settings Host: SmrtApps/CSApps/SettingsHost/README.md
- Cloud Providers core: SmrtApps/src/Smrt.CloudProviders/README.md