Files
Heimdall/skills/camera-access-nullable-select/SKILL.md
T
arnaud.dartois 1ca5f16527
Heimdall Gitea / Detect CI scope (pull_request) Successful in 7s
Heimdall Gitea / Build and tests (pull_request) Successful in 22m19s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 8m46s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 11m19s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (pull_request) Successful in 17m37s
Heimdall Gitea / CI policy (pull_request) Successful in 2s
Fix nullable camera access selectors (#288)
2026-11-08 19:24:08 +01:00

1.8 KiB

name, description
name description
camera-access-nullable-select Keep nullable camera-access grant selectors type-consistent in the Heimdall Blazor UI and verify site-wide and camera-specific grants.

Camera access nullable selectors

The grant form in src/Heimdall.Web/Components/Pages/CameraAccessPanel.razor stores the selected site and camera as Guid? because the form supports an unset selection. Keep each corresponding MudSelect and all of its MudSelectItem children explicitly typed as Guid?; cast non-nullable model IDs with (Guid?) in each item value. A plain Guid item can compile yet fail at runtime when MudBlazor dispatches the option click to its nullable parent.

When editing this form, preserve the two grant modes: site-wide grants save a site ID and null camera ID, while camera-specific grants save both IDs. Validate both selection interactions and the serialized saved grants.

Acceptance workflow

  1. Run the focused Web tests with dotnet test tests/Heimdall.Web.Tests/Heimdall.Web.Tests.csproj --no-restore and build src/Heimdall.Web/Heimdall.Web.csproj using the SDK pinned in global.json.
  2. For behavior changes, follow the disposable Compose recipe: build the changed source using unique local image tags and isolated credentials, project, ports, network, and volumes.
  3. Bootstrap an isolated administrator, use a real browser/UI-capable test to select a site-wide option and a camera option, and verify the saved grants contain respectively a null and non-null camera ID with no InvalidCastException.
  4. Tear down only that Compose project. Verify its containers, volumes, and networks are absent; remove and verify absence of only the recipe's exact locally built tags, preserving shared base images.