## Summary - preserve portfolio triage arrival context from workspace overview and tenant registry drill-throughs - add a tenant dashboard continuity widget plus bounded arrival token and resolver support - add focused Pest coverage for arrival routing, return flow, RBAC degradation, and request-local performance - include the Spec 187 spec, plan, research, data model, quickstart, contract, and tasks artifacts ## Validation - integrated browser smoke: workspace overview -> tenant dashboard arrival -> backup sets CTA - integrated browser smoke: tenant registry triage -> tenant dashboard arrival -> return to tenant triage - branch includes focused automated test coverage for the new arrival-context surfaces Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #218
5.4 KiB
5.4 KiB
Quickstart: Portfolio Triage Arrival Context
Goal
Implement a small continuity layer that preserves why a tenant was opened from portfolio triage, what the operator should do next, and how to return to the portfolio flow, without adding persistence or new posture logic.
Implementation Sequence
-
Add the request-scoped arrival-context core.
- Create
PortfolioArrivalContext,PortfolioArrivalContextToken, andPortfolioArrivalContextResolverunderapps/platform/app/Support/PortfolioTriage/. - Add focused unit coverage for the token and resolver seam under
apps/platform/tests/Unit/Support/PortfolioTriage/. - Reuse the existing base64url token pattern already used elsewhere in the repo.
- Create
-
Emit arrival tokens from portfolio sources.
- Update workspace overview drilldown builders in
apps/platform/app/Support/Workspaces/WorkspaceOverviewBuilder.php. - Update tenant-registry tenant-open URLs when triage filters are active in
apps/platform/app/Filament/Resources/TenantResource.phpandapps/platform/app/Filament/Resources/TenantResource/Pages/ListTenants.php.
- Update workspace overview drilldown builders in
-
Render continuity on the tenant dashboard.
- Add
TenantTriageArrivalContinuityunderapps/platform/app/Filament/Widgets/Tenant/. - Add its Blade view under
apps/platform/resources/views/filament/widgets/tenant/. - Register the widget first in
apps/platform/app/Filament/Pages/TenantDashboard.php.
- Add
-
Reuse deeper continuity surfaces instead of replacing them.
- Keep
backup_health_reasonon backup-set destinations. - Keep
recovery_posture_reasonon restore-run list or detail destinations. - Keep subheading continuity in
ListBackupSets,ListRestoreRuns, andViewRestoreRunintact.
- Keep
-
Add regression coverage.
- Add workspace overview arrival-context tests.
- Add tenant-registry filtered return-path tests.
- Add tenant-dashboard rendering and RBAC degradation tests.
- Add tenant-dashboard performance coverage so arrival-context resolution stays request-local and query-safe.
- Keep existing workspace overview content, tenant-registry recovery triage, and backup or restore continuity regressions green.
Suggested Test Files
apps/platform/tests/Unit/Support/PortfolioTriage/PortfolioArrivalContextTokenTest.phpapps/platform/tests/Unit/Support/PortfolioTriage/PortfolioArrivalContextResolverTest.phpapps/platform/tests/Feature/Filament/WorkspaceOverviewArrivalContextTest.phpapps/platform/tests/Feature/Filament/TenantRegistryArrivalContextTest.phpapps/platform/tests/Feature/Filament/TenantDashboardArrivalContextTest.phpapps/platform/tests/Feature/Filament/TenantDashboardArrivalContextPerformanceTest.phpapps/platform/tests/Feature/Rbac/TenantDashboardArrivalContextVisibilityTest.phpapps/platform/tests/Feature/Filament/BackupSetListContinuityTest.phpapps/platform/tests/Feature/Filament/RestoreRunListContinuityTest.php
Existing Regression Suites To Keep Green
apps/platform/tests/Feature/Filament/WorkspaceOverviewContentTest.phpapps/platform/tests/Feature/Filament/TenantRegistryRecoveryTriageTest.php
Minimum Verification Commands
Run all commands through Sail from apps/platform.
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Unit/Support/PortfolioTriage/PortfolioArrivalContextTokenTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Unit/Support/PortfolioTriage/PortfolioArrivalContextResolverTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewArrivalContextTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantRegistryArrivalContextTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantDashboardArrivalContextTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantDashboardArrivalContextPerformanceTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Rbac/TenantDashboardArrivalContextVisibilityTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewContentTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantRegistryRecoveryTriageTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/BackupSetListContinuityTest.php
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/RestoreRunListContinuityTest.php
cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent
Manual Acceptance Checklist
- Open a flagged tenant from workspace overview backup attention and verify the tenant dashboard explains the backup concern before deeper widgets.
- Open a flagged tenant from workspace overview recovery attention and verify the dashboard explains the recovery concern and recommended next action.
- Open a tenant from filtered registry triage and verify the return link preserves filters and sort.
- Open the tenant dashboard directly without any arrival token and verify no continuity block appears.
- Use a role with limited destination access and verify the continuity block stays truthful without exposing a broken CTA.
Deployment Notes
- No migrations are required.
- No new assets are expected. Existing Filament asset deployment behavior remains unchanged.
- The feature should degrade cleanly if old or malformed links reach the tenant dashboard.