feat(ui): show save status on every settings field #205

Merged
dries merged 1 commit from feat/settings-row-save-status into feat/share-settings-toggle 2026-07-03 00:07:44 +02:00
Owner

Extends the existing spinner/checkmark save indicator to every settings row, not just the two server-persisted ones (Human review window, Reviewer prompt sections). Previously the client-only toggles (System notifications, Bell sound, Enable-by-default, the day inputs) and the async Sharing toggle showed no feedback.

What changed

  • New components/SettingRow.tsx: <SettingRow> + <SettingToggle> / <SettingNumber>. The control owns the save-and-show-status flow — sync (localStorage) saves get a brief min-spinner so the checkmark still reads as feedback; async (API) saves spin for real; a rejected save shows the error mark without throwing.
  • Converted all value settings in Dashboard.tsx and SharingSettings.tsx to the new components. The Sharing toggle was async with no indicator — fixed.
  • useSettingSave hook added to useSaveStatus.ts.

Guardrail (so it can't be missed again)

  • scripts/check-settings-rows.sh fails on hand-rolled className="settings-row" markup outside the component. Wired into make lint and CI (mirrors the existing check-platform-branching guard). Action-only rows (Install / Sign out) are pragma-suppressed.

Tests

  • New SettingRow.test.tsx covers spinner→checkmark, error indicator, and value parsing.
  • Full suite: 1362 frontend tests pass; tsc + go build clean; lint + both guards pass.

Stacked on #203 (base: feat/share-settings-toggle).

Extends the existing spinner/checkmark save indicator to **every** settings row, not just the two server-persisted ones (Human review window, Reviewer prompt sections). Previously the client-only toggles (System notifications, Bell sound, Enable-by-default, the day inputs) and the async Sharing toggle showed no feedback. ## What changed - New `components/SettingRow.tsx`: `<SettingRow>` + `<SettingToggle>` / `<SettingNumber>`. The control owns the save-and-show-status flow — sync (localStorage) saves get a brief min-spinner so the checkmark still reads as feedback; async (API) saves spin for real; a rejected save shows the error mark without throwing. - Converted all value settings in `Dashboard.tsx` and `SharingSettings.tsx` to the new components. The Sharing toggle was async with **no** indicator — fixed. - `useSettingSave` hook added to `useSaveStatus.ts`. ## Guardrail (so it can't be missed again) - `scripts/check-settings-rows.sh` fails on hand-rolled `className="settings-row"` markup outside the component. Wired into `make lint` and CI (mirrors the existing `check-platform-branching` guard). Action-only rows (Install / Sign out) are pragma-suppressed. ## Tests - New `SettingRow.test.tsx` covers spinner→checkmark, error indicator, and value parsing. - Full suite: 1362 frontend tests pass; tsc + go build clean; lint + both guards pass. Stacked on #203 (base: `feat/share-settings-toggle`).
feat(ui): show save status on every settings field
Some checks failed
CI / Frontend (pull_request) Successful in 4m31s
CI / Backend (pull_request) Successful in 4m33s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m1s
CI / Playwright E2E (pull_request) Failing after 8m20s
CI / Build (pull_request) Successful in 4m30s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Ratchet (pull_request) Successful in 6m21s
37dc20fdc3
Extend the spinner/checkmark save indicator to all settings rows, not
just the two server-persisted ones. New <SettingRow> + <SettingToggle> /
<SettingNumber> components own the save-and-show-status flow so a field
cannot be added without its feedback; a check-settings-rows guard (wired
into make lint + CI) fails on hand-rolled settings-row markup.
dries merged commit 37dc20fdc3 into feat/share-settings-toggle 2026-07-03 00:07:44 +02:00
dries deleted branch feat/settings-row-save-status 2026-07-03 00:07:44 +02:00
Sign in to join this conversation.
No description provided.