2.3 KiB
2.3 KiB
Quickstart: Central Tenant Status Presentation
Goal
Implement a shared tenant lifecycle presentation contract that keeps draft, onboarding, active, and archived explicit and consistent across tenant management surfaces and the tenantless operations viewer surface.
Prerequisites
- Work on branch
146-central-tenant-status-presentation - Sail services available for running tests and formatting
- Review these existing code anchors before implementation:
app/Support/Tenants/TenantLifecycle.phpapp/Support/Badges/BadgeCatalog.phpapp/Support/Badges/Domains/TenantStatusBadge.phpapp/Services/Tenants/TenantOperabilityService.phpapp/Filament/Resources/TenantResource.phpresources/views/filament/pages/choose-tenant.blade.phpapp/Filament/Pages/Operations/TenantlessOperationRunViewer.phpapp/Filament/Resources/OperationRunResource.php
Suggested Implementation Order
- Add a central lifecycle presentation object or presenter in the tenant/support layer.
- Refactor badge-only lifecycle rendering to source label, tone, and icon from that contract without breaking BADGE-001.
- Add concise and detailed helper-text variants for surfaces that need more than a badge.
- Update tenant list/detail surfaces to consume the new contract.
- Update choose-tenant and onboarding-linked lifecycle wording to use the canonical lifecycle vocabulary.
- Update the tenantless operations viewer referenced-tenant context, including the
OperationRunResourceenterprise-detail summary payload, to use the same contract. - Add focused unit and feature regression tests for all four lifecycle states and invalid fallback behavior.
- Run formatting and focused tests through Sail.
Focused Validation Commands
vendor/bin/sail artisan test --compact tests/Unit
vendor/bin/sail artisan test --compact tests/Feature/Filament
vendor/bin/sail artisan test --compact tests/Feature/Onboarding
vendor/bin/sail bin pint --dirty --format agent
Expected Outcomes
- Canonical lifecycle states never render as Unknown.
- Tenant list/detail and tenantless operations viewer surfaces reuse one lifecycle vocabulary.
- Lifecycle remains visually and semantically separate from provider, RBAC, verification, and run status.
- Invalid-data fallback is explicit and test-covered.