Files
redis-gui-foundation/plans/2026-03-31-hac-28-connection-context-lifecycle.md
Senior Frontend Engineer 4839165657 feat(desktop): harden connection session lifecycle
- add a visible connection session summary for ready/testing/demo/retry states
- prevent stale live connection tests from overwriting a newer active DB selection
- include the missing frontend helpers already referenced by App.tsx so the branch builds cleanly

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-31 09:32:47 +00:00

1.8 KiB

HAC-28 Connection Context Lifecycle

Date: 2026-03-31 Owner: Senior Frontend Engineer Issue: HAC-28

Goal

Harden connection-context and session-state clarity without changing backend contracts or pulling next-phase scope into desktop-v1.

Scope

  • keep connection status copy consistent between the header, connection cards, and the active-session summary
  • make ready, checking, demo, and retry-needed states visibly distinct in the utility rail
  • prevent a finished live connection test from yanking the current active DB after the operator has already switched to another connection
  • keep retry guidance explicit when a live test fails
  • add focused frontend tests around the connection-session helper

Non-Goals

  • no Add Key expansion
  • no delete execution
  • no non-string editing
  • no visual refresh
  • no backend contract changes

Delivery Shape

  1. Add a shared connection-session helper for:
    • connection test state transitions
    • consistent status and connection-card copy
    • visible active-session summary copy
  2. Update apps/desktop/src/App.tsx so:
    • the utility rail shows a clear active connection session card
    • the test button distinguishes active-scope testing from another in-flight connection test
    • live test completion only reapplies the returned DB scope when the same connection is still active
  3. Revalidate frontend tests and production build.

Acceptance

  • connection session state is visible as ready, testing, demo fallback, or retry needed
  • connection-card detail and header status use the same wording model
  • switching to another connection during a live test does not silently replace the current active DB when the earlier test returns
  • failed live tests leave a clear retry path in visible UI copy
  • pnpm --filter @redis-gui/desktop test passes
  • pnpm run desktop:build passes