- Use searchable multi-select with select all/clear\n- Track bulk progress per policy type\n- Update tests and spec tasks/quickstart
1.5 KiB
1.5 KiB
Contracts: Internal UI Actions (046)
This feature does not introduce a public HTTP API. It adds an internal Filament UI action that dispatches a queued job.
Action: Start Inventory Sync
Surface: Filament Page action (Inventory area)
Inputs
tenant_id: fromTenant::current()(required)selection_payload(required; default “full inventory”):policy_types:PolicyTypeResolver::supportedPolicyTypes()categories:[]include_foundations:trueinclude_dependencies:true
user_id:auth()->id()(required)
Side effects
- Creates
BulkOperationRun(resourceinventory, actionsync, total_items1) so the bottom-right progress widget displays the operation. - Dispatches
RunInventorySyncJobwith the needed identifiers. - Creates an
InventorySyncRunwith statusrunningonce the job begins execution. - Writes audit log entries:
inventory.sync.dispatched- terminal:
inventory.sync.completed|inventory.sync.failed|inventory.sync.skipped
- Sends Filament database notifications to the initiating user:
- started
- completed/failed/skipped
Failure modes
- Tenant not selected: action should be unavailable or no-op.
- Unauthorized user: action hidden/denied.
- Concurrency/lock gating: no overlapping run; user receives an informational message; run may be marked
skippedwith an error code. - Queue not running: operation remains queued; user can observe this via progress widget + run list.