## Summary - centralize all status-like badge semantics via `BadgeCatalog`/`BadgeRenderer` and new per-domain mappings plus coverage for every affected entity - replace ad-hoc badge colors in Filament tables/views with the shared catalog and add a guard test that blocks new inline semantics - stabilize restore views by avoiding `@php(...)` shorthand so Blade compiles cleanly, and document BADGE-001 in the constitution/templates ## Testing - `vendor/bin/sail php vendor/bin/pint --dirty` - `vendor/bin/sail artisan test tests/Unit/Badges tests/Feature/Guards/NoAdHocStatusBadgesTest.php` - `vendor/bin/sail artisan test tests/Feature/Monitoring/OperationsDbOnlyTest.php tests/Feature/Monitoring/OperationsTenantScopeTest.php` - `vendor/bin/sail artisan test tests/Feature/RestoreRunWizardMetadataTest.php tests/Feature/Filament/SettingsCatalogRestoreApplySettingsPatchTest.php` Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #71
30 lines
1.0 KiB
Markdown
30 lines
1.0 KiB
Markdown
# Quickstart — Unified Badge System (v1)
|
||
|
||
## Prereqs
|
||
- Run everything via Sail.
|
||
|
||
## Setup
|
||
- `vendor/bin/sail up -d`
|
||
- `vendor/bin/sail composer install`
|
||
|
||
## Run tests (targeted)
|
||
Existing safety nets to keep green:
|
||
- `vendor/bin/sail artisan test tests/Feature/Monitoring/OperationsDbOnlyTest.php`
|
||
- `vendor/bin/sail artisan test tests/Feature/Monitoring/OperationsTenantScopeTest.php`
|
||
|
||
When the feature is implemented, add + run:
|
||
- Badge mapping tests (new).
|
||
- Status-like ad-hoc mapping guard test (new).
|
||
|
||
## Manual QA (tenant-scoped)
|
||
- Operations/Monitoring: queued/running/completed + outcome badges are consistent and success is never warning.
|
||
- Drift findings: severity mapping is consistent (low=neutral, medium=warning, high=danger).
|
||
- Restore runs: all lifecycle statuses render consistently across list + detail.
|
||
- Dark mode: status-like badges remain readable; icons don’t appear disabled unless intentionally neutral.
|
||
|
||
## Frontend assets
|
||
If UI changes don’t show:
|
||
- `vendor/bin/sail npm run dev`
|
||
- or `vendor/bin/sail npm run build`
|
||
|