← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / low / low effort preferred over openai / gpt-6-luna / max / max effort · close 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

Review runtime compatibility and error containment for persisted dashboard layouts after the shared parseLayout envelope guard. Trace accepted-but-malformed nested title, config/localFilters, and query payloads, plus finite but grid-invalid positions, through DashboardPage and its grid/per-widget boundary and through DashboardBuilderPage, BuilderCanvas, WidgetRenderer, and WidgetConfigEditor/DataSourcePicker. Check how unknown or legacy custom widget types and extra fields behave. Determine whether the dashboard Reset to default and builder Start fresh recovery flows change only selection/draft state or can overwrite persisted layouts. Report only source-proven crashes, misleading recovery behavior, or destructive overwrite paths, with exact file/line evidence and the smallest safe mitigation. Do not claim that database records are malformed, do not broaden the parser contract or reject custom types without proof, and state clearly if no remaining defect is established.

openai / gpt-6.1-sol / low / low effort answer

## Conclusion

Direct, read-only assessment of the supplied snapshot establishes remaining runtime-containment defects, misleading recovery behavior, and an explicit-save path that drops persisted query fields. It does **not** establish that any database record contains malformed data.

All paths below are relative to `[REDACTED: private project name]/frontend/src/`.

### 1. Accepted object titles can break the builder; dashboard failures are contained per widget

- `lib/parseLayout.ts:21–27` validates only the widget envelope and finite position coordinates; an object-valued `title` is accepted.
- `components/dashboard/BuilderCanvas.tsx:138–143` and `components/dashboard/WidgetRenderer.tsx:119–120` render that value directly as a React child. A plain object title causes a render error.
- `pages/DashboardBuilderPage.tsx:485–505` places neither the canvas nor editor inside a local error boundary. The resulting error escapes the builder’s local tree; any application-wide containment is outside this packet.
- Dashboard title rendering at `components/dashboard/WidgetCard.tsx:179` is inside the per-widget boundaries at `pages/DashboardPage.tsx:535–537,572–574`, so it produces “Widget failed to render,” rather than proving a whole-dashboard crash.

**Smallest safe mitigation:** normalize unsupported title values at display/input consumers, preserving the original payload, and add builder-local containment that leaves navigation and recovery controls accessible. Do not broaden the shared parser.

**Confidence:** high.

### 2. Nested filters and query fields can throw, but dashboard boundaries contain those render failures

Source-proven examples:

- With a truthy query, `config.localFilters: {}` throws during spread at `components/dashboard/WidgetCard.tsx:41–46`.
- `query.filters.conditions: {}` throws at `WidgetCard.tsx:51–56` when local or effective conditions make the merge branch execute.
- Given a nonempty query result:
  - Noniterable `metrics` throws for stacked widgets at `WidgetCard.tsx:283–290`.
  - Missing/null `metrics` throws for progress/coverage widgets at `WidgetCard.tsx:299,317`.
  - Object-valued `metrics`, or numeric metric elements, throw in the exception-feed `.find`/`.includes` chain at `WidgetCard.tsx:306`.

These failures occur within the dashboard’s per-widget boundary. Arbitrary JSON query payloads do not inherently fail `JSON.stringify`; `api/dashboardData.ts:55–62` forwards non-null queries, and request errors have a visible error state at `WidgetCard.tsx:192–196`. Server acceptance is not established here.

The builder preview does not execute `WidgetCard` or persisted queries: `BuilderCanvas.tsx:163` invokes `WidgetRenderer` without data. However, opening the editor passes malformed nested values onward:

- `WidgetConfigEditor.tsx:32–34,108–117` preserves non-null malformed query fields.
- With a matching loaded dataset containing metrics, object/number-valued `metrics` throws at `DataSourcePicker.tsx:74`.
- No builder-local editor boundary contains that error (`DashboardBuilderPage.tsx:497–505`).

**Smallest safe mitigation:** validate array shapes at filter-merging, query-transformation, and picker consumers; display a recoverable per-widget/editor error rather than silently persisting replacement values.

**Confidence:** high; query-result-dependent cases are conditional on receiving nonempty rows.

### 3. Dashboard “Reset to default” does not reliably recover the displayed layout

- The action only clears `default_dashboard_id` at `pages/DashboardPage.tsx:428–432`; it does not write a layout.
- URL selection still wins at `DashboardPage.tsx:145–152`, so resetting an invalid URL-addressed dashboard leaves that same invalid dashboard selected.
- Persona-cloned configuration selection remains active at `DashboardPage.tsx:171–179`, so clearing the default also cannot bypass an invalid matching persona configuration.
- Nevertheless, the descriptions promise “Reset to default to recover” at `DashboardPage.tsx:420–424`.

**Smallest safe mitigation:** offer route-aware “Back to my dashboard” for URL-addressed failures; for persona-config failures, offer another dashboard or builder recovery instead of promising that clearing the default will resolve them.

Separately, `resolvedDashboard` reads `urlConfigId` but omits it from its dependency list (`DashboardPage.tsx:145,191`). If only the route ID changes while other dependencies retain identity, the rendered layout/error remains stale.

**Smallest safe mitigation:** add `urlConfigId` to that memo’s dependencies.

**Confidence:** high.

### 4. Builder “Start fresh” does not overwrite the saved layout, despite its warning

`DashboardBuilderPage.tsx:433–434` warns, “This will discard your saved layout.” But `startNew` only resets draft/UI state and clears `configId` (`154–166`). Subsequent Save takes the create branch (`177–181`), not an update of the abandoned record.

**Smallest safe mitigation:** change the warning to “Start a new dashboard? The saved dashboard will remain unchanged.” No destructive recovery overwrite is established.

**Confidence:** high.

### 5. Saving an edited widget can overwrite persisted query fields unrelated to the edit

- `WidgetConfigEditor.tsx:38–44` reconstructs `query` with only dataset, metrics, dimensions, and fixed `limit: 1000, offset: 0`.
- Existing query filters, sort, custom fields, and prior pagination values are discarded—even when only changing the title.
- The builder replaces the widget’s whole query through its shallow update (`DashboardBuilderPage.tsx:121–124,500–502`).
- Dashboard Save serializes that modified draft and updates an existing record (`DashboardBuilderPage.tsx:171–178`; `api/dashboards.ts:103–105`).

Thus **Save Widget followed by dashboard Save** can overwrite a persisted query with a lossy replacement. This is not a Start fresh overwrite.

**Smallest safe mitigation:** preserve the existing object query and override only deliberately edited fields; retain pagination unless explicitly changed. Handle unsupported query shapes with an editor error rather than implicit conversion.

**Confidence:** high.

## Compatibility and limits

- Unknown/legacy custom type strings are accepted and render a placeholder (`parseLayout.ts:22–27`; `WidgetRenderer.tsx:102–103,317–320`). The allowlist restricts external drops (`BuilderCanvas.tsx:73`), not saved-layout loading. No rejection of custom types is justified.
- Top-level extra fields survive shallow widget updates. Config fields survive editor spreading (`WidgetConfigEditor.tsx:44`). Position extras are dropped when a layout callback replaces `position` (`BuilderCanvas.tsx:58–61`); their significance is unknown.
- Finite negative, fractional, zero-sized, or oversized positions reach CSS grid calculations (`DashboardPage.tsx:514–520,568–569`) and RGL (`BuilderCanvas.tsx:42–51`). CSS-invalid placement is not proof of a JavaScript crash. RGL implementation is outside the snapshot, so no RGL crash or destructive automatic normalization is established.
- Imported widget implementations and application-level boundaries are outside the packet; no further failures are inferred.

**Next useful action:** add real-consumer regression tests for object titles, malformed nested arrays, route-only dashboard changes, both reset-selection cases, and query-field preservation after title-only editing.

openai / gpt-6-luna / max / max effort answer

**Direct, read-only source analysis:** remaining crashes and data-loss paths are established. No database contents are inferred.

### Findings

1. **An object-valued title can crash the builder.** `parseLayout` checks `id`, `type`, and position, but not `title` (`parseLayout.ts:21–27`). `BuilderCanvas` renders `widget.title` directly (`BuilderCanvas.tsx:139–142`), and `WidgetRenderer` does too (`WidgetRenderer.tsx:119–121`). A JSON object title is therefore accepted but is not a valid React child. The dashboard wraps each `WidgetCard` in `WidgetErrorBoundary` (`DashboardPage.tsx:572–574`), so the failure is contained to that widget there; the supplied builder code has no corresponding boundary around its canvas or editor. **Mitigation:** render a safe fallback string at these display sites; do not reject custom widget types in the parser.

2. **Malformed nested filters and query metrics can crash a widget—or the builder editor.** `WidgetCard` spreads `config.localFilters` as an iterable without checking it (`WidgetCard.tsx:44–47`); an object value throws during render. With non-empty query results, missing/null `query.metrics` can throw in the `progress_bullet`/`coverage_meter` transforms, and non-iterable metrics can throw in `stacked_bar` (`WidgetCard.tsx:245–246, 281–295, 297–320`). A non-iterable `query.filters.conditions` can also throw when filters are merged (`WidgetCard.tsx:50–58`). Dashboard widget boundaries contain these render failures; query-result behavior depends on the API response, which is outside this packet. Separately, the editor seeds `metrics` from the saved query (`WidgetConfigEditor.tsx:32–34`), and `DataSourcePicker` calls `metrics.includes` (`DataSourcePicker.tsx:63–75`); an object-valued `metrics` crashes when a matching dataset is selected. No builder-local boundary is shown around the editor (`DashboardBuilderPage.tsx:496–505`). **Mitigation:** validate these shapes at their consumers and show a widget/editor-level configuration error rather than allowing the render to throw or silently dropping filters.

3. **Editing can discard persisted query and position extras.** `WidgetConfigEditor` rebuilds the query with only dataset, metrics, dimensions, limit, and offset (`WidgetConfigEditor.tsx:37–45`). The builder replaces the widget’s query with that result (`DashboardBuilderPage.tsx:121–124`); saving an existing dashboard then sends the whole layout through the update path (`DashboardBuilderPage.tsx:171–178`). Thus query fields such as filters, sort, or custom extras can be lost after editing and saving. Also, the parser test explicitly accepts and preserves `position.extra` (`parseLayout.test.ts:41–49`), but `BuilderCanvas` rebuilds position with only `x`, `y`, `w`, and `h` when its layout-change callback runs (`BuilderCanvas.tsx:56–63`). **Mitigation:** merge edited query fields into the existing query, and merge changed coordinates into the existing position.

4. **Dashboard “Reset to default” can leave the displayed error in place.** The action says it recovers the invalid layout, but only mutates `default_dashboard_id` (`DashboardPage.tsx:417–433`). A URL-addressed dashboard takes precedence over preferences (`DashboardPage.tsx:144–153`), so clearing the preference does not change the currently displayed invalid dashboard. If the selected default is also the matching persona clone, clearing the default can select that same config again (`DashboardPage.tsx:158–179`). **Mitigation:** make this action selection-aware—leave a URL-addressed dashboard or avoid presenting the same broken persona clone as the fallback; otherwise label it as clearing the saved selection, not repairing the layout.

### Recovery and boundaries

Builder **Start fresh** itself does not overwrite the saved layout: for parser errors, Save is blocked (`DashboardBuilderPage.tsx:58–60, 306–309`), and Start fresh clears local draft state and `configId` without calling a mutation (`DashboardBuilderPage.tsx:154–166, 431–435`). A subsequent save follows the create path, not the update path (`DashboardBuilderPage.tsx:177–183`). However, nested malformed values that pass `parseLayout` do not set `layoutError`; in particular, an object title can prevent the builder from rendering before its Start fresh UI is usable.

Finite but grid-invalid positions are accepted (the tests include negative, fractional, zero, and negative-size values: `parseLayout.test.ts:41–49`). The dashboard uses them in grid calculations and CSS placement (`DashboardPage.tsx:514–520, 523–538, 556–574`), and the builder passes them to `GridLayout` with size constraints but no explicit normalization (`BuilderCanvas.tsx:40–52`). **No additional crash or destructive overwrite from these positions is established by this snapshot**; the grid-library behavior is not included.

Unknown widget types alone are not shown to crash: the renderer uses a placeholder (`WidgetRenderer.tsx:102–104`), and the parser does not apply the editor/drop allowlist. Extra top-level widget fields survive the builder’s object spreads; the query and position losses above are the demonstrated exceptions.

**Next useful action:** add focused tests for object titles, non-array filters/metrics, editor round-tripping of query extras, position extras after layout changes, and reset behavior on URL-addressed and persona-cloned dashboards.

Primary judge's stated reason

A slightly better completes the recovery-behavior review by distinguishing a warning about saved-data destruction from the draft-only operation actually implemented and giving a minimal correction. This is a forced, weak preference between substantially equivalent answers, not an established material quality gap; an independent review could reasonably favor B's position-preservation guidance.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: fd07e73c-9cd1-42ac-ae73-7a3724f34d1c. Pair: brp1_4378c537e5058bf9e857ae5d52433c29a7016da06f0bca4eff7f8c5a715567fa. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.