1.2 KiB
1.2 KiB
HAC-31 Safe Mutation Guardrails
Date: 2026-03-31 Owner: Senior Frontend Engineer Issue: HAC-31
Goal
Harden current-phase writable operations without expanding product scope beyond existing string save and TTL controls.
Scope
- add a scoped review step before string save
- add a scoped review step before TTL set and TTL removal
- block no-op mutation submits before they reach the desktop bridge or demo fallback
- preserve draft value and TTL input when a live mutation fails
Explicit Non-Goals
- Add Key flow changes
- real delete execution
- non-string editing
- command-surface changes
- visual refresh beyond mutation clarity
Implementation
- Added
apps/desktop/src/lib/mutation-guardrails.tsfor mutation summaries and no-op detection helpers. - Updated
apps/desktop/src/App.tsxso save and TTL actions open a shared review dialog with scoped current-vs-next details. - Disabled string save when no value change is pending.
- Disabled TTL set when the requested TTL already matches the active TTL state.
- Kept live failure handling on the shared operator notice layer while preserving draft state for retry.
Verification
pnpm --filter @redis-gui/desktop testpnpm run desktop:build