## Summary - retire legacy `/admin/t` and active `/admin/tenants` product surfaces in favor of canonical workspace-scoped managed-environment routes - centralize runtime URL generation through `ManagedEnvironmentLinks` and update intended URL handling to reject legacy tenant paths - remove dormant tenant panel runtime, rename test helpers to the admin environment context, and add guard coverage for route/helper regressions ## Validation - targeted Feature guard, workspace, provider connection, required permissions, and Filament test lanes run under Sail - browser smoke coverage run for provider connection and workspace RBAC environment access flows - formatting and diff checks completed with Pint and `git diff --check` ## Notes - Filament remains on v5 with Livewire v4 - provider registration stays in `apps/platform/bootstrap/providers.php` - retired tenant resource global search is disabled and destructive action confirmation rules remain unchanged Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #352
3.0 KiB
3.0 KiB
Quickstart: Managed Environment Canonical Route Cutover & Legacy Tenant Surface Retirement
Use this as the implementation command checklist. Refresh the baseline before editing code.
1. Safety
git status --short --branch
git diff --stat
git log -1 --oneline
2. Baseline Audit
cd apps/platform
./vendor/bin/sail artisan route:list | rg "admin/t|admin/tenants|provider-connections|required-permissions|workspaces/.*/environments|operations"
rg "TenantPanelProvider|panel:\s*'tenant'|panel:\s*\"tenant\"|/admin/t/|/admin/tenants|TenantResource::getUrl|TenantDashboard::getUrl|TenantRequiredPermissions::getUrl|setTenantPanelContext|admin\.operations" . --glob '!vendor' --glob '!node_modules'
Update:
specs/297-managed-environment-canonical-route-cutover/legacy-surface-audit.md
3. Focused Proof
cd apps/platform
./vendor/bin/sail artisan test --compact \
tests/Feature/Guards/NoLegacyTenantPanelRuntimeTest.php \
tests/Feature/Guards/NoActiveTenantResourceRoutesTest.php \
tests/Feature/Guards/ManagedEnvironmentCanonicalRouteContractTest.php \
tests/Feature/Workspaces/WorkspaceIntendedUrlLegacyRejectionTest.php \
tests/Feature/ProviderConnections/LegacyRedirectTest.php \
tests/Feature/ManagedEnvironment/LegacyTenantCoreGuardTest.php \
tests/Feature/Spec080WorkspaceManagedTenantAdminMigrationTest.php \
tests/Feature/Filament/ManagedEnvironmentAccessScopeManagementTest.php \
tests/Feature/Rbac/ProviderConnectionWorkspaceFirstPolicyTest.php
4. Existing Guard Pack
cd apps/platform
./vendor/bin/sail artisan test --compact \
tests/Feature/Guards/Spec288NoLegacyRouteAndHelperGuardTest.php \
tests/Feature/Guards/Spec288ProviderCoreAndRoleAuthorityGuardTest.php \
tests/Feature/Guards/AdminWorkspaceRoutesGuardTest.php \
tests/Feature/Guards/ProviderBoundaryPlatformCoreGuardTest.php \
tests/Feature/Guards/BrowserLaneIsolationTest.php \
tests/Feature/Guards/CiLaneFailureClassificationContractTest.php \
tests/Feature/Guards/CiHeavyBrowserWorkflowContractTest.php
5. Broad Focused Validation
cd apps/platform
./vendor/bin/sail artisan test --compact tests/Feature/Guards
./vendor/bin/sail artisan test --compact tests/Feature/Workspaces
./vendor/bin/sail artisan test --compact tests/Feature/ProviderConnections
./vendor/bin/sail artisan test --compact tests/Feature/RequiredPermissions
./vendor/bin/sail artisan test --compact tests/Feature/Filament
./vendor/bin/sail bin pint --dirty --format agent
git diff --check
6. Browser Smoke
Run only if visible navigation/browser flows are touched:
cd apps/platform
./vendor/bin/sail artisan test --compact \
tests/Browser/Spec281ProviderConnectionScopeSmokeTest.php \
tests/Browser/Spec285WorkspaceRbacEnvironmentAccessSmokeTest.php
7. Final Decision
Close with exactly one:
Managed Environment canonical cutover complete; legacy tenant surfaces retired.
Blocked by true runtime dependency on legacy tenant surface.
Incomplete; active legacy tenant routes remain.