TenantAtlas/specs/121-workspace-switch-fix/quickstart.md
ahmido 891f177311 fix: route workspace switch to chooser (#147)
## 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
2026-03-08 00:58:51 +00:00

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 workspace link,
  • remove the duplicate user-menu Switch workspace shortcut,
  • 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 so Switch workspace targets the chooser helper with ?choose=1.
  2. Remove the admin user-menu Switch workspace shortcut from app/Providers/Filament/AdminPanelProvider.php.
  3. Extend tests/Feature/Monitoring/HeaderContextBarTest.php to assert the rendered context-bar link points to the chooser target.
  4. Extend tests/Feature/Workspaces/WorkspaceSwitchUserMenuTest.php to assert no user-menu shortcut is registered.
  5. Add or extend one workspace regression test to confirm management navigation remains separately reachable.
  6. Run focused Sail-based tests.
  7. Run Pint on dirty files.

Reference files

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.