Files
redis-gui-foundation/plans/2026-03-31-hac-29-browse-search-baseline.md
Senior Frontend Engineer bf6f8bc0bf feat(desktop): clarify key browser search states
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-31 08:02:18 +00:00

48 lines
2.4 KiB
Markdown

# HAC-29 Browse And Search Baseline Stabilization
Date: 2026-03-31 UTC
Owner: Senior Frontend Engineer
Issue: HAC-29
Scope: `desktop-v1` browse/search hardening only
## Context
- `apps/desktop` already supports live browse pagination and DB-scoped search, but the visible search surface still leaves a few operator-facing gaps:
- no explicit feedback about whether input is treated as substring matching or raw Redis pattern matching
- no bounded clear action from the browser header
- one generic empty-state sentence was doing too much work across loading, empty DB, and filtered no-match cases
- Current phase must stay inside browse/search hardening and must not expand into Add Key, delete execution, non-string editing, or visual refresh work.
## Decision
- Keep the existing workspace layout and backend contracts unchanged.
- Extract search-state interpretation into a shared frontend helper so visible UI copy and backend browse requests use the same source of truth.
- Improve only the key-browser and inspector feedback layer:
- explicit search mode label (`all keys`, `contains`, `pattern`)
- concise result-status message under the search input
- clear action for returning to normal browse state
- distinct empty-state copy for loading, empty DB, and no-match search results
## Implemented Slice
1. Added `apps/desktop/src/lib/key-browser-search.ts` plus focused tests for:
- blank input vs contains search vs raw wildcard-pattern classification
- backend request-pattern generation
- browser status and empty-state copy
- inspector empty-state copy aligned to the same search state
2. Updated `apps/desktop/src/App.tsx` to:
- consume the shared search helper for live browse requests
- render a visible search-mode badge and status line under the browser search field
- expose a bounded clear action when search input is active
- keep browser and inspector empty-state feedback aligned
3. Updated `docs/frontend-workspace-baseline.md` so the shared acceptance language now includes the search-mode feedback, clear action, and differentiated empty states.
## Verification
- `pnpm --filter @redis-gui/desktop test` -> pass (9 files / 33 tests)
- `pnpm run desktop:build` -> pass
## Remaining Risk
- This environment still cannot launch a visible Tauri window, so final GUI-level browse/search smoke evidence remains a QA follow-up even though the frontend code and build path are green.