Check in the PM product requirements, refreshed QA acceptance evidence, shared execution split plans, and current-phase status notes so the repo matches the current delivery baseline. Co-Authored-By: Paperclip <noreply@paperclip.ing>
2.4 KiB
2.4 KiB
HAC-24 Add Key Frontend
Date: 2026-03-31 UTC
Owner: Senior Frontend Engineer
Issue: HAC-24
Phase: desktop-v1.1 candidate
Context
HAC-24covers the frontend slice for Add Key only.- The checked-out repo now exposes the Add Key backend and Tauri bridge contract:
- function:
create_value - request fields:
connection,key,value,ttl_millis - duplicate-key error code:
already_exists - result payload:
record
- function:
- The frontend must not expand beyond string-only creation or add destructive follow-up actions.
UI Decisions
- Add a visible
Add keyentry in the key-browser header rather than burying the flow in the utility rail or inspector. - Keep the create surface in a dialog so active connection and DB remain visible while the form stays bounded.
- Scope the form to:
- key name
- string value
- optional TTL in milliseconds
- On success, focus the browser on the created key name so the new record is immediately visible and inspectable without reconnecting.
- Preserve typed form state on failure, including validation failure, duplicate-name failure, or an unexpected bridge regression.
Implemented Frontend Slice
- Added
apps/desktop/src/lib/add-key-draft.tsplus focused tests for:- key-name validation
- optional TTL parsing
- duplicate-name detection for demo mode
- demo key-record creation
- Extended the shared notice layer with:
already_existskey_createso create-path validation and duplicate failures stay on the same operator-notice surface as the rest of the shell.
- Added an
Add keydialog toapps/desktop/src/App.tsxthat:- keeps connection and DB context visible
- exposes string-only copy and optional TTL input
- supports browser-demo creation with immediate browser/inspector refresh
- targets the live command
create_redis_value - preserves form state if a bridge error prevents create completion
Verification
pnpm --filter @redis-gui/desktop test-> pass (8 files / 29 tests)pnpm run desktop:build-> passcargo test -p redis-core-> pass (20 tests, including Add Key create and duplicate-path coverage)pnpm run desktop:tauri:build-> pass (.deband.rpmbundles emitted)
Remaining Risk
- This environment still cannot launch a visible Tauri window, so final GUI-level Add Key smoke evidence remains a QA follow-up rather than a blocker on the implemented frontend slice.