tui: Gallery screen — wire SQLite storage & image display #88

Closed
opened 2026-04-12 13:23:50 +00:00 by claude-desktop · 0 comments
Collaborator

User Story

As a loom-tui user, I want the Gallery screen to load my generated images from the SQLite database and display actual thumbnails, so that I can browse, search, and manage my image library from the terminal.

Context

The Gallery screen (#27–#30) has full UI — grid/list/detail views, search, multi-select, zoom/pan. But it shows no images because GalleryStorage isn't connected. This ticket wires the storage layer and image rendering.

Acceptance Criteria

Data Loading

  • Gallery loads items from GalleryStorage on screen entry
  • Pagination: loads visible page + prefetches adjacent pages
  • Search (/) queries storage with real-time filtering by prompt text, tags, date
  • Filter panel (f) reads available folders, models, samplers from storage
  • Sort modes (S) issue correct ORDER BY queries

Image Display

  • Grid view renders thumbnails via ImageRenderer in each cell
  • List view renders small thumbnails on the left
  • Detail view renders full-size image with zoom/pan controls
  • Images load asynchronously (placeholder shown while loading)

CRUD Operations

  • * toggle favorite writes to storage
  • dd/Delete moves to trash (with confirmation dialog) and updates storage
  • u undoes last delete within session (restores from trash)
  • m moves selected images to a folder (folder picker overlay)
  • e exports file to user-chosen path
  • a creates folder; r renames; d deletes folder (with confirmation)

Detail View

  • i info overlay shows full generation parameters from storage
  • Parameters are copyable (copy to clipboard)
  • R (replay) fills Generate screen with stored parameters
  • s opens sharing overlay with the current image

Tests

  • Integration test: load gallery items from test SQLite database
  • Unit test: search/filter query construction
  • Unit test: undo-delete session tracking

Out of Scope

  • AI defect detection and region analysis (separate AI integration ticket)
  • Sharing backend calls (separate ticket)

References

  • Spec §4.2 (Gallery Screen)
  • Existing code: src/screens/gallery.rs
  • Tracking issue: #47
## User Story As a **loom-tui user**, I want the Gallery screen to load my generated images from the SQLite database and display actual thumbnails, so that I can browse, search, and manage my image library from the terminal. ## Context The Gallery screen (#27–#30) has full UI — grid/list/detail views, search, multi-select, zoom/pan. But it shows no images because `GalleryStorage` isn't connected. This ticket wires the storage layer and image rendering. ## Acceptance Criteria ### Data Loading - [ ] Gallery loads items from `GalleryStorage` on screen entry - [ ] Pagination: loads visible page + prefetches adjacent pages - [ ] Search (`/`) queries storage with real-time filtering by prompt text, tags, date - [ ] Filter panel (`f`) reads available folders, models, samplers from storage - [ ] Sort modes (`S`) issue correct ORDER BY queries ### Image Display - [ ] Grid view renders thumbnails via `ImageRenderer` in each cell - [ ] List view renders small thumbnails on the left - [ ] Detail view renders full-size image with zoom/pan controls - [ ] Images load asynchronously (placeholder shown while loading) ### CRUD Operations - [ ] `*` toggle favorite writes to storage - [ ] `dd`/`Delete` moves to trash (with confirmation dialog) and updates storage - [ ] `u` undoes last delete within session (restores from trash) - [ ] `m` moves selected images to a folder (folder picker overlay) - [ ] `e` exports file to user-chosen path - [ ] `a` creates folder; `r` renames; `d` deletes folder (with confirmation) ### Detail View - [ ] `i` info overlay shows full generation parameters from storage - [ ] Parameters are copyable (copy to clipboard) - [ ] `R` (replay) fills Generate screen with stored parameters - [ ] `s` opens sharing overlay with the current image ### Tests - [ ] Integration test: load gallery items from test SQLite database - [ ] Unit test: search/filter query construction - [ ] Unit test: undo-delete session tracking ## Out of Scope - AI defect detection and region analysis (separate AI integration ticket) - Sharing backend calls (separate ticket) ## References - Spec §4.2 (Gallery Screen) - Existing code: `src/screens/gallery.rs` - Tracking issue: #47
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#88
No description provided.