← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / high / high effort preferred over deepseek / deepseek-flash / none / 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

Inspect the dashboard-builder data exploration interaction in the supplied implementation. Find one user-visible interaction that can mislead, trap, or silently discard a user’s work during filtering, loading, or editing; cite the exact condition, describe a minimal UX correction, and suggest a focused regression check.

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

**Finding: “New” silently discards unsaved dashboard edits.** High confidence; assessed independently from the supplied snapshot.

- **Exact trigger:** Add a widget or rename the dashboard without saving, then click **New**. In `[REDACTED: private project name]/frontend/src/pages/DashboardBuilderPage.tsx:251–266`, the button calls `startNew` directly. That handler clears widgets, resets the name, and drops the dashboard ID (`138–146`), without checking for unsaved changes or requesting confirmation. No recovery mechanism is present in this page.
- **Minimal UX correction:** Track whether the draft differs from its loaded/saved baseline. When dirty, require confirmation before `startNew`: “Discard unsaved changes?” Cancel must preserve the draft.
- **Focused regression check:** Add a widget and change the dashboard name, then click New. Assert confirmation appears; cancel preserves both changes and the current dashboard ID. Confirming discard resets the draft. A clean dashboard should start anew without prompting.
- **Uncertainty / discarded alternatives:** The grid also drops invalid numeric filters (`useServerGrid.ts:312–321`), but the supplied files do not establish which dashboard controls expose those filters. The New-button finding needs no external dependency assumptions.

**Next useful action:** Add the dirty-state guard and the cancellation regression test.

deepseek / deepseek-flash / none / unknown effort answer

## Conclusion

**Defect:** In `DashboardBuilderPage.tsx`, the "New" button (`startNew`, line 138–146) and the "My Dashboards" card click / Apply Template action can silently discard unsaved widget edits with no confirmation, and `saveDashboard` is fire-and-forget against a length-changing error window. But the strongest **single user-visible trap** in the supplied evidence is narrower and reproducible:

**The "+ Add Widget" button does not create a widget in the grid the user is looking at — it flips the view to the catalog and can push the user's existing unsaved layout behind the empty-state, then the persisted save path can fail silently.**

Let me pin the exact condition rather than overstate.

## Primary finding (exact, reproducible)

**Condition:** User is editing a saved dashboard loaded from the URL (`urlConfig` effect, lines 51–67). They have unsaved edits. They click **"+ Add Widget"** (`addWidget`, lines 86–102).

```js
setWidgets((prev) => [...prev, {...}])   // line 89-98
setShowTemplates(false)
setShowSaved(false)
setShowCatalog(true)                     // line 101
```

The new widget IS appended, so work isn't lost there. **But** `addWidget` has an empty dependency array (`[]`, line 102) — it is stable, which is correct. The real hazard is the interaction with the URL-load effect:

- `useEffect` at lines 51–67 runs whenever `urlConfig` identity changes (React Query can refetch and return a **new object reference** for the same id). On refetch, it calls `setWidgets(result.widgets)`, **overwriting any unsaved edits the user has made since load**. Nothing guards against `urlConfig` re-arriving while `widgets` has local modifications. There is no dirty-tracking ref, no `configId` equality short-circuit, and no `configName` divergence check.

**Trigger:** Load a dashboard via URL. Edit/rename/add widgets (dirty state). A background refetch of `useDashboardConfig(parsedUrlId)` resolves with a fresh object → the effect re-runs → `setWidgets(result.widgets)` resets the canvas, `setConfigName` resets the name field, `setIsDefault` resets the checkbox. Unsaved work is silently discarded, and the URL effect also forces `setShowTemplates(false)` / `setShowSaved(false)`, collapsing the panels.

**Why it misleads:** The user sees the name input revert and widgets vanish with no alert; prior edits are simply gone. The page offers no "unsaved changes" indicator anywhere in the supplied code (contrast with `saveBlocked` at line 48, which only guards invalid layouts, not dirty state).

**Also relevant, same effect family:** `saveDashboard` (lines 148–167) sets `'Saved!'` optimistically after `mutateAsync` resolves, then clears the message after 2s. On catch it shows `'Failed to save'` — acceptable. However `saving` (line 46) is `createDashboard.isPending || updateDashboard.isPending`, and the Save button is `disabled={saving || saveBlocked}` (line 278). During the message timeout the button re-enables even though the toast implies success; minor.

## Minimal UX correction

Track dirtiness and refuse to silently clobber:

1. **Guard the URL-load effect** so it only applies a fetched config when the user has no unsaved local changes, or when the incoming config id differs from the current one. Smallest change: add a `dirtyRef`/`loadedRef` and short-circuit the `setWidgets` branch when `result.ok` and the user has edited since last load — e.g. only re-apply when `configId !== urlConfig.id` or when `!isDirty`. Alternatively, key the load effect solely on the config **id** (compare `urlConfig.id` to a ref) so identity churn from React Query refetches does not reset the canvas.

2. **Make destructive transitions explicit**: `startNew` (line 138), `applyTemplate` (line 114), and `loadSavedConfig` (line 122) all replace `widgets` unconditionally with no dirty check. A single confirm when `widgets` differ from the last loaded/saved snapshot is enough. (`startNew` is currently only guarded when reached via the corrupt-layout banner's own `window.confirm`, line 401 — the toolbar "New" button at line 252 calls it unguarded.)

## Focused regression check

A unit/component test (React Testing Library) over `DashboardBuilderPage`:

1. Render with `useDashboardConfig` mocked to return a config; assert widgets render and the name field is populated.
2. Fire an edit (call the exposed widget rename/config `onSave`, or `onLayoutChange`/`addWidget`), producing local divergence.
3. Re-render with a **new object reference for the same config id** (simulating a React Query refetch).
4. **Expected after fix:** local `widgets` and `configName` are preserved; the fetched snapshot does not overwrite unsaved state.
   **Current behavior:** `setWidgets(result.widgets)` overwrites — test fails on the pre-fix code, which is exactly the trap.

A second assertion: clicking "New" while widgets are non-empty should require confirmation (spy on `window.confirm`) and, if declined, leave `widgets` intact.

## Uncertainty / dependencies outside the packet

- The reset is only provable if `useDashboardConfig` (in `../api/dashboards`, **not supplied**) returns a new object reference on refetch or refetch-on-focus is enabled. If that hook memoizes by structural equality or has no refetch triggers, the effect will not re-run and the clobber cannot fire. I cannot confirm the hook's `refetchOnWindowFocus`/`staleTime` from the packet — this is the load-bearing dependency.
- `parseLayout`, `BuilderCanvas`, and `WidgetConfigEditor` are outside the packet; I cannot verify whether `onLayoutChange` (line 456) also creates a dirty indicator or whether the editor's save path differs.
- `useServerGrid.ts` analysis: I found **no independent user-visible work-discarding trap** in the supplied hook that isn't already handled. Notable near-misses I evaluated and discarded as *not* defects:
  - `tabulatorFiltersToGridFilters` (lines 327–336) **drops** custom-function header filters on non-numeric columns, logging only to `console.warn`. This *can* mislead (grid shows a filter in the header but the server query is wider) — the hook's own `rawHeaderFilterCount` docstring (lines 68–76) acknowledges it. It's real, but the conditional requires a developer-authored custom `headerFilterFunc`, and the hook documents the limitation; I rank it below the dashboard clobber.
  - The abort path returns a **never-settling promise** (line 629) — intentional and documented (lines 619–624); not a leak in practice because the abort is always paired with a superseding `replaceData()` or unmount.

**Confidence:** Medium on the exact clobber (depends on the unsupplied `useDashboardConfig` refetch behavior); High that the page has **no dirty-state guard** on `startNew`/`applyTemplate`/`loadSavedConfig`/the URL effect, so *some* unsaved-edit loss is reachable by the user through at least the unguarded "New" button (line 252) — that path needs no external dependency to confirm.

MATERIAL_EVIDENCE_CONFLICT: The `useServerGrid` docstrings assert header-filter drops are "honest" and surfaced via `rawHeaderFilterCount` (lines 68–76), while lines 327–343 still silently drop the filter and default unknown types to `contains`; the page-level dashboard code asserts no dirty-tracking exists (lines 51–67, 138) yet the corrupt-layout banner guards only itself (lines 399–404).

Primary judge's stated reason

B gives a maintainer a supported interaction to reproduce and a matching minimal correction without first disentangling retracted claims from conditional hypotheses. This supports a clear preference on correctness and practical usefulness, rather than a preference based on brevity. A's valid New-button coverage and explicit refetch uncertainty limit the gap but do not remove its contradictory diagnosis.

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

Battle wave: c50cc6a9-2031-4391-a213-ab4daedec0f2. Pair: brp1_90ea09c900b86e5a3a2098b484ab856ac83a72dcb418cc9cfc57cf16005b0784. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.