deepseek / deepseek-flash / none / unknown effort preferred over xai / grok-4.7-efficient / low / low 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
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.
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).xai / grok-4.7-efficient / low / low effort answer
The corrupt-layout recovery path traps in-progress builder edits and then discards them, while the confirm copy claims a server delete that never happens.
1. After a saved dashboard fails to parse, Save is disabled and the only recovery that clears the block wipes any widgets the user added, without deleting the saved record. In `DashboardBuilderPage.tsx`, a failed `parseLayout` in the URL load effect (lines 51–60) or `loadSavedConfig` (lines 122–130) sets `widgets` to `[]` and `layoutError` to `invalid_json` or `not_array`. `saveBlocked` (line 48) keeps Save disabled (lines 276–279) until that flag is cleared. `addWidget` (lines 86–102) and the canvas (`onLayoutChange={setWidgets}`, lines 439–459) still accept edits and do not clear `layoutError`. The banner’s “Start fresh” control (lines 399–403) is the documented way out: after `window.confirm('This will discard your saved layout. Continue?')` it calls `startNew()` (lines 138–146), which clears `widgets`, `layoutError`, and `configId` and does not call `deleteDashboard`. Edits made after the error are thrown away, and the next successful save creates a new dashboard, leaving the corrupt one in My Dashboards. “New” (line 252) does the same wipe with no confirm. Confidence: high.
2. Unconfirmed overwrite from “New”, template apply (lines 114–120), and `loadSavedConfig` (line 327) can also drop an unsaved canvas, but those are missing dirty checks rather than a dead-end. In `useServerGrid.ts`, a numeric header value that fails `parseNumericExpression` (lines 316–321) or a `type === 'function'` filter (lines 327–335) is omitted from the POST while the header still shows it, so results look unfiltered; that misleads during filtering, but it is not the builder edit trap above. A refetch of `urlConfig` resetting a dirty canvas (lines 51–67) is plausible and not established here.
3. `parseLayout`, `useDashboardConfig`, and `WidgetConfigEditor` are outside the packet. Consequence: the exact invalid-JSON vs not-array strings and whether a query refetch replaces a dirty canvas cannot be confirmed; the page-level trap does not depend on them.
4. Regression: load a dashboard whose `layout_json` is invalid; add a widget; assert Save cannot be the only exit that deletes that widget, that confirming “Start fresh” does not remove the server row, and that the corrupt config remains listed unless delete ran.Primary judge's stated reason
Forced, slight preference for B: its explicit correction and preservation-on-cancel assertion give an implementer a clearer actionable response to an established work-loss path. This is not an established material quality difference; A has the stronger primary reproduction, and an independent review could reasonably prioritize that advantage.
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_213abbd26ad4507cfd04ba1e48eebd50be5f1b3e2c97630ccef94e5ffabba06c. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.