tui: Entity screen — wire storage backend & AI calls #90

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

User Story

As a loom-tui user, I want the Entity screen to load and save characters, poses, places, styles, and outfits from loom-core's storage, so that I can manage my entities and inject their prompts into generation.

Context

The Entity screen (#36–#37) has a three-column layout with 5 entity kinds and CRUD scaffolding. But the entity list is empty because GalleryStorage::list_entities isn't called. This ticket wires storage and the AI description/face-detection calls.

Acceptance Criteria

Storage

  • Entity list loads from loom-core storage on screen entry
  • a creates a new entity (name input → storage insert)
  • e opens inline editor for entity fields (name, description, tags, per-style prompts)
  • d deletes entity with confirmation dialog
  • r renames entity
  • Per-style prompts: a/d to add/remove styles; each style has name + prompt modifier

Entity Portraits

  • Thumbnail images rendered via ImageRenderer in the entity list
  • Entity detail shows larger portrait

Inject into Generation

  • Enter or i on an entity appends its prompt to the active Generate screen prompt

AI Features

  • Ctrl+D calls AiJobWorker for entity description generation; spinner in status bar; result fills description field
  • Ctrl+F calls AiJobWorker for face detection on reference image; detected face region highlighted in thumbnail

Tests

  • Integration test: CRUD cycle (create, read, update, delete) against test storage
  • Unit test: prompt injection formatting

Out of Scope

  • Entity kind management (the 5 kinds are fixed)

References

  • Spec §4.4 (Entity Screen)
  • Existing code: src/screens/entities.rs
  • Tracking issue: #47
## User Story As a **loom-tui user**, I want the Entity screen to load and save characters, poses, places, styles, and outfits from loom-core's storage, so that I can manage my entities and inject their prompts into generation. ## Context The Entity screen (#36–#37) has a three-column layout with 5 entity kinds and CRUD scaffolding. But the entity list is empty because `GalleryStorage::list_entities` isn't called. This ticket wires storage and the AI description/face-detection calls. ## Acceptance Criteria ### Storage - [ ] Entity list loads from loom-core storage on screen entry - [ ] `a` creates a new entity (name input → storage insert) - [ ] `e` opens inline editor for entity fields (name, description, tags, per-style prompts) - [ ] `d` deletes entity with confirmation dialog - [ ] `r` renames entity - [ ] Per-style prompts: `a`/`d` to add/remove styles; each style has name + prompt modifier ### Entity Portraits - [ ] Thumbnail images rendered via `ImageRenderer` in the entity list - [ ] Entity detail shows larger portrait ### Inject into Generation - [ ] `Enter` or `i` on an entity appends its prompt to the active Generate screen prompt ### AI Features - [ ] `Ctrl+D` calls `AiJobWorker` for entity description generation; spinner in status bar; result fills description field - [ ] `Ctrl+F` calls `AiJobWorker` for face detection on reference image; detected face region highlighted in thumbnail ### Tests - [ ] Integration test: CRUD cycle (create, read, update, delete) against test storage - [ ] Unit test: prompt injection formatting ## Out of Scope - Entity kind management (the 5 kinds are fixed) ## References - Spec §4.4 (Entity Screen) - Existing code: `src/screens/entities.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#90
No description provided.