43 lines
2.0 KiB
Markdown
43 lines
2.0 KiB
Markdown
# 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 workspace` link,
|
|
- keep chooser behavior unchanged,
|
|
- keep workspace management navigation unchanged,
|
|
- add focused regression coverage.
|
|
|
|
## Implementation order
|
|
|
|
1. Update [resources/views/filament/partials/context-bar.blade.php](../../../resources/views/filament/partials/context-bar.blade.php) so `Switch workspace` targets the chooser helper with `?choose=1`.
|
|
2. Extend [tests/Feature/Monitoring/HeaderContextBarTest.php](../../../tests/Feature/Monitoring/HeaderContextBarTest.php) to assert the rendered context-bar link points to the chooser target.
|
|
3. Add or extend one workspace regression test to confirm management navigation remains separately reachable.
|
|
4. Run focused Sail-based tests.
|
|
5. Run Pint on dirty files.
|
|
|
|
## Reference files
|
|
|
|
- [app/Filament/Pages/ChooseWorkspace.php](../../../app/Filament/Pages/ChooseWorkspace.php)
|
|
- [app/Providers/Filament/AdminPanelProvider.php](../../../app/Providers/Filament/AdminPanelProvider.php)
|
|
- [app/Http/Middleware/EnsureWorkspaceSelected.php](../../../app/Http/Middleware/EnsureWorkspaceSelected.php)
|
|
- [tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php](../../../tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php)
|
|
- [tests/Feature/Workspaces/ChooseWorkspacePageTest.php](../../../tests/Feature/Workspaces/ChooseWorkspacePageTest.php)
|
|
|
|
## Validation commands
|
|
|
|
```bash
|
|
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.
|
|
- Workspace management remains a separate administrative path.
|
|
- Existing chooser branching behavior and middleware semantics remain unchanged.
|