feat(tui): Generate screen — real-time preview state #63

Merged
charles merged 1 commit from tui/generate-preview-25 into main 2026-04-11 20:42:33 +00:00
Owner

Stacks on #62. Closes charles/loom#25.

Adds PreviewState on GenerateScreen: a rolling batch of completed image paths with a wrap-around focus index and an optional progress fraction. set_batch replaces + resets, next/prev cycle, current exposes the focused path.

The LoomEvent subscription and actual image render come with the glue PR that threads Arc<EventBus> and the chosen ImageRenderer through AppCtx. This PR is the state machine that later wiring reads from.

Tests (1 new, 75 total)

  • Preview cycle wraps forward and backward
Stacks on #62. Closes charles/loom#25. Adds `PreviewState` on `GenerateScreen`: a rolling batch of completed image paths with a wrap-around focus index and an optional progress fraction. `set_batch` replaces + resets, `next`/`prev` cycle, `current` exposes the focused path. The `LoomEvent` subscription and actual image render come with the glue PR that threads `Arc<EventBus>` and the chosen `ImageRenderer` through `AppCtx`. This PR is the state machine that later wiring reads from. ## Tests (1 new, 75 total) - Preview cycle wraps forward and backward
Adds PreviewState on GenerateScreen: a rolling set of completed image
paths with a focus index, plus an optional fractional progress value.
set_batch replaces the batch and resets focus, next/prev cycle with
wrap, and current exposes the focused path.

The actual image render + subscription to LoomEvent::ProgressUpdate /
::ImageGenerated lands with the glue PR that threads an
Arc<EventBus> through AppCtx. The state machine is the part this
ticket introduces so later wiring only has to plumb the events.

Closes charles/loom#25

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
charles changed target branch from tui/inpaint-canvas-23 to main 2026-04-11 20:42:31 +00:00
charles deleted branch tui/generate-preview-25 2026-04-11 20:42:33 +00:00
Sign in to join this conversation.
No reviewers
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!63
No description provided.