## Summary - route the context-bar `Switch workspace` link to the canonical chooser flow instead of workspace management - add focused regression coverage for topbar switching, management separation, and chooser redirect semantics - add Spec 121 artifacts (`spec`, `plan`, `research`, `data-model`, `contracts`, `quickstart`, `tasks`, checklist) ## Validation - `vendor/bin/sail artisan test --compact tests/Feature/Monitoring/HeaderContextBarTest.php tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php tests/Feature/Workspaces/ChooseWorkspacePageTest.php tests/Feature/Workspaces/WorkspaceNavigationHubTest.php tests/Feature/Workspaces/EnsureWorkspaceSelectedMiddlewareTest.php tests/Feature/Workspaces/ChooseWorkspaceRedirectsToChooseTenantTest.php` - `vendor/bin/sail bin pint --dirty --format agent` ## Notes - base branch: `dev` - branch: `121-workspace-switch-fix` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #147
2.5 KiB
2.5 KiB
Quickstart: Workspace Switch Semantic Fix
Feature: 121-workspace-switch-fix | Date: 2026-03-07
Scope
A small navigation-semantic correction:
- update the context-bar
Switch workspacelink, - remove the duplicate user-menu
Switch workspaceshortcut, - keep chooser behavior unchanged,
- keep workspace management navigation unchanged,
- add focused regression coverage.
Implementation order
- Update resources/views/filament/partials/context-bar.blade.php so
Switch workspacetargets the chooser helper with?choose=1. - Remove the admin user-menu
Switch workspaceshortcut from app/Providers/Filament/AdminPanelProvider.php. - Extend tests/Feature/Monitoring/HeaderContextBarTest.php to assert the rendered context-bar link points to the chooser target.
- Extend tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php to assert no user-menu shortcut is registered.
- Add or extend one workspace regression test to confirm management navigation remains separately reachable.
- Run focused Sail-based tests.
- Run Pint on dirty files.
Reference files
- app/Filament/Pages/ChooseWorkspace.php
- app/Providers/Filament/AdminPanelProvider.php
- app/Http/Middleware/EnsureWorkspaceSelected.php
- tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php
- tests/Feature/Workspaces/ChooseWorkspacePageTest.php
Validation commands
vendor/bin/sail artisan test --compact tests/Feature/Monitoring/HeaderContextBarTest.php
vendor/bin/sail artisan test --compact tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php
vendor/bin/sail artisan test --compact tests/Feature/Workspaces/ChooseWorkspacePageTest.php
vendor/bin/sail bin pint --dirty --format agent
Expected outcome
- Context-bar switching always opens the chooser.
- The top-right user menu does not offer a duplicate workspace switch entry.
- Workspace management remains a separate administrative path.
- Existing chooser branching behavior and middleware semantics remain unchanged.