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>
34 lines
1.7 KiB
Markdown
34 lines
1.7 KiB
Markdown
# HAC-22 DB Switcher Hardening
|
|
|
|
Date: 2026-03-31 UTC
|
|
Owner: Senior Frontend Engineer
|
|
Issue: HAC-22
|
|
Scope: `desktop-v1` user-visible frontend hardening only
|
|
|
|
## Context
|
|
|
|
- `apps/desktop` already ships a visible DB switcher, but the current UI only renders four fixed choices: `db0`, `db1`, `db2`, and `db5`.
|
|
- Current product scope already includes one active standalone Redis connection, explicit DB context, and DB-scoped browse / inspect / command flows.
|
|
- The hardcoded four-item list is weaker than the current product boundary and makes shell-level verification less representative for operators who need to move across common DB indexes.
|
|
|
|
## Decision
|
|
|
|
- Do not expand product scope or alter backend contracts.
|
|
- Keep the existing rail placement and interaction model for the DB switcher.
|
|
- Widen the visible DB switcher to a predictable default operator range and ensure the currently active DB remains selectable even when it falls outside the default range.
|
|
|
|
## Planned Implementation
|
|
|
|
1. Add a shared frontend helper that returns DB labels for the switcher.
|
|
2. Default the visible range to `db0` through `db15`.
|
|
3. If the active DB falls outside that range, inject it into the visible list and keep the options numerically ordered.
|
|
4. Cover the helper with focused Vitest cases.
|
|
5. Update shared frontend and QA docs so runbooks no longer imply a four-item-only DB switcher.
|
|
|
|
## Acceptance
|
|
|
|
- The visible DB switcher no longer depends on a four-item hardcoded list.
|
|
- Operators can select common DB indexes from `db0` through `db15` without editing connection drafts.
|
|
- An active DB outside the default range still appears in the switcher and stays selectable.
|
|
- `pnpm --filter @redis-gui/desktop test` and `pnpm run desktop:build` remain green.
|