1.7 KiB
1.7 KiB
HAC-26 Workspace State Foundation
Date: 2026-03-31 UTC
Owner: Senior Frontend Engineer
Issue: HAC-26
Scope: apps/desktop frontend foundation only
Context
apps/desktop/src/App.tsxalready owns the visible desktop-v1 shell, but it still contains repeated inline logic for key filtering, selected-key fallback, live key replacement, and paged append handling.- These state transitions are part of the browsing and inspector foundation, not one-off UI copy, and upcoming desktop-v1 slices will need them again.
- The PM comment on
HAC-26asked for the highest reusable foundation return, not a new visible feature.
Decision
- Do not expand product scope.
- Extract reusable key-workspace state helpers from
App.tsxintosrc/lib. - Cover the extracted state transitions with focused Vitest cases so future desktop-v1 changes can reuse the same behavior safely.
Planned Implementation
- Create a shared frontend utility for:
- filtering visible keys by search text
- resolving selected key fallback when visible results change
- replacing a key record after live metadata/value refresh
- appending paged browse results without duplicate rows
- Update
App.tsxto consume the shared utility instead of inline logic. - Add Vitest coverage for zero-result fallback, selection resolution, replacement merge behavior, and append deduplication.
- Re-run
pnpm --filter @redis-gui/desktop testandpnpm run desktop:build.
Acceptance
App.tsxno longer owns the reusable key-workspace list and selection transitions inline.- The extracted helper is covered by focused tests.
- Existing desktop frontend tests and production build remain green.
- No backend contract or visible feature scope changes are introduced.