TenantAtlas/specs/121-workspace-switch-fix/quickstart.md
2026-03-08 01:55:28 +01: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.