Projects BibleWeb Search Search history
Done

Search history

Area: Search Milestone: v1

Context

Problem: Users often repeat searches or want to refine a previous query. Retyping previous searches is tedious.

Solution: A local search history (up to 20 entries) navigable with arrow keys in the search input.

Not included: Persistent history across sessions, search suggestions, or trending searches. History resets on page reload.

Functional

User flow:

  1. User types and executes searches
  2. Each query is saved to a local history list (max 20)
  3. Pressing ArrowUp in the search input cycles through previous queries
  4. Pressing ArrowDown cycles forward
  5. Selecting a history entry populates the search input

Edge cases:

  • History is component-local $state — NOT persisted to localStorage or server
  • Resets on page reload or navigation away
  • Capped at 20 entries (oldest removed when full)

UX & Design

No visible history list — navigation is entirely via ArrowUp/ArrowDown in the search input. The history is invisible until the user presses an arrow key.

Technical

Implementation: searchHistory: string[] array in component $state, capped at 20. ArrowUp/ArrowDown handlers cycle through the array.

Files:

  • apps/web/src/routes/(app)/search/+page.svelte — history state + key handlers

Status

Current: DONE Milestone: v1 Priority: Low — convenience feature

History:

  • Minimal implementation — not persisted, just in-memory during session

Dependencies:

  • Requires: search page (DONE)

Screenshots

Feature screenshot