Zusammenfassung: Fügt im „Run Inventory Sync“-Modal einen include_dependencies-Toggle hinzu und persistiert die Auswahl in der InventorySyncRun.selection_payload. Tests, Quickstart und Tasks wurden entsprechend aktualisiert. Files: InventoryLanding.php, InventorySyncButtonTest.php, quickstart.md, tasks.md Motivation: Ermöglicht explizites Ein-/Ausschalten der Dependency-Extraktion pro Sync-Run (z. B. Assignments/Scope Tags/Foundations), statt starrer Defaults. Passt zur bestehenden selection_hash-Logik (InventorySelectionHasher) und zur deterministischen Selektionspersistenz. Verhalten: include_dependencies ist im Modal standardmäßig true. Wird die Option gesetzt, landet der Wert als bool im selection_payload und beeinflusst selection_hash über die Normalisierung. Tests: Neuer/angepasster Pest-Test stellt sicher, dass include_dependencies in selection_payload persistiert. Lokaler Testlauf: ./vendor/bin/sail artisan test tests/Feature/Inventory/InventorySyncButtonTest.php → alle Tests für diese Datei bestanden. ./vendor/bin/pint --dirty wurde ausgeführt (Formatting ok). How to test (quick): Start Sail + Queue: Im Admin → Inventory: „Run Inventory Sync“ öffnen, Include dependencies umschalten, ausführen. Prüfen: neu erstellter InventorySyncRun.selection_payload.include_dependencies ist der gesetzten Auswahl entsprechend. Oder laufen lassen: Notes / Next steps: Diese Änderung bereitet den Weg, später die Dependency-Extraction (042-inventory-dependencies-graph) optional tiefer zu integrieren. Working tree ist sauber; es gibt ein nicht eingebundenes Verzeichnis 0800-future-features (unrelated). Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #47
1.3 KiB
1.3 KiB
Quickstart: Inventory Sync Button (046)
Goal
Start an Inventory Sync for the currently selected tenant from the Filament UI, observe progress in:
- Filament database notifications panel
- Bottom-right progress widget (BulkOperationProgress)
Local prerequisites
- Sail running
- Queue worker running (required for the new queued sync job)
Run locally
-
Start the stack:
./vendor/bin/sail up -d
-
Run a queue worker:
./vendor/bin/sail artisan queue:work --tries=1
-
Open the admin panel and pick a tenant:
- Visit
/adminand select a tenant context.
- Visit
-
Navigate to Inventory:
- Use the left navigation “Inventory”.
-
Click “Run Inventory Sync”:
- Select which policy types to include (or click “Select all”).
- (Optional) Toggle “Include dependencies” if you want dependency extraction where supported.
- You should see:
- A database notification (started)
- A bottom-right progress widget entry for
Sync inventory - A new Inventory Sync Run record in the Inventory Sync Runs list
Notes
- If the queue worker is not running, the progress widget will remain in “Queued…” and the run will not advance.
- Concurrency/lock gating may skip the run; the UI should show a clear informational message and a run record will reflect the skip reason.