xai / grok-4.7-efficient / 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. Dashboard layout, widget/query state and API/schema contracts, including their focused 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.
xai / grok-4.7-efficient / medium / medium effort answer
This source-only review does not establish production readiness. The supplied dashboard view path has several concrete UX and contract breaks: widgets can show the wrong frame, ignore query results, overlap on tablet, and apply cross-filters across unrelated datasets. Corrupt-layout recovery and first-run persona choice do not do what the same files describe.
## Findings
1. **Cross-filters are applied to every other widget with no dataset check.** High impact. Confidence 0.93.
`WidgetCard` merges `getEffectiveFilters(widget.id)` into that widget’s query (`[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx` 40–58). The store copies every other widget’s condition in (`[REDACTED: private project name]/frontend/src/store/useDashboardFilterStore.ts` 141–149). A click sends `operator: 'eq'` on `dimensions[0]` (`WidgetCard.tsx` 117–139). A material/status click on one dataset is posted to widgets on other datasets. Those widgets either show “Failed to load data” (`WidgetCard.tsx` 192–196) or a silently wrong subset. Own-widget exclusion only stops a self-loop; it does not scope by dataset.
2. **Click actions do not match the shapes `transformQueryResult` actually emits.** High impact. Confidence 0.94.
`handleClick` reads `payload[dimension] ?? payload.name`, and `asset_detail` reads `asset_id` or `id` (`WidgetCard.tsx` 114–145). Bar/line transforms emit only `{name, value}` (`WidgetCard.tsx` 253–275), so explorer/filter can work via `name`, but `asset_detail` never sees an id. `exception_feed`, `aging_buckets`, and `action_queue` emit `title`/`range`/`status` (`WidgetCard.tsx` 304–340) and are what `WidgetRenderer` passes to `onClick` (`[REDACTED: private project name]/frontend/src/components/dashboard/WidgetRenderer.tsx` 90–99). Those clicks return at `WidgetCard.tsx` 124. Table, timeline, map, gauge, and KPI never receive `onClick` (`WidgetRenderer.tsx` 65–101).
3. **`forecast_summary` and `risk_heatmap` cannot display query rows.** High impact. Confidence 0.92.
Both types are allowlisted (`WidgetRenderer.tsx` 35–44) and rendered from `data.at_risk_5y`, `data.critical_5y`, and `data.distribution` (`WidgetRenderer.tsx` 73–76, 233–259). `transformQueryResult` has no case for them and falls through to `{ rows }` (`WidgetCard.tsx` 363–364). A successful query still renders `--` and empty bands. `DashboardPage` only feeds widgets through `WidgetCard` (`[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx` 536, 573).
4. **Config-only narrative and map data is never built when there is no query.** High impact. Confidence 0.9.
`widgetData` is set only when a query result exists (`WidgetCard.tsx` 64). The narrative/map fallbacks live inside `transformQueryResult` (`WidgetCard.tsx` 225–232, 342–346), so they never run for a widget with no `query`. `WidgetRenderer` then gets `data={undefined}` (`WidgetCard.tsx` 199–202). Builder preview has the same hole: it renders `WidgetRenderer` with no `data` (`[REDACTED: private project name]/frontend/src/components/dashboard/BuilderCanvas.tsx` 161–163). Whether `NarrativeTextWidget` / `MapWidget` read `config` themselves is outside this packet.
5. **Every live widget is a card inside a card, with the title twice.** High impact. Confidence 0.96.
`WidgetCard` draws border, padding, and `widget.title` (`WidgetCard.tsx` 153–186), then mounts `WidgetRenderer`, which draws another border, padding, and the same title (`WidgetRenderer.tsx` 107–122). Builder cells add a third header (`BuilderCanvas.tsx` 130–163) around that renderer chrome. Height is already fixed by the grid (`DashboardPage.tsx` 552, 534), so the duplicate chrome steals the plot area.
6. **Tablet layout math overlaps widgets.** High impact. Confidence 0.95.
At 768–1279px, width and x are scaled independently (`DashboardPage.tsx` 544–569). Example: 12-col `{x:0,w:5}` and `{x:5,w:7}` become `gridColumn` `1 / span 3` and `3 / span 4`, sharing a column. `{x:0,w:7}` plus `{x:7,w:5}` overlaps the same way (`round(7/12*6)=4` at x=0, and `floor(7/12*6)=3` with width `round(2.5)=3`). There is no overlap pass. Full-width mode also does not clamp `w` to 12.
7. **“Reset to default” does not recover the layout that is actually broken.** High impact. Confidence 0.95.
URL id wins before preferences (`DashboardPage.tsx` 144–155). The button only PATCHes `default_dashboard_id: null` (`DashboardPage.tsx` 427–433). A bad `/dashboards/:id` layout stays on screen. A corrupt persona clone is used when no default id matches (`DashboardPage.tsx` 170–178`); clearing the default pointer does not change that clone. There is no navigation off the URL and no layout rewrite. `updatePrefs.mutate` has no error UI on this path.
8. **Consultant dashboard access is decided from localStorage, not server view-as.** High impact. Confidence 0.9.
The page redirects when `isConsultant && !getActiveOrgId()` (`DashboardPage.tsx` 104–111). `getActiveOrgId()` reads only `localStorage.active_org_id` (`[REDACTED: private project name]/frontend/src/api/client.ts` 256–258). Server state is `user.active_org_id` / `last_active_org_id` (`[REDACTED: private project name]/frontend/src/auth/AuthContext.tsx` 60–62), and localStorage is filled later in a parent effect (`AuthContext.tsx` 94–101). The redirect effect does not read those fields and does not re-run when they change. A consultant with cookie/server view-as and empty localStorage is sent to `/consultant` even though the file comment says view-as should see the dashboard (`DashboardPage.tsx` 104–106). This audit does not execute effect order; the missing server-field check is enough.
9. **First visit does not offer a persona choice, and the empty state cannot start one.** High impact. Confidence 0.91.
The file header says no preference shows `PersonaSelector` (`DashboardPage.tsx` 3–7). The effect instead writes `persona: 'engineer'` and clones that pack (`DashboardPage.tsx` 193–227`) and never sets `showPersonaSelector`. The selector opens only from a button that requires `prefs.persona` already (`DashboardPage.tsx` 358–377, 461–466). The no-widget empty state tells the user to select a persona and passes no `action` (`DashboardPage.tsx` 450–455). If the preference write fails, `onError` only rearms the ref (`DashboardPage.tsx` 218–220`); the user has no control.
10. **A widget render error sticks for that id.** Medium impact. Confidence 0.88.
`WidgetErrorBoundary` sets `hasError` and never clears it (`DashboardPage.tsx` 47–81). It is not keyed by dashboard id; the cell key is only `widget.id` (`DashboardPage.tsx` 533–537, 565–575). `WidgetGrid` is not remounted when `activeConfig.id` changes. A crashed `w1` stays crashed after a refetch, and again if the next dashboard also has `w1`.
11. **Gauge scale and action-queue status are invented in the client.** Medium impact. Confidence 0.86.
Gauge transform returns `{ value }` only (`WidgetCard.tsx` 263–265`). `GaugeWidget` assumes max 100 (`WidgetRenderer.tsx` 208–211`). A count of 5000 draws as 100%. `max === 0` is not guarded, unlike `CoverageMeterWidget.tsx` 8. Action-queue `title` and `status` are both `rows[dimension]` (`WidgetCard.tsx` 332–338). Timeline always reads columns named `date` and `type` (`WidgetCard.tsx` 348–355`), not the query’s dimension keys. `result.meta.truncated` is never read (`[REDACTED: private project name]/frontend/src/api/dashboardData.ts` 24–35, `WidgetCard.tsx` 61–64), so a capped query looks complete.
12. **Dashboard filters ignore the preferences contract and can throw on write.** Medium impact. Confidence 0.9 for the split; 0.7 that numeric ids collide across orgs.
Filters persist at `[REDACTED: private project name]-dashboard-filters-${dashboardId}` with no org id (`useDashboardFilterStore.ts` 45–66). `UserPreferencesResponse.dashboard_filter_presets` exists (`[REDACTED: private project name]/frontend/src/api/userPreferences.ts` 228, 249) and this store never reads or writes it. `persistFilters` has no try/catch; `loadPersistedFilters` does (`useDashboardFilterStore.ts` 47–66). `setItem` failure (private mode, quota) aborts `removeCondition` before `set` (`useDashboardFilterStore.ts` 89–96), and the filter bar is outside the widget error boundary. `setConnector` is never called from this packet, so a stored `OR` connector is also dropped: `getEffectiveFilters` returns conditions only (`useDashboardFilterStore.ts` 141–149) and `WidgetCard` keeps `baseQuery.filters.connector` (`WidgetCard.tsx` 54–56). That OR path is latent here.
13. **Share is offered without the permission check the dialog documents.** Medium impact. Confidence 0.84 that the client does not gate; server enforcement is not in this packet.
Header comment: only owner/admin can change visibility, only admin can publish (`[REDACTED: private project name]/frontend/src/components/dashboard/ShareDialog.tsx` 1–6). `DashboardPage` opens it for any `activeConfig` (`DashboardPage.tsx` 405–408). `ShareDialog` always PATCHes (`ShareDialog.tsx` 32–35). `usePermissions` is not used. Failure copy assumes a 403 (`ShareDialog.tsx` 109–112). Modals also have no `role="dialog"`, `aria-modal`, labelled close control, or Escape path (`PersonaSelector.tsx` 19–65, `ShareDialog.tsx` 42–61). Filter dismiss buttons are icon-only (`DashboardFilterBar.tsx` 59–71, 104–116).
14. **Relation query builder hardcodes AND, including among root conditions.** High impact for the semantic contract in this packet. Confidence 0.93.
`buildExecutableAssetRelationQuery` accepts `connector` (`[REDACTED: private project name]/frontend/src/lib/semanticQueryBuilder.ts` 351–355) and never reads it. The group is always `connector: 'and'` over root nodes plus the relation (`semanticQueryBuilder.ts` 372–385). The comment immediately above says that connector is how root conditions combine with each other, not with the relation (`semanticQueryBuilder.ts` 379–382). An OR pair plus a relation is sent as one AND group. Relation child predicates are also not re-checked against the catalog (`semanticQueryBuilder.ts` 308–340); only root `FilterCondition`s fail closed (`semanticQueryBuilder.ts` 361–369).
15. **Relation intent inlines membership and hardcodes inspection type ids.** Medium impact. Confidence 0.86.
Comments say the browser may recognize `active_status_set` and must not hold membership (`[REDACTED: private project name]/frontend/src/api/semanticQuery.ts` 79–88; `[REDACTED: private project name]/frontend/src/lib/relationIntent.ts` 65–66). `interpretRelationIntent` copies `named_sets[].values` into an `in` list (`relationIntent.ts` 533–558). PACP/MACP/LACP become fixed `NASSCO_*_V7` strings if the field key exists (`relationIntent.ts` 106–110, 515–528), with no catalog enum check. The vocabulary loop returns on the first lexeme (`relationIntent.ts` 453–614), so “inspections and open work orders” captures only inspections and leaves “work orders” in `remainder` for the legacy parser — the mis-answer class the file header describes (`relationIntent.ts` 11–29). `nlParser.js` is not in this packet, so the remainder’s exact second interpretation is not proven here.
16. **Focused tests do not lock the UI behavior they name.** Medium impact. Confidence 0.98.
`DashboardLayout.test.tsx` 1–12 says it covers corrupt-layout error UI and `is_default` checkbox load/save. Cases 1–2 only call `parseLayout` (`DashboardLayout.test.tsx` 19–36). Cases 3–4 and the error-banner cases are `it.todo` (`DashboardLayout.test.tsx` 50–62). `invalid_widget` is a real `parseLayout` result (`[REDACTED: private project name]/frontend/src/lib/parseLayout.ts` 21–26) and is handled in `DashboardPage.tsx` 416–424, but it has no test. `parseLayout` accepts any finite `x/y/w/h`, including `0` and negatives, and does not require `title` or `config` (`parseLayout.ts` 21–27), so layouts that will not grid still return `ok: true`.
## Discarded or not proven
- `useWidgetData` stringifies the query before the query key (`[REDACTED: private project name]/frontend/src/api/dashboardData.ts` 55–57). That matches the object-key rule in `AGENTS.md` 321–328. Not a finding.
- Refresh correctness depends on `queryKeys.dashboardData.all` being a prefix of `queryKeys.dashboardData.query`. `queryKeys` is not in the packet. Not asserted.
- Onboarding dismiss sharing one localStorage key is explicit (`OnboardingBanner.tsx` 13–14, 24–55), not an accident. Sandbox filtering of consultant clients (`OnboardingBanner.tsx` 63) is outside the named domain-array ban in `DATA_OWNERSHIP.md` 54; pagination of `useConsultantClients` is not in the packet.
- Coverage arc direction and builder drop-vs-`onLayoutChange` clobber (`BuilderCanvas.tsx` 56–86) were not promoted. The builder page’s state update, and react-grid-layout event order, are not in the packet.
- Missing `municipality_id` on these client helpers is not treated as a tenant-isolation defect. Semantic requests set `tenant_scope_required: true` (`semanticQueryBuilder.ts` 233, 395); enforcement would be server-side and is not in this packet.
## Excluded boundaries
Not reviewed and not inferred: backend routers, SQL, authz, DTO tests, and the files named in the packet’s missing-dependency list (`queryKeys`, `csrf`, `mediaTokens`, `crossTabReset`, `useLogout`, `resetRegistry`, `orgScopedResets`, `auth` API/types, `useUppy`, `useToastStore`, `uploadConfig`, `useDrillThrough`, `UnknownDataCoachingBanner`, `nlParser`, `consultant`/`inspections`/`media` clients, and the `.js` widgets imported by `WidgetRenderer.tsx` 13–23). Also absent: dashboard builder page, route feature guards, and `domainView.ts`. No tests were run. No live API, database, or browser behavior was observed. Commit `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3` binds this snapshot only.
## Next useful action
Repair and re-review the in-packet breaks first: dataset-scoped filters, transform/click shapes for every allowlisted type, config-only narrative/map, tablet grid overlap, corrupt-layout recovery, and the consultant check against `user.active_org_id`. Do not treat `DashboardLayout.test.tsx` as coverage of those paths until the `it.todo` cases call the page. Confirm relation `OR` and named-set token shape against the backend contract before changing `semanticQueryBuilder.ts`.
MATERIAL_EVIDENCE_CONFLICT: DashboardPage.tsx 3–7 says no persona preference shows PersonaSelector, but DashboardPage.tsx 193–227 auto-assigns engineer and never opens it; semanticQueryBuilder.ts 379–382 says input.connector combines root conditions with each other, but semanticQueryBuilder.ts 383 hardcodes connector 'and' on the root-plus-relation group.cursor / composer-2.5 / Composer 2.5 default / unknown effort answer
# Dashboard MVP UX — source-only audit
**Commit bound:** `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3`
**Lens:** layout, widget/query state, API/schema contracts, in-scope tests
**Method:** supplied files only; no runtime, tests, or out-of-packet source.
---
## 1. Conclusion (high-confidence issues)
### F1 — URL dashboard resolution can stay stale after route change
**Severity:** High (wrong layout/widgets on `/dashboards/:id`)
**Confidence:** 0.92
`resolvedDashboard` reads `urlConfigId` but the `useMemo` dependency list omits it, so switching between URL-addressed dashboards (or from default to URL) can reuse a prior resolution until `prefs` / `configs` / `personas` change.
```140:191:[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx
const resolvedDashboard = useMemo((): {
widgets: (WidgetConfig & { query?: DashboardQuery })[]
layoutError: 'invalid_json' | 'not_array' | 'invalid_widget' | null
} => {
// 0. URL explicitly names a dashboard (e.g. /dashboards/49) — always wins.
if (urlConfigId != null && configs) {
...
}
...
}, [prefs, configs, personas])
```
**Impact:** Wrong widgets, missing layout error UI, or stale empty state after navigation via the switcher (`navigate(\`/dashboards/${cfg.id}\`)` at 309–310).
---
### F2 — Dashboard global filter `connector` (AND/OR) is never applied to widget queries
**Severity:** Medium–High (incorrect query semantics when OR is ever set)
**Confidence:** 0.88
The store persists `FilterGroup.connector` (`useDashboardFilterStore.ts` 18–21, 99–103), but `WidgetCard` only merges `filters.conditions` and keeps the widget/base connector, never `filters.connector` from the store.
```40:58:[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx
const effectiveQuery = useMemo<DashboardQuery | null>(() => {
...
const effectiveConditions = getEffectiveFilters(widget.id)
...
return {
...baseQuery,
filters: {
connector: baseQuery.filters?.connector ?? 'AND',
conditions: [...existingConditions, ...allConditions],
},
}
}, [widget.query, widget.id, widget.config, getEffectiveFilters, globalFilters, crossFilters])
```
```141:149:[REDACTED: private project name]/frontend/src/store/useDashboardFilterStore.ts
getEffectiveFilters: (excludeWidgetId) => {
const { filters, crossFilters } = get()
const effective = [...filters.conditions]
...
return effective
},
```
**Impact:** Any UI that sets OR on the dashboard filter group still sends AND semantics to `POST /dashboard-data/query` unless the widget’s own `query.filters.connector` overrides.
---
### F3 — Server `filter_config` on dashboard config is not wired to filter state
**Severity:** Medium (saved server filters vs local-only behavior)
**Confidence:** 0.85
API type includes `filter_config`; switching dashboards only loads `localStorage` keyed by id, with no use of `activeConfig.filter_config` in `DashboardPage` or `setDashboardId`.
```16:28:[REDACTED: private project name]/frontend/src/api/dashboards.ts
export interface DashboardConfigResponse {
...
filter_config: FilterConfigPayload | null
...
}
```
```74:76:[REDACTED: private project name]/frontend/src/store/useDashboardFilterStore.ts
setDashboardId: (id) => {
const filters = loadPersistedFilters(id)
set({ dashboardId: id, filters, crossFilters: new Map() })
},
```
```132:136:[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx
useEffect(() => {
setDashboardId(activeConfig?.id ?? null)
}, [activeConfig?.id, setDashboardId])
```
**Impact:** Org/translated filters from the backend (`FilterConfigPayload`) never hydrate the bar or widget queries; users only see `[REDACTED: private project name]-dashboard-filters-${id}` local state. `UserPreferencesResponse.dashboard_filter_presets` (userPreferences.ts 228) is likewise unused in this packet.
---
### F4 — Duplicate widget titles in the live dashboard path
**Severity:** Medium (visual/clutter, especially print)
**Confidence:** 0.95
`WidgetCard` renders a title row; `WidgetRenderer` always renders another title inside the same card.
```168:179:[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx
<div ...>
<span>{widget.title}</span>
```
```107:122:[REDACTED: private project name]/frontend/src/components/dashboard/WidgetRenderer.tsx
return (
<div ...>
<div style={{ fontSize: 13, fontWeight: 600, ... marginBottom: 8 }}>
{widget.title}
</div>
```
**Impact:** Double headings on every widget; builder preview (`BuilderCanvas` 138–142 + 163) adds a third chrome layer with its own header.
---
### F5 — Documented “show PersonaSelector on no preference” vs implementation
**Severity:** Medium (first-run UX)
**Confidence:** 0.80
File-level comment promises a modal when there is no preference; empty state does not open `showPersonaSelector`, and a separate effect auto-assigns `persona: 'engineer'` for non-consultants.
```4:8:[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx
* Resolution logic:
* ...
* 3. No preference → show PersonaSelector modal (muni/contractor orgs only)
```
```450:456:[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx
<DashboardEmptyState
title="No dashboard configured"
description="Select a persona to get started with a dashboard tailored to your role."
```
`showPersonaSelector` is only toggled from the persona settings control when `prefs?.persona` already exists (358–377), not from the empty state. Auto-migration (198–227) can bypass manual persona choice.
**Impact:** New users may see a static empty state or silent default to engineer without the modal described in the module comment.
---
### F6 — Layout/test contract gap: `invalid_widget` and builder checkbox behavior untested
**Severity:** Medium (regression risk on corrupt layouts / default flag)
**Confidence:** 0.90
`parseLayout` can return `invalid_widget` (parseLayout.ts 21–26); `DashboardPage` surfaces it (422–424). Tests cover only `invalid_json` and `not_array`; builder `is_default` cases are `it.todo`.
```21:26:[REDACTED: private project name]/frontend/src/lib/parseLayout.ts
if (!parsed.every((widget: unknown) => {
...
})) return { ok: false, error: 'invalid_widget' }
```
```50:62:[REDACTED: private project name]/frontend/src/__tests__/DashboardLayout.test.tsx
describe('DashboardBuilderPage — set-as-default checkbox', () => {
it.todo('shows corrupt-layout error banner when urlConfig has invalid JSON')
...
it.todo('loads is_default=true from urlConfig and renders checkbox as checked')
```
**Impact:** Plan 5 cases 3–4 and DOM-level corrupt-layout banners have no pinned behavior in this packet.
---
### F7 — Unknown-data coaching banner latched across refetches/filter changes
**Severity:** Low–Medium (misleading coaching after cross-filter)
**Confidence:** 0.75
Banner state is fixed after first data load per `widget.id`; it does not reset when `effectiveQuery` or filter store changes (only `widget.id` resets the latch).
```71:85:[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx
// Reset latch when widget changes identity
const prevWidgetId = useRef<string>(widget.id)
if (prevWidgetId.current !== widget.id) {
...
bannerLatch.current = BANNER_UNSET
}
```
```88:110:[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx
if (bannerLatch.current === BANNER_UNSET && widgetData !== undefined) {
...
bannerLatch.current = ...
}
```
**Impact:** After cross-filtering away “Unknown” dominance, banner can remain; conversely a first load without banner won’t appear after filters widen unknown share.
---
### F8 — Share dialog: active option is not actionable (only the inactive side toggles)
**Severity:** Low (UX confusion)
**Confidence:** 0.85
Personal row calls `handleToggle` only when already published; published row calls toggle only when not published. Selected state uses `cursor: 'default'`.
```69:77:[REDACTED: private project name]/frontend/src/components/dashboard/ShareDialog.tsx
<button
onClick={() => { if (isPublished) handleToggle() }}
...
cursor: isPublished ? 'pointer' : 'default',
```
```86:94:[REDACTED: private project name]/frontend/src/components/dashboard/ShareDialog.tsx
<button
onClick={() => { if (!isPublished) handleToggle() }}
...
cursor: !isPublished ? 'pointer' : 'default',
```
**Impact:** Users may think the highlighted option is disabled; they must click the non-selected row to change visibility.
---
### F9 — Onboarding banner: client-side `.filter` on consultant client list
**Severity:** Low for UX audit; Medium for architecture alignment
**Confidence:** 0.70 (`needs_verification` for product intent)
```63:64:[REDACTED: private project name]/frontend/src/components/dashboard/OnboardingBanner.tsx
const realClientCount = (consultantClients ?? []).filter((c) => !c.is_sandbox).length
```
Contrasts with `DATA_OWNERSHIP.md` rule that list-like domain views should not use client `.filter()` on server-owned arrays (lines 17–19, 54). May be acceptable as UI grouping; not provable as bug without backend contract for `is_sandbox`.
---
### F10 — Split `WidgetConfig` shapes (dashboards API vs renderer)
**Severity:** Low (contract drift)
**Confidence:** 0.82
`dashboards.ts` includes optional `query`; `WidgetRenderer`’s exported `WidgetConfig` omits `query` (types 25–32 vs 40–55 in dashboards.ts). `parseLayout` casts parsed JSON to `dashboards` `WidgetConfig` without validating `query` or widget `type` against `WIDGET_TYPE_ALLOWLIST`.
**Impact:** Invalid types render placeholder in renderer; missing `query` yields null `effectiveQuery` and loading/disabled data path without layout parse error.
---
## 2. Alternatives / likely false positives
- **Consultant bounce** (`DashboardPage` 107–110): Brief flash of dashboard chrome before `navigate('/consultant')` is possible; severity depends on router timing (not provable here).
- **`JSON.stringify(query)` cache key** (`dashboardData.ts` 55–57): Key instability from key order is a performance concern, not a functional bug in this packet.
- **`useUpdateDashboard` invalidates only list key** (`dashboards.ts` 107–109): Stale detail cache is plausible but `queryKeys.dashboardConfigs.detail` is **outside** the packet — cannot confirm.
- **DATA_OWNERSHIP vs `transformQueryResult`**: Chart shaping in `WidgetCard` (221–365) is presentation of aggregate query rows, not Explorer domain arrays; flagging as full SoT violation would overstate vs dashboard API design.
---
## 3. Excluded boundaries and missing evidence
**Explicitly out of packet (per scope JSON + missing-deps list):**
`queryKeys.js/ts`, `csrf.js`, `mediaTokens.js`, `useDrillThrough.js`, `UnknownDataCoachingBanner.js`, all unstated widget modules (`MapWidget`, `DataHealthWidget`, etc.), `nlParser.js`, dashboard **builder page** (only `BuilderCanvas.tsx` in scope), backend `/dashboards` and `/dashboard-data` handlers, `resetRegistry` / org-switch interaction with dashboard filters.
**Not inferred:** production readiness, CI arch-check allowlist, runtime TanStack Query behavior, whether `queryKeys.dashboardData.all` prefix matches all widget queries (`DashboardHeader` 47–48).
**Consequence:** Cannot verify manual refresh coverage, drill-through URLs, or server acceptance of merged filter DTOs.
---
## 4. Next useful action
1. Fix **F1** by adding `urlConfigId` (and likely `configs` stability) to `resolvedDashboard` deps.
2. Wire **F2**: pass `filters.connector` from `useDashboardFilterStore` into `DashboardQuery.filters.connector` when merging global conditions.
3. Hydrate **F3**: on `setDashboardId`, call `resetToDefaults` from `activeConfig.filter_config` when present (and define precedence vs localStorage).
4. Remove duplicate title in **F4** (renderer title only in builder preview, or `WidgetCard`-only on dashboard).
5. Align first-run UX (**F5**) with either auto-engineer migration or PersonaSelector + tests in `DashboardLayout.test.tsx` (**F6**).
---
**Overall:** Multiple source-proven UX/state contract issues; the highest-impact fix in-packet is **F1** (stale URL dashboard resolution). No claim that the dashboard is production-ready or that backend contracts match frontend types beyond what is typed in the supplied API modules.Primary judge's stated reason
A provides the more useful source-audit result across the requested layout, widget/query, and semantic-contract scope, with actionable source traces for several additional defects. This is a clear comparative coverage advantage, not a claim that every A finding is proven or that runtime failures were observed.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: a74ee767-4b32-4c9f-aba3-8297b9f8fec4. Pair: brp1_e0335d6923af17e7765982b658155b9b4f274f09e07e51152a61b93dbde33893. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.