tui: Generate screen — wire generation submission & progress #86

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

User Story

As a loom-tui user, I want to press F5 on the Generate screen and have my image actually generated by the backend, with real-time progress updates in the preview pane and status bar, so that I can use the TUI for actual image generation.

Context

The Generate screen (#20–#25) has full UI — prompt editors, parameter fields, LoRA list, mode tabs, preview state tracking. But F5 currently does nothing because the screen isn't connected to PluginBridge. This is the single most critical integration ticket.

Acceptance Criteria

Submission

  • F5 collects all parameters from the screen state and calls PluginBridge::generate()
  • Validation errors (missing model, invalid params) shown in notification bar before submission
  • Stop button cancels a running generation via PluginBridge::cancel()
  • Status bar updates: "Generating…" + progress percentage

Progress

  • Per-step preview images (if backend supports it) are displayed in the preview pane via ImageRenderer
  • Progress bar in the status bar shows percentage completion
  • On completion: final image displayed in preview, notification "Generation complete"

Preview Pane Actions

  • v opens full-screen image viewer overlay
  • s saves the generated image to gallery (via GalleryStorage)
  • r sends the image back as init image (switches to i2i mode, sets init path)

Image-to-Image

  • Init image path field is functional; o opens an external file picker (fzf or built-in path browser)
  • Init image thumbnail shown in preview pane when path is set

Tests

  • Unit test: parameter collection from screen state matches GenerationParams struct
  • Integration test: mock PluginBridge receives correct parameters on F5

Out of Scope

  • LoRA picker overlay (separate ticket)
  • Inpainting canvas backend calls (canvas exists but mask → backend path is part of this ticket)
  • Queue management overlay (separate ticket)

References

  • Spec §4.1.2 (Generate Screen functional requirements)
  • Existing code: src/screens/generate.rs
  • Tracking issue: #47
## User Story As a **loom-tui user**, I want to press F5 on the Generate screen and have my image actually generated by the backend, with real-time progress updates in the preview pane and status bar, so that I can use the TUI for actual image generation. ## Context The Generate screen (#20–#25) has full UI — prompt editors, parameter fields, LoRA list, mode tabs, preview state tracking. But F5 currently does nothing because the screen isn't connected to `PluginBridge`. This is the single most critical integration ticket. ## Acceptance Criteria ### Submission - [ ] F5 collects all parameters from the screen state and calls `PluginBridge::generate()` - [ ] Validation errors (missing model, invalid params) shown in notification bar before submission - [ ] Stop button cancels a running generation via `PluginBridge::cancel()` - [ ] Status bar updates: "Generating…" + progress percentage ### Progress - [ ] Per-step preview images (if backend supports it) are displayed in the preview pane via `ImageRenderer` - [ ] Progress bar in the status bar shows percentage completion - [ ] On completion: final image displayed in preview, notification "Generation complete" ### Preview Pane Actions - [ ] `v` opens full-screen image viewer overlay - [ ] `s` saves the generated image to gallery (via `GalleryStorage`) - [ ] `r` sends the image back as init image (switches to i2i mode, sets init path) ### Image-to-Image - [ ] Init image path field is functional; `o` opens an external file picker (`fzf` or built-in path browser) - [ ] Init image thumbnail shown in preview pane when path is set ### Tests - [ ] Unit test: parameter collection from screen state matches `GenerationParams` struct - [ ] Integration test: mock PluginBridge receives correct parameters on F5 ## Out of Scope - LoRA picker overlay (separate ticket) - Inpainting canvas backend calls (canvas exists but mask → backend path is part of this ticket) - Queue management overlay (separate ticket) ## References - Spec §4.1.2 (Generate Screen functional requirements) - Existing code: `src/screens/generate.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#86
No description provided.