openai / gpt-6-astra / medium / medium effort preferred over cursor / composer-2.5 / Composer 2.5 default / unknown effort · clear win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
MVP source audit; taskCategory=ux; module category=ux, difficulty=high, expectedTests=none. Workspace navigation, role-aware shell and layout state across the shell and its focused navigation tests. Source review only; no tests run. Use only exact supplied files and cite file plus original line. Do not run tests, use shell/globs/root traversal, live services, databases, customer data, or edit source. Report concrete source-proven issues with impact and confidence, otherwise state no findings. Identify every excluded boundary explicitly; do not infer production readiness. This source-only audit packet is bound to verified merged main commit 9dab4e99d3bfadf995dbaa031b9b6a365970e1e3; it does not verify runtime or production behavior.
openai / gpt-6-astra / medium / medium effort answer
## Conclusion
Direct, independent review of all 20 supplied files found **five source-proven issues**. No tools, tests, runtime checks, or edits were performed.
Evidence is limited to packet `sha256:d44ebc3ebabfab1c97f69230cb62766b52edc2ac299c211c46c8eb0ba17fcb67`, bound to commit `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3`. This does not establish runtime behavior or production readiness.
## Findings
### 1. Standard navigation offers server-excluded modules
**Severity: Medium · Confidence: 0.99**
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:332–343` constructs Standard navigation from the entire fixed registry, without checking `workspace.modules`.
- `[REDACTED: private project name]/frontend/src/lib/navRegistry.ts:184–189` includes Map & Pipes and Plans & Reports unconditionally.
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:200–214` rejects an unavailable server-backed module and redirects to the default landing.
**Impact:** When the resolved workspace excludes Reports, the shell still supplies a Reports navigation item whose handler leads back to another page. Workspace-specific navigation is inconsistent with module eligibility.
**Recommendation:** Derive Standard items from resolved modules plus the intentional client-only allowlist.
**Boundary:** The supplied code proves the incompatible navigation inputs and handler behavior; actual rendering by the excluded `V3Sidebar` is unverified. This is not evidence of backend authorization bypass.
### 2. Legacy workspace hamburger changes state that its shell never renders
**Severity: Medium · Confidence: 0.99**
- `[REDACTED: private project name]/frontend/src/components/layout/TopBar.tsx:23–30` toggles `sidebarDrawerOpen` below 1280px.
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:368–392` renders the legacy sidebar using only `sidebarCollapsed`.
- Its complete legacy return, lines **368–689**, contains no drawer.
- `[REDACTED: private project name]/frontend/src/hooks/useV3Shell.ts:43–50` supports selecting this legacy branch.
**Impact:** In legacy workspace mode below 1280px, the hamburger announces opening/closing the menu but cannot change the rendered sidebar. The expanded sidebar continues consuming 240px.
**Recommendation:** Connect the legacy workspace branch to a drawer or give its hamburger a supported collapse action.
### 3. Workspace switching leaves existing workspace reads able to overwrite optimistic state
**Severity: Medium · Confidence: 0.92**
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:119–124` maintains an active workspace query.
- The switch handler at **226–276** overwrites its cache and starts the PATCH without cancelling an existing query.
- Only the newly requested invalidation is sequenced after PATCH success, at **254–257**.
- Canonical navigation immediately follows whatever workspace occupies that cache, at **213–214**.
**Impact:** If a workspace GET is already in flight when a switch occurs, its old response can replace the optimistic target and redirect the user back before the post-PATCH refetch corrects it. Sequencing the new refetch does not protect against the existing read.
**Recommendation:** Cancel outstanding workspace queries before the optimistic update and protect overlapping switches from stale completion/rollback.
**Boundary:** This identifies a source-level race under the stated request ordering, not an observed runtime occurrence.
### 4. Focused navigation tests exercise copies rather than the implementation
**Severity: Medium · Confidence: 1.00**
- `[REDACTED: private project name]/frontend/src/__tests__/WorkspaceShell.multinav.test.tsx:189–202` defines its own switch handler; **199–200** patch and immediately invalidate.
- The actual handler defers invalidation until success: `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:251–258`.
- The test also uses `['userWorkspace']` at line **192**, whereas the real key is `['user-workspace']` in `[REDACTED: private project name]/frontend/src/api/queryKeys.ts:662–664`.
- `[REDACTED: private project name]/frontend/src/__tests__/PlatformWorkspacesPage.test.tsx:89–100` invokes a locally created mock directly and asserts that same invocation, without exercising a production handler.
**Impact:** These tests cannot catch removal or breakage of the actual switch/save behavior. The switch test specifically preserves the immediate-invalidation sequence that production code intentionally avoids.
**Recommendation:** Exercise exported production logic or mounted handlers, including PATCH settlement and rollback, rather than inline mirrors.
### 5. Standard smoke assertions require routes that the current resolver deliberately redirects
**Severity: Medium · Confidence: 1.00**
- `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts:209–214` includes `/inspections` and `/repairs`.
- Lines **238–243** require those route segments to survive navigation.
- `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:215–230` excludes both from the client-only allowlist.
- The smoke workspace fixture at **69–73** also excludes them from server modules.
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:200–214` therefore resolves both to the fixture’s default landing.
**Impact:** The assertions contradict the supplied resolver and fixture. Successful rendering of the intended fallback would fail these tests.
**Recommendation:** Assert the intended redirects or replace the removed destinations with supported routes.
Additional coverage limits: the Pro suite is explicitly skipped at `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts:138`; its purported nonblank assertion accepts zero characters at **178**. Neither establishes working Pro layout.
## Discarded or unproven hypotheses
- Client-only Uploads bypasses workspace-module filtering intentionally (`[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:117–122`); excluded module/backend implementations prevent any authorization-bypass conclusion.
- Frontend role values matching the test’s hardcoded list does not prove backend enum parity.
- Drawer accessibility, breakpoint coordination in V3 chrome, feature enforcement inside modules, and tenant isolation cannot be established from the supplied shell alone.
## Explicit excluded boundaries
All files outside the declared 20-file packet are excluded. Specifically, the listed direct dependencies below were **not reviewed**. Paths are relative to `[REDACTED: private project name]/frontend/src/`, retaining the packet’s dependency names:
- **API/auth:** `api/client.js`, `api/superAdmin.js`, `api/auth.js`, `api/dashboard.js`, `auth/AuthContext.js`.
- **Configuration/hooks:** `config/features.js`, `hooks/useMediaQuery.js`, `hooks/usePermissions.js`, `hooks/useCommandCenter.js`.
- **Supporting logic:** `lib/roleLabels.js`, `lib/clientToServerMigration.js`, `lib/useUserPreferencesQueue.js`, `components/review-tabs/playbackSpeeds.js`.
- **Chrome:** `components/layout/OrgSwitcher.js`, `components/layout/SurfaceSwitcher.js`, `components/layout/OffboardingBanner.js`, `components/layout/SidebarDrawer.js`, `components/layout/TrustStrip.js`, `components/layout/V3Sidebar.js`, `components/layout/V3TopBar.js`.
- **Other components:** `components/alerts/AlertDropdown.js`, `components/assistant/AssistantBubble.js`, `components/assistant/assistantBubbleVisibility.js`, `components/chat/ChatPanel.js`, `components/common/ErrorBoundary.js`, `components/common/Toast.js`, `components/consultant/CommandCenter.js`, `components/media/ProcessingIndicator.js`, `components/v3-review/V3ProDevToggle.js`.
- **Stores:** `store/useAIStore.js`, `store/useExplorerStore.js`, `store/useLayerStore.js`, `store/useMapRailUIStore.js`, `store/useMonitorUIStore.js`, `store/useProfileBankFilterStore.js`, `store/useViewUIStore.js`, `store/useWorkspaceProModeStore.js`, `stores/useV3SessionStore.js`.
- **Module bodies:** `components/workspace/modules/MunicipalExplorerModule.js`, `components/workspace/modules/MunicipalReportsModule.js`, `components/workspace/modules/MunicipalUploadsModule.js`, `components/workspace/modules/V3InspectionsModule.js`, `components/workspace/modules/V3RepairsModule.js`, `components/workspace/modules/V3TodayModule.js`, `pages/v3/V3InspectionReview.js`.
Also excluded: route mounting and guards; platform workspace editor implementation; backend resolver, schemas, role enum, persistence and authorization; global CSS and tooling configuration; dependency implementations; live services, databases and customer data; browser rendering, assistive-technology behavior, actual network ordering, test execution and deployment state.
**Next useful action:** Correct the navigation/state mismatches and align focused test contracts with production behavior in a separately authorized implementation task.
MATERIAL_EVIDENCE_CONFLICT: `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts:238–243` requires inspections/repairs URLs to remain, while `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:225–229` removes their routability and `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:200–214` redirects them.
cursor / composer-2.5 / Composer 2.5 default / unknown effort answer
# UX source audit — workspace navigation, role-aware shell, layout state
**Commit:** `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3` (source-only; no runtime verification)
---
## 1. Conclusion (with evidence)
### Finding A — V3 Standard sidebar always shows full `V3_STANDARD_NAV`; no server module / tier filter
**Severity (UX):** Medium
**Confidence:** 0.88
When `v3Shell` is on, `WorkspaceShell` maps the entire fixed registry into sidebar items and navigates purely by `moduleKey`, without checking `workspace.modules` or license gates.
```333:344:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
const standardItems = V3_STANDARD_NAV.map((d) => ({ key: d.key, label: d.label, icon: d.icon, attn: d.attn }))
...
const onNavigateStandard = (navKey: string) => {
const def = V3_STANDARD_NAV.find((d) => d.key === navKey)
const moduleKey = def?.moduleKey ?? navKey
navigate(`/w/${workspace.key}/${moduleKey}`)
}
```
Module resolution then drops unknown / non–client-only keys to `default_landing` and canonicalizes the URL:
```200:214:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
const resolvedModuleKey: string =
activeModuleKey && (
workspace.modules.some((m) => m.module_key === activeModuleKey) ||
isClientOnlyModuleKey(activeModuleKey)
)
? activeModuleKey
: workspace.default_landing
...
if (workspace.key !== workspaceKey || resolvedModuleKey !== activeModuleKey) {
return <Navigate to={`/w/${workspace.key}/${resolvedModuleKey}`} replace />
}
```
`V3_STANDARD_NAV` still includes e.g. Plans & Reports (`municipal.reports-amp`), which is **not** client-only:
```180:190:[REDACTED: private project name]/frontend/src/lib/navRegistry.ts
export const V3_STANDARD_NAV: V3StandardNavDef[] = [
{ key: 'today', label: 'Today', icon: Activity, moduleKey: 'today', attn: true },
{ key: 'map', label: 'Map & Pipes', icon: Map, moduleKey: 'municipal.explorer' },
...
{ key: 'reports', label: 'Plans & Reports', icon: Printer, moduleKey: 'municipal.reports-amp' },
{ key: 'uploads', label: 'Uploads', icon: FileUp, moduleKey: 'municipal.uploads' },
]
```
```215:230:[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts
export const CLIENT_ONLY_MODULE_KEYS: ReadonlySet<string> = new Set<string>([
...
'today',
// NOTE: 'inspections' / 'repairs' were removed from this allowlist ...
])
```
**Impact:** User can see a nav label (e.g. Plans & Reports) and land on `default_landing` after redirect, with no module-specific toast (toasts are scoped to inaccessible **workspace** keys, not modules). Feels like a broken nav item.
**Implication:** Role/workspace module gating visible in legacy sidebar (server `workspace.modules`) may not match V3 Standard chrome (`V3Sidebar` implementation not in packet).
---
### Finding B — URL workspace key that is *accessible* but not *active* is rewritten without the “inaccessible workspace” toast
**Severity (UX):** Medium
**Confidence:** 0.85
Toast logic only fires when the URL workspace key is **not** in `accessible_workspaces` and not the active key:
```177:189:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
const urlInaccessible =
!!workspaceKey &&
workspace.key !== workspaceKey &&
!workspace.accessible_workspaces.some((w) => w.key === workspaceKey)
if (urlInaccessible && !inaccessibleNotifiedRef.current.has(workspaceKey)) {
...
addToast({
type: 'info',
message: `That workspace isn't available; switched to ${workspace.name}.`,
})
```
Canonical redirect runs for **any** `workspace.key !== workspaceKey`, including when the URL key is listed as accessible:
```208:214:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
if (workspace.key !== workspaceKey || resolvedModuleKey !== activeModuleKey) {
return <Navigate to={`/w/${workspace.key}/${resolvedModuleKey}`} replace />
}
```
The multinav test documents that accessible-but-non-active keys are **not** “inaccessible” (no toast path):
```140:147:[REDACTED: private project name]/frontend/src/__tests__/WorkspaceShell.multinav.test.tsx
it('returns false when URL key is in accessible_workspaces (different from active)', () => {
...
// 'consultant' is in accessible — NOT inaccessible (just stale; canonical
// redirect handles it without a toast).
```
**Impact:** Bookmarks or shared links like `/w/consultant/...` can snap to the server-resolved active workspace with **no** explanation, while truly unknown keys get an info toast.
**Implication:** Multi-workspace navigation UX is asymmetric by design in source; may confuse users who expect URL workspace to stick when they still have access.
---
### Finding C — Playwright Standard smoke routes contradict `CLIENT_ONLY_MODULE_KEYS` for `inspections` / `repairs`
**Severity (test / UX contract):** Medium
**Confidence:** 0.92
Modules were removed from the client-only allowlist; comments say URLs should fall back to `default_landing`:
```225:229:[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts
// NOTE: 'inspections' / 'repairs' were removed from this allowlist for the
// beta Workspace cleanup (beta-workspace-ui-cleanup-v1 [S1]). Their modules
// remain registered in MODULE_REGISTRY (dormant) but are no longer routable
// via direct URL nor surfaced in nav — /w/:ws/inspections|repairs now falls
// back to default_landing in WorkspaceShell.
```
Nav registry aligns (inspections/repairs not in `V3_STANDARD_NAV`):
```185:187:[REDACTED: private project name]/frontend/src/lib/navRegistry.ts
// Inspections / Repairs are hidden from the Workspace (beta) nav — the V3
// placeholder modules stay registered but dormant (no nav surface, no
```
Smoke spec still hits those routes and asserts the URL **stays** on the segment:
```209:244:[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts
const STANDARD_ROUTES = [
'/w/municipal/today',
'/w/municipal/inspections',
'/w/municipal/repairs',
...
if (['today', 'inspections', 'repairs'].includes(routeSegment)) {
expect(finalUrl, `Route ${route} was redirected away`).toContain(routeSegment)
}
```
Given `WorkspaceShell` resolution (Finding A’s same block), `inspections` / `repairs` should canonicalize away unless re-added to `CLIENT_ONLY_MODULE_KEYS`.
**Impact:** Documented “Phase C” Standard route checks are **out of sync** with shell routing policy; if executed, they encode the wrong expected behavior.
**Note:** Tests were not run per audit rules; finding is purely static inconsistency.
---
### Finding D — `WorkspaceShell.multinav.test.tsx` switch-flow mirror ≠ production invalidation timing
**Severity (regression guard):** Low–medium
**Confidence:** 0.90
Test documents immediate `invalidate` in the handler:
```163:211:[REDACTED: private project name]/frontend/src/__tests__/WorkspaceShell.multinav.test.tsx
it('handler issues: setQueryData (modules:[]) → patchUiState → invalidate → navigate', () => {
...
void queryClient.invalidateQueries()
navigate(`/w/${target.key}/${target.default_landing}`)
```
Production invalidates **only** on `patchUiState` success; navigate is immediate; errors roll back:
```251:276:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
patchUiState.mutate(
{ workspace: { key: target.key } },
{
onSuccess: () => {
void queryClient.invalidateQueries({
queryKey: queryKeys.userWorkspace.all,
})
},
onError: () => { ... rollback ... },
},
)
navigate(`/w/${target.key}/${target.default_landing}`)
```
**Impact:** CI “contract” tests can pass while production sequencing differs (PATCH-then-invalidate race fix in comments at 245–248). Weak guard for the race called out in the test file’s own commentary.
**Implication:** UX during workspace switch (stale modules vs redirect) is governed by production code, not the test mirror.
---
### Finding E — V3 branch drops module-scoped `<main>` labeling present on legacy workspace chrome
**Severity (a11y / UX):** Low–medium
**Confidence:** 0.80
Legacy path:
```671:676:[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx
<main
className="flex-1 min-w-0 overflow-hidden relative"
role="main"
aria-live="polite"
aria-label={`${activeLabel} module`}
```
V3 path delegates chrome to `V3AppShell`; supplied `main` has `role="main"` only:
```183:183:[REDACTED: private project name]/frontend/src/components/layout/V3AppShell.tsx
<main className={mainClassName} style={{ background: 'var(--bg-primary)' }} role="main">
```
**Impact:** Screen-reader users lose the explicit “{module} module” landmark naming and `aria-live="polite"` on module switches in the default (V3-on) path.
**Uncertainty:** `V3TopBar` / in-module headings may partially compensate (not in packet).
---
### Finding F — `useV3Shell` override read once per mount
**Severity (UX edge):** Low
**Confidence:** 0.75
```57:61:[REDACTED: private project name]/frontend/src/hooks/useV3Shell.ts
export function useV3Shell(): boolean {
const override = useMemo(() => readFrontendOverride(), [])
return override ?? true
}
```
**Impact:** Changing `?v3shell=` during in-app navigation without full reload will not flip shell mode; only initial load / storage matters.
**Implication:** Rollback/compare flows that rely on query param mid-session may appear “stuck.”
---
## 2. Alternatives / likely false positives
- **Pro role-aware nav drift:** `buildProNavGroups` in `navRegistry.ts` is explicit about parity with legacy `Sidebar.tsx`, but **`V3Sidebar` / Pro shell wiring are outside the packet** — cannot confirm V3 Pro nav matches role gates (false positive risk if V3Sidebar duplicates logic correctly).
- **Tooltip keyboard UX:** `Tooltip.tsx` attaches handlers on a wrapping `span`; without running browsers, whether focus always opens tooltips for collapsed workspace icons is **not** source-proven either way.
- **Hydration mount point:** `useUserPreferencesHydration` comment says mount in AppShell; `WorkspaceShell` also calls it (line 98). Double-mount vs gap on Pro-only sessions depends on `AppShell` (excluded) — not a finding from this packet alone.
---
## 3. Missing evidence / excluded boundaries
**Explicitly excluded (per packet):** All “missing direct dependencies” (e.g. `AuthContext`, `usePermissions`, `V3Sidebar`, `V3TopBar`, `AppShell`, `client.js`, module page bodies, backend `workspace_resolver.py` / `roles.py`), plus any runtime, E2E execution, databases, and production readiness.
**Consequence:** Cannot verify: V3 sidebar item filtering UI, Pro surface guard, org-switch + workspace cache behavior end-to-end, platform admin role-mapping page UX, or whether Playwright smokes ever run green in CI.
**In-packet test honesty:** Vitest files state they do **not** mount the DOM (`WorkspaceShell.multinav.test.tsx` lines 5–10; `PlatformWorkspacesPage.test.tsx` lines 5–8) — navigation/shell UX is mostly contract comments + Playwright scaffold (`v3-shell-smoke.spec.ts` TODOs lines 16–25, Pro suite skipped lines 130–137).
---
## 4. Next useful action
1. Align **V3 Standard nav** with `workspace.modules` + `isClientOnlyModuleKey` (or placeholder UX) before shipping beta broadly (Finding A).
2. Decide product behavior for **accessible non-active workspace URLs** — toast vs honor URL vs switcher-only (Finding B).
3. Update **`v3-shell-smoke.spec.ts` Standard routes** to match `CLIENT_ONLY_MODULE_KEYS` (drop or change expectations for `inspections` / `repairs`) (Finding C).
4. Refresh **multinav test** switch contract to match PATCH `onSuccess` invalidate + error rollback (Finding D).
---
**Verified-positive patterns (brief):** Workspace switch uses optimistic `modules: []`, PATCH persistence, rollback on error (`WorkspaceShell.tsx` 226–271); synthetic active workspace in sidebar (`306–319`); `user-workspace` query key centralized and org-scoped in `queryKeys.ts` (662–664, 809–810); multi-workspace helper tests for sidebar prepend and inaccessible detection (`WorkspaceShell.multinav.test.tsx` 44–154).
---
MATERIAL_EVIDENCE_CONFLICT: `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts` (209–244) expects `/w/municipal/inspections` and `/repairs` to remain on-segment, while `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts` (225–229) and `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx` (200–214) imply those segments canonicalize to `default_landing` when not client-only.Primary judge's stated reason
A provides a more actionable source-only audit through the supported legacy hamburger finding and more complete boundary disclosure, while better separating intentional behavior from defects. This supports a clear comparative preference, not a claim that its conditional race was reproduced or that every additional concern in B is invalid.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 87604684-5410-4204-96bf-6143dab2c1dc. Pair: brp1_aebf94e4f8a2b60ee36299684581618b3915801b89d98d3951073bc3c975d85a. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.