feat(tui): wire Generate screen to PluginBridge for generation & progress #102
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/generate-wire-86"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GenerationWorkeron a background tokio task, forwardingGenWorkerOutputmessages through theEventBusso the screen receives them asEvent::CoreMsg(...)LoomEvent::ProgressUpdate,ImageGenerated,JobStarted, andJobFailedto update preview state and show progress percentageskey to save the focused preview image to gallery viaGalleryStorage::insert()rkey to reuse the focused preview image as init image (switches to i2i mode)Escto cancel a running generation via the sharedAtomicBoolcancel flagCloses charles/loom#86
Test plan
cargo clippy -p loom-tui -- -D warningspassescargo test -p loom-tuipasses (113 tests)just qapasses (pre-push hook)sto save to gallery, verify notificationrto reuse as init image, verify mode switches to i2i🤖 Generated with Claude Code
Review — PR #102: Generate screen wired to PluginBridge for generation & progress
Strong PR. Generation submission, progress tracking, cancellation, gallery save, and i2i reuse — all clean.
Concern:
skey conflictsis bound to "save to gallery" when a preview exists, but only guarded by!self.is_prompt_field()and not being in Model/Sampler focus. However,sis also the global nav shortcut for Settings (from keybinds). The screen-level handler runs first so it should shadow the global, but this means you can't navigate to Settings viaswhile on the Generate screen with a preview. Intentional?Concern:
GalleryItemconstructionsave_to_gallerybuilds aGalleryItemwiththumbnail_path: path.clone()(same as full image). The gallery grid/detail view might expect an actual thumbnail. If thumbnail generation is deferred, add a comment noting it.Minor
active_jobisOption<uuid::Uuid>— only one job at a time. The queue overlay (#103) suggests multiple jobs can exist. Is it intentional that the Generate screen tracks only the latest?handle_core_eventpattern-matchesjob_id == active_idon each variant — could use a helper to reduce repetition, but not a blocker.generating... N%but there's no spinner or animation for the 0% → first-update gap. A "submitting…" state beforeJobStartedarrives would improve perceived responsiveness.6fb09d8bcctoa40f1f3e93