tui: Gallery screen — grid & list view #27

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

User story

As a user, I want to browse my generated image library in a configurable grid or compact list, so that I can quickly scan through past results.

Acceptance criteria

Grid view (default)

  • Reads gallery entries from loom-core SQLite storage
  • Configurable column count (3/4/5/6), persisted per spec §7.1 gallery_columns
  • Each cell renders the image thumbnail via the ImageRenderer plus a caption with the prompt prefix (truncated)
  • h/j/k/l and arrow keys move selection; gg / G jump to first/last; Ctrl+d / Ctrl+u half-page scroll
  • Lazy-loads images as cells become visible; never renders more than N images at once

List view

  • v toggles between grid and list
  • List row: thumbnail (small) + columns (date, model, sampler, steps, seed)
  • Same movement keys

Persistence

  • Mode choice persisted across restarts
  • Selection is preserved across navigation (returning to Gallery lands on the last-selected item)

Tests

  • Unit test: grid column calculation for a range of terminal widths produces expected cell rects
  • Unit test: toggling v flips mode and emits an AppAction::Redraw

Out of scope

  • Search, filter, sort (separate ticket)
  • Folders, favorites, multi-select (separate ticket)
  • Detail view, zoom/pan (separate ticket)
  • Replay generation (separate ticket)

References

  • Spec §4.2 "Gallery Screen"
## User story As a user, I want to browse my generated image library in a configurable grid or compact list, so that I can quickly scan through past results. ## Acceptance criteria ### Grid view (default) - [ ] Reads gallery entries from `loom-core` SQLite storage - [ ] Configurable column count (3/4/5/6), persisted per spec §7.1 `gallery_columns` - [ ] Each cell renders the image thumbnail via the `ImageRenderer` plus a caption with the prompt prefix (truncated) - [ ] `h`/`j`/`k`/`l` and arrow keys move selection; `gg` / `G` jump to first/last; `Ctrl+d` / `Ctrl+u` half-page scroll - [ ] Lazy-loads images as cells become visible; never renders more than N images at once ### List view - [ ] `v` toggles between grid and list - [ ] List row: thumbnail (small) + columns (date, model, sampler, steps, seed) - [ ] Same movement keys ### Persistence - [ ] Mode choice persisted across restarts - [ ] Selection is preserved across navigation (returning to Gallery lands on the last-selected item) ### Tests - [ ] Unit test: grid column calculation for a range of terminal widths produces expected cell rects - [ ] Unit test: toggling `v` flips mode and emits an `AppAction::Redraw` ## Out of scope - Search, filter, sort (separate ticket) - Folders, favorites, multi-select (separate ticket) - Detail view, zoom/pan (separate ticket) - Replay generation (separate ticket) ## References - Spec §4.2 "Gallery Screen"
charles added this to the loom-tui v0.1.0 milestone 2026-04-11 13:04:06 +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#27
No description provided.