tui: Gallery screen — search, filter, sort #28

Closed
opened 2026-04-11 13:04:13 +00:00 by charles · 0 comments
Owner

User story

As a user with a large gallery, I want to search, filter, and sort entries, so that I can find images by prompt, model, date, or favourite status.

Acceptance criteria

  • / enters search mode with an input overlay at the bottom of the Gallery
  • Real-time filtering as the user types (debounced 150 ms) against prompt text, tags, filename
  • Enter commits and exits search mode leaving the filter applied; Esc cancels and restores the full list
  • n / N cycles the selection to next/previous match within the applied filter

Filter panel

  • f opens a filter overlay with: folder, date range, favorites-only toggle, model, sampler
  • Each filter is an editable field; Enter applies, Esc cancels
  • Active filters shown as chips in the gallery header

Sort

  • S cycles through sort modes: date desc (default), date asc, favorites first, random
  • Current sort mode shown in the gallery header

Plumbing

  • All filter/sort state pushed down to loom-core GalleryFilter where possible; client-side only for search debouncing
  • Keybinds registered in the action registry

Tests

  • Unit test: applying a search then a folder filter produces a combined query on loom-core
  • Unit test: S cycles through all four sort modes and wraps

Out of scope

  • Folders / favorites / multi-select UI (separate ticket)
  • Grid/list mode toggling (separate ticket)

References

  • Spec §4.2.2 "Search", "Filtering", "Sorting"
## User story As a user with a large gallery, I want to search, filter, and sort entries, so that I can find images by prompt, model, date, or favourite status. ## Acceptance criteria ### Search - [ ] `/` enters search mode with an input overlay at the bottom of the Gallery - [ ] Real-time filtering as the user types (debounced 150 ms) against prompt text, tags, filename - [ ] `Enter` commits and exits search mode leaving the filter applied; `Esc` cancels and restores the full list - [ ] `n` / `N` cycles the selection to next/previous match within the applied filter ### Filter panel - [ ] `f` opens a filter overlay with: folder, date range, favorites-only toggle, model, sampler - [ ] Each filter is an editable field; `Enter` applies, `Esc` cancels - [ ] Active filters shown as chips in the gallery header ### Sort - [ ] `S` cycles through sort modes: date desc (default), date asc, favorites first, random - [ ] Current sort mode shown in the gallery header ### Plumbing - [ ] All filter/sort state pushed down to `loom-core` `GalleryFilter` where possible; client-side only for search debouncing - [ ] Keybinds registered in the action registry ### Tests - [ ] Unit test: applying a search then a folder filter produces a combined query on `loom-core` - [ ] Unit test: `S` cycles through all four sort modes and wraps ## Out of scope - Folders / favorites / multi-select UI (separate ticket) - Grid/list mode toggling (separate ticket) ## References - Spec §4.2.2 "Search", "Filtering", "Sorting"
charles added this to the loom-tui v0.1.0 milestone 2026-04-11 13:04:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#28
No description provided.