From 30f5620fd5c89d3752daf47b4c64fb32ac621005 Mon Sep 17 00:00:00 2001
From: pyr0ball
Date: Mon, 11 May 2026 11:55:09 -0700
Subject: [PATCH] feat(settings): autosave on change, remove Save buttons
(closes #128)
Each setting now saves via a debounced (600ms) individual API call when
its value changes. A hydration guard (_hydrated flag + nextTick) prevents
watchers from firing during the initial load() fetch, ensuring the first
API round-trip does not generate spurious write calls.
Removed: five explicit Save buttons across Equipment, Sensory, Units,
Shopping Region, and Recipe Search Layout sections.
Added: "Changes save automatically." subtitle + fixed bottom-right toast
that appears for 2s after any successful save, with enter/leave
transitions that respect prefers-reduced-motion via the theme.
The full save() and saveSensory() actions are kept as internal fallbacks.
---
frontend/src/components/SettingsView.vue | 91 +++++++++---------------
frontend/src/stores/settings.ts | 76 +++++++++++++-------
2 files changed, 86 insertions(+), 81 deletions(-)
diff --git a/frontend/src/components/SettingsView.vue b/frontend/src/components/SettingsView.vue
index ae1ccce..d5d551b 100644
--- a/frontend/src/components/SettingsView.vue
+++ b/frontend/src/components/SettingsView.vue
@@ -2,6 +2,7 @@