AdminUI: role-grant, cluster, node and ACL deletes run with no confirmation (#761 gate D) #785

Closed
opened 2026-11-09 22:15:27 -05:00 by dohertj2 · 1 comment
Owner

Found by #761 gate D (AdminUI live pass on docker-dev, record in docs/reviews/2026-10-21/gates.md, master 20820bbf). Four delete buttons delete immediately on click, with no confirmation — every other AdminUI delete (scripts, API keys, UNS tree, Raw-tree driver/device, certificates) goes through a confirm modal.

  • Role grants — RoleGrants.razor:68 → DeleteAsync(r.Id). Live-verified: add any group at /role-grants, press Delete, the row is gone with no modal.
  • Cluster delete — ClusterEdit.razor:102 @onclick="DeleteAsync" (source).
  • Cluster node delete — NodeEdit.razor:119 @onclick="DeleteAsync" (source).
  • Node ACL delete — AclEdit.razor:151 @onclick="DeleteAsync" (source).

Fix: route each through the same confirm-modal pattern the other pages use; bUnit tests that a click opens the modal and only Confirm deletes (Cancel keeps the item).

Minor, same pass: /fleet/diagnostics "FAULTED DEVICES 0" while a device is down because its driver is INITIALIZING, not faulted — decide whether INITIALIZING-with-down-devices should count.

Found by #761 gate D (AdminUI live pass on docker-dev, record in `docs/reviews/2026-10-21/gates.md`, master `20820bbf`). Four delete buttons delete immediately on click, with no confirmation — every other AdminUI delete (scripts, API keys, UNS tree, Raw-tree driver/device, certificates) goes through a confirm modal. - **Role grants** — `RoleGrants.razor:68` → `DeleteAsync(r.Id)`. Live-verified: add any group at `/role-grants`, press Delete, the row is gone with no modal. - **Cluster delete** — `ClusterEdit.razor:102` `@onclick="DeleteAsync"` (source). - **Cluster node delete** — `NodeEdit.razor:119` `@onclick="DeleteAsync"` (source). - **Node ACL delete** — `AclEdit.razor:151` `@onclick="DeleteAsync"` (source). Fix: route each through the same confirm-modal pattern the other pages use; bUnit tests that a click opens the modal and only Confirm deletes (Cancel keeps the item). Minor, same pass: `/fleet/diagnostics` "FAULTED DEVICES 0" while a device is down because its driver is INITIALIZING, not faulted — decide whether INITIALIZING-with-down-devices should count.
dohertj2 added the type:bugpriority:p2 labels 2026-11-09 22:15:27 -05:00
Author
Owner

Fixed in 42c73bfb (pushed to master). RoleGrants, ClusterEdit, NodeEdit and AclEdit Delete buttons now open the shared RawConfirmDialog naming the item (group+role / cluster id / node id / ACL id+principal); only Confirm deletes.

Tests: new bUnit render tests (DeleteConfirmRenderTests, 4): modal opens without deleting, Cancel keeps the item, Confirm deletes. Non-vacuity: reverting ClusterEdit and RoleGrants to direct delete turned their tests red (2 failed / 2 passed), then restored. Release build 0 warnings; AdminUI.Tests 1966/1966 passed (AKKA_TEST_TIMEFACTOR=3); OpcUaServer.IntegrationTests 132/132 passed. bUnit is test-only; its AngleSharp advisory is suppressed in the test csproj because patched AngleSharp breaks bunit 2.0.33-preview.

The /fleet/diagnostics FAULTED DEVICES note is left for the owner (filed separately).

Fixed in 42c73bfb (pushed to master). RoleGrants, ClusterEdit, NodeEdit and AclEdit Delete buttons now open the shared RawConfirmDialog naming the item (group+role / cluster id / node id / ACL id+principal); only Confirm deletes. Tests: new bUnit render tests (DeleteConfirmRenderTests, 4): modal opens without deleting, Cancel keeps the item, Confirm deletes. Non-vacuity: reverting ClusterEdit and RoleGrants to direct delete turned their tests red (2 failed / 2 passed), then restored. Release build 0 warnings; AdminUI.Tests 1966/1966 passed (AKKA_TEST_TIMEFACTOR=3); OpcUaServer.IntegrationTests 132/132 passed. bUnit is test-only; its AngleSharp advisory is suppressed in the test csproj because patched AngleSharp breaks bunit 2.0.33-preview. The /fleet/diagnostics FAULTED DEVICES note is left for the owner (filed separately).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#785