Skip to content

fix(dashboard): show failed saves with a retry - #43

Merged
WhiteMuush merged 1 commit into
developfrom
fix/dashboard-save
Oct 13, 2026
Merged

WhiteMuush merged 1 commit into
developfrom
fix/dashboard-save

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

Closes #37 (closed manually on merge, closing keywords do not apply to develop).

Bug

Every dashboard preset change ignored server failures: layout save, switching view, creating, renaming, deleting, changing a widget source, resetting. On a failed request the change looked saved and was lost on reload, or a deleted view came back.

Fix

  • saveRequest (src/lib/save-request.ts) returns null on a refused request or a network error, so a failure cannot be ignored by accident. Unit tested.
  • A failed save shows a bar: "Your last dashboard change was not saved", with Retry (replays the whole action) and a close button.
  • Rename and delete only apply once the server accepts. Create already did.

DashboardCanvas.tsx was at its 776-line cap: the Ctrl+wheel zoom moves to useCtrlWheelZoom.ts unchanged, and the file drops to 734 lines, with its cap tightened to match.

Verified in the browser (requests forced to 500, then allowed)

  • Create fails: bar shown, no new tab. Retry: tab created.
  • Rename fails: name unchanged. Retry and reload: new name kept.
  • Delete fails: tab stays. Retry and reload: tab gone.
  • Ctrl+wheel zoom still works (scale 1 to 1.82). No page error.

make check green.

Every preset change (layout, switch, create, rename, delete, source, reset) ignored server failures, so a change looked saved and vanished on reload. A failed save now shows a bar with Retry, and rename and delete only apply once the server accepts. The Ctrl+wheel zoom moves to its own hook to keep the file under its cap.
@WhiteMuush
WhiteMuush merged commit 9b60790 into develop Oct 13, 2026
14 checks passed
@WhiteMuush
WhiteMuush deleted the fix/dashboard-save branch October 13, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant