tui: gallery auto-refresh on generation complete and storage mutations #122
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom#122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
User story
As a user, I want the gallery to update automatically when I generate a new image or delete/favorite an item from another screen, so that I don't have to manually press
rto see changes.Problem
The gallery screen only loads items from storage on first render or when
needs_loadis manually set (by sort/search/delete within the gallery itself). After the Generate screen saves an image to gallery viaGalleryStorage::insert(), the Gallery screen has no way to know — it doesn't listen toLoomEvent::ImageGeneratedor any storage-change event.Acceptance criteria
Event::CoreMsg(LoomEvent::ImageGenerated { .. })by settingneeds_load = trueLoomEvent::GalleryChangedevent for deletes, favorites, and importssave_to_gallery()publishesLoomEvent::GalleryChangedafter successful insertLoomEvent::GalleryChangedso other open views stay in syncgrid_images) is cleared on refresh so stale thumbnails don't persistrkey still works as a force-refreshOut of scope
References
crates/loom-tui/src/screens/gallery.rs—load_from_storage(),needs_loadflagcrates/loom-tui/src/screens/generate.rs—save_to_gallery()crates/loom-core/src/event_bus.rs—LoomEventenum