1.7 KiB
1.7 KiB
Route Contract: Workspace Switch Semantic Fix
Feature: 121-workspace-switch-fix | Date: 2026-03-07
Intent-level contract
Switch workspace
- Surface: admin and tenant-panel context bar
- Label:
Switch workspace - Canonical target:
ChooseWorkspace::getUrl(panel: 'admin').'?choose=1' - Meaning: enter the explicit workspace chooser flow
- User-menu duplication: not allowed
Manage workspaces
- Surface: existing administrative navigation / chooser management affordance
- Canonical target: workspace management resource index
- Meaning: create, view, and edit workspace records
Before / After
Before
Context bar "Switch workspace"
-> /admin/workspaces
-> lands on workspace management CRUD index
After
Context bar "Switch workspace"
-> /admin/choose-workspace?choose=1
-> lands on chooser flow
Invariants
- Workspace chooser remains the canonical manual-switch surface.
?choose=1remains the explicit forced-chooser signal for intentional switching.- The top-right user menu must not expose a duplicate workspace-switch shortcut.
- Workspace management remains separately reachable and semantically distinct.
- Choosing a workspace continues to use existing
WorkspaceIntendedUrl/WorkspaceRedirectResolverbehavior. - No new routes, middleware rules, or authorization rules are introduced.
Verification expectations
- Response rendering for a real admin page containing the context bar must show the chooser target.
- Filament user-menu evaluation must not register a
switch-workspaceitem. - Existing chooser behavior tests remain green.
- Workspace management navigation remains reachable through its existing destination.