tui: gallery — tagging system + AI auto-tag #135

Closed
opened 2026-04-14 20:11:58 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a user with a large gallery, I want to attach tags to images and use AI to auto-tag, so that I can find related images later through filtering.

Background

GalleryItem already carries tags: Vec<String> and GalleryFilter has a tags: Vec<String> filter field, but the TUI has no UI to add/remove tags or trigger AI tagging. GTK has a tag entry + auto-tag button in crates/loom-gtk/src/pages/gallery/mod.rs:304-307.

Acceptance criteria

Tag editor overlay

  • New OverlayKind::TagEditor(uuid::Uuid) opens via t from grid/list/detail
  • Shows existing tags as removable chips (each with an x indicator)
  • Text input below for adding new tags (Enter commits one tag)
  • Persists changes via storage.update_tags(id, tags)
  • Publishes LoomEvent::GalleryChanged after save

AI auto-tag

  • T (uppercase) on the focused item calls bridge.tag_image(image_path) via the AI plugin
  • Returned tags are merged with existing tags (deduped)
  • Spinner in status bar; uses AiJobTracker pattern
  • On batch selection (multi-select active), tag all selected items in sequence

Render in cells

  • Detail view shows the tag list (wrapped) in the info overlay
  • Tag count badge optional in grid cell label

Filter integration

  • Existing GalleryFilter::tags already filters; expose UI to add/remove from the filter chip bar (depends on filter-popover ticket)

Tests

  • Unit: add/remove tag round-trips through storage
  • Unit: AI tag merge dedupes case-insensitively

Out of scope

  • Tag autocomplete from existing tag set (nice-to-have follow-up)
  • Filter chip UI (separate ticket)
  • Hierarchical tag taxonomies

References

  • crates/loom-tui/src/screens/gallery.rs (items[i].tags)
  • crates/loom-gtk/src/pages/gallery/mod.rs:304-307 (GTK reference)
  • crates/loom-tui/src/screens/generate.rs (AiJobTracker)
## User story As a user with a large gallery, I want to attach tags to images and use AI to auto-tag, so that I can find related images later through filtering. ## Background `GalleryItem` already carries `tags: Vec<String>` and `GalleryFilter` has a `tags: Vec<String>` filter field, but the TUI has no UI to add/remove tags or trigger AI tagging. GTK has a tag entry + auto-tag button in `crates/loom-gtk/src/pages/gallery/mod.rs:304-307`. ## Acceptance criteria ### Tag editor overlay - [ ] New `OverlayKind::TagEditor(uuid::Uuid)` opens via `t` from grid/list/detail - [ ] Shows existing tags as removable chips (each with an `x` indicator) - [ ] Text input below for adding new tags (Enter commits one tag) - [ ] Persists changes via `storage.update_tags(id, tags)` - [ ] Publishes `LoomEvent::GalleryChanged` after save ### AI auto-tag - [ ] `T` (uppercase) on the focused item calls `bridge.tag_image(image_path)` via the AI plugin - [ ] Returned tags are merged with existing tags (deduped) - [ ] Spinner in status bar; uses `AiJobTracker` pattern - [ ] On batch selection (multi-select active), tag all selected items in sequence ### Render in cells - [ ] Detail view shows the tag list (wrapped) in the info overlay - [ ] Tag count badge optional in grid cell label ### Filter integration - [ ] Existing `GalleryFilter::tags` already filters; expose UI to add/remove from the filter chip bar (depends on filter-popover ticket) ### Tests - [ ] Unit: add/remove tag round-trips through storage - [ ] Unit: AI tag merge dedupes case-insensitively ## Out of scope - Tag autocomplete from existing tag set (nice-to-have follow-up) - Filter chip UI (separate ticket) - Hierarchical tag taxonomies ## References - `crates/loom-tui/src/screens/gallery.rs` (`items[i].tags`) - `crates/loom-gtk/src/pages/gallery/mod.rs:304-307` (GTK reference) - `crates/loom-tui/src/screens/generate.rs` (`AiJobTracker`)
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#135
No description provided.