5.1 KiB
5.1 KiB
Quickstart: Workspace Home & Admin Landing
Feature: 129-workspace-admin-home | Date: 2026-03-09
Scope
This feature turns /admin into the canonical workspace-level home by:
- adding a real workspace overview page,
- preserving workspace selection as the only precondition,
- stopping normal
/adminaccess from silently redirecting into tenant context, - exposing a primary
Overviewnavigation item, - adding bounded workspace-safe summary, attention, and recent-operation surfaces,
- keeping
Switch workspaceandManage workspacesdistinct.
Implementation order
- Create the new workspace overview page under the existing admin panel.
- Update
/adminlanding behavior so selected-workspace requests render the overview instead of delegating to tenant branching. - Constrain direct
/adminrequests without workspace context to chooser-first behavior in the workspace-selection middleware. - Register
Overviewas the first relevant admin navigation item and confirm brand-logo navigation resolves back to/admin. - Add capability-safe summary cards and bounded recent or needs-attention surfaces using existing canonical destinations.
- Add quick actions for choose tenant, operations, alerts, switch workspace, and manage workspaces when authorized.
- Update or replace legacy tests that currently assert
/adminredirects to tenant chooser or tenant dashboard. - Run focused Sail-based tests.
- Run Pint on dirty files.
Reference files
- app/Providers/Filament/AdminPanelProvider.php
- routes/web.php
- app/Http/Middleware/EnsureWorkspaceSelected.php
- app/Support/Workspaces/WorkspaceRedirectResolver.php
- app/Filament/Pages/ChooseWorkspace.php
- app/Filament/Pages/ChooseTenant.php
- app/Support/Middleware/EnsureFilamentTenantSelected.php
- tests/Feature/Filament/AdminHomeRedirectsToChooseTenantWhenWorkspaceSelectedTest.php
- tests/Feature/Filament/LoginRedirectsToChooseWorkspaceWhenMultipleWorkspacesTest.php
- tests/Feature/Filament/WorkspaceOverviewLandingTest.php
- tests/Feature/Filament/WorkspaceOverviewNavigationTest.php
- tests/Feature/Filament/WorkspaceOverviewContentTest.php
- tests/Feature/Filament/WorkspaceOverviewEmptyStatesTest.php
- tests/Feature/Filament/WorkspaceOverviewOperationsTest.php
- tests/Feature/Filament/WorkspaceOverviewAuthorizationTest.php
- tests/Feature/Filament/WorkspaceOverviewPermissionVisibilityTest.php
Suggested validation commands
vendor/bin/sail artisan test --compact tests/Feature/Filament/AdminHomeRedirectsToChooseTenantWhenWorkspaceSelectedTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/LoginRedirectsToChooseWorkspaceWhenMultipleWorkspacesTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewLandingTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewNavigationTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewContentTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewEmptyStatesTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewOperationsTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewAuthorizationTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/WorkspaceOverviewPermissionVisibilityTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/ChooseTenantRequiresWorkspaceTest.php
vendor/bin/sail artisan test --compact tests/Feature/Guards/AdminWorkspaceRoutesGuardTest.php
vendor/bin/sail bin pint --dirty --format agent
Expected outcome
/adminis a real workspace-level home whenever a workspace is selected.- Direct
/adminaccess without workspace context goes to choose-workspace instead of silently auto-resuming into tenant context. - The admin brand logo and primary navigation lead back to the workspace home.
- Workspace home content is capability-aware, tenantless by default, bounded, and non-polling by default.
- Legacy tenant-forcing assumptions are contained to explicit chooser or tenant-required flows.