tui: Generate screen — real-time preview pane #25

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

User story

As a user, I want the latest generated image displayed in a preview pane on the Generate screen, updating while the backend is generating, so that I can judge progress and results without switching to Gallery.

Acceptance criteria

Preview pane

  • Right column of the Generate screen hosts the preview pane (per §4.1.1 layout)
  • Shows the init image in i2i/inpaint/controlnet modes until a generation result arrives
  • Subscribes to loom-core per-step previews; falls back to the final image if the backend doesn't emit intermediate frames
  • Uses the ImageRenderer trait

Actions

  • v opens the image full-screen in an image viewer overlay (reusable widget for Gallery detail view)
  • s saves the image to the gallery (invokes loom-core save path)
  • r sends the image back as an init image and switches the Generate mode to i2i
  • Arrow keys cycle through the current batch's results

Performance

  • Per-step updates are rate-limited to at most 10 Hz to avoid flooding the terminal
  • Previous preview images are deleted via the renderer's delete() before rendering a new one

Tests

  • Unit test: a mock step stream updates the current preview handle and deletes the previous one
  • Unit test: s triggers a save call on the core bridge mock

Out of scope

  • The image viewer overlay implementation beyond the minimum to open an image full-screen (may be part of Gallery detail view)
  • AI prompt enhancement (separate ticket)

References

  • Spec §4.1.2 "Preview pane"
## User story As a user, I want the latest generated image displayed in a preview pane on the Generate screen, updating while the backend is generating, so that I can judge progress and results without switching to Gallery. ## Acceptance criteria ### Preview pane - [ ] Right column of the Generate screen hosts the preview pane (per §4.1.1 layout) - [ ] Shows the init image in i2i/inpaint/controlnet modes until a generation result arrives - [ ] Subscribes to `loom-core` per-step previews; falls back to the final image if the backend doesn't emit intermediate frames - [ ] Uses the `ImageRenderer` trait ### Actions - [ ] `v` opens the image full-screen in an image viewer overlay (reusable widget for Gallery detail view) - [ ] `s` saves the image to the gallery (invokes `loom-core` save path) - [ ] `r` sends the image back as an init image and switches the Generate mode to i2i - [ ] Arrow keys cycle through the current batch's results ### Performance - [ ] Per-step updates are rate-limited to at most 10 Hz to avoid flooding the terminal - [ ] Previous preview images are deleted via the renderer's `delete()` before rendering a new one ### Tests - [ ] Unit test: a mock step stream updates the current preview handle and deletes the previous one - [ ] Unit test: `s` triggers a save call on the core bridge mock ## Out of scope - The image viewer overlay implementation beyond the minimum to open an image full-screen (may be part of Gallery detail view) - AI prompt enhancement (separate ticket) ## References - Spec §4.1.2 "Preview pane"
charles added this to the loom-tui v0.1.0 milestone 2026-04-11 13:03:40 +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#25
No description provided.