34 lines
1.4 KiB
Markdown
34 lines
1.4 KiB
Markdown
# 027 — Dashboards: remove manual save, autosave everything
|
|
|
|
## Summary
|
|
|
|
`Dashboards.tsx` currently has an explicit "Save dashboard" button
|
|
(`saveDashboard` called on click). The wishlist wants dashboards to always
|
|
autosave — no explicit save step, matching how settings/profile changes already
|
|
persist immediately elsewhere in the app.
|
|
|
|
## Scope
|
|
|
|
- Remove the "Save dashboard" button and the `saving`/dirty-draft gating around
|
|
it in `Dashboards.tsx`.
|
|
- Persist panel/name edits automatically: debounce edits (e.g. text field
|
|
keystrokes) so autosave doesn't fire on every keystroke, but don't require any
|
|
user action to commit a change.
|
|
- Cover all mutations that currently route through the save button: panel
|
|
add/remove/edit (title, PromQL, chart type), dashboard rename.
|
|
- Surface save failures unobtrusively (e.g. a small inline status/error near the
|
|
dashboard, not a blocking dialog) since there's no longer a discrete "Save"
|
|
click to attach an error to.
|
|
|
|
## Acceptance criteria
|
|
|
|
- Editing a panel's title, query, or chart type persists without clicking
|
|
anything, verified by reloading the page and seeing the change retained.
|
|
- Rapid typing in a text field doesn't spam the save endpoint on every keystroke.
|
|
- A failed autosave (e.g. simulated API error) surfaces to the user without
|
|
losing the in-progress edit.
|
|
|
|
## Depends on
|
|
|
|
None — modifies the existing `Dashboards.tsx` save path.
|