tui: Gallery screen — replay generation & AI defect/region analysis #31

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

User story

As a user, I want to replay a previous generation and run AI defect/region analysis on any gallery image, so that I can iterate on past outputs without re-typing parameters.

Acceptance criteria

Replay (R)

  • From grid, list, or detail view, R fills the Generate screen with the selected image's params (model, sampler, steps, CFG, seed, size, LoRAs, negative, mode=t2i) and navigates to Generate
  • An in-UI confirmation notification is shown before overwriting current Generate draft if it contains unsaved edits
  • If the original mode was i2i/inpaint/controlnet and the source init image is still reachable, the mode and init image path are restored

Defect detection (Ctrl+X)

  • Calls loom-core::AiJobWorker::detect_defects(path) with the focused image
  • Renders an overlay listing detected defects with bounding boxes drawn over the detail-view image

Region analysis (Ctrl+R)

  • Calls loom-core::AiJobWorker::analyze_regions(path)
  • Renders returned region descriptions in a side panel that can be navigated with j/k

Tests

  • Unit test: replay copies all known params into a fresh GenerationParams
  • Unit test: defect overlay renders boxes at expected rect coordinates for fixed mock output

Out of scope

  • Prompt enhancement / tag generation (those are on Generate, not Gallery)

References

  • Spec §4.2.2 "Replay generation"
  • Spec §6 "AI-Assisted Workflow" (defect / region rows)
## User story As a user, I want to replay a previous generation and run AI defect/region analysis on any gallery image, so that I can iterate on past outputs without re-typing parameters. ## Acceptance criteria ### Replay (`R`) - [ ] From grid, list, or detail view, `R` fills the Generate screen with the selected image's params (model, sampler, steps, CFG, seed, size, LoRAs, negative, mode=t2i) and navigates to Generate - [ ] An in-UI confirmation notification is shown before overwriting current Generate draft if it contains unsaved edits - [ ] If the original mode was i2i/inpaint/controlnet and the source init image is still reachable, the mode and init image path are restored ### Defect detection (`Ctrl+X`) - [ ] Calls `loom-core::AiJobWorker::detect_defects(path)` with the focused image - [ ] Renders an overlay listing detected defects with bounding boxes drawn over the detail-view image ### Region analysis (`Ctrl+R`) - [ ] Calls `loom-core::AiJobWorker::analyze_regions(path)` - [ ] Renders returned region descriptions in a side panel that can be navigated with `j`/`k` ### Tests - [ ] Unit test: replay copies all known params into a fresh `GenerationParams` - [ ] Unit test: defect overlay renders boxes at expected rect coordinates for fixed mock output ## Out of scope - Prompt enhancement / tag generation (those are on Generate, not Gallery) ## References - Spec §4.2.2 "Replay generation" - Spec §6 "AI-Assisted Workflow" (defect / region rows)
charles added this to the loom-tui v0.1.0 milestone 2026-04-11 13:04:47 +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#31
No description provided.