Background
This issue is recorded from the discussion in PR #2963 (feat(spx-gui): separate generation entry).
After the gen entry is separated, there are two remaining UX issues to address:
Problem 1: No deletion support for in-progress gen assets
When a user starts generating a sprite/backdrop (via AI generation), the in-progress gen item appears in the sprite list / backdrop list as a collapsed thumbnail. Currently, there is no way to delete/cancel a collapsed gen item from the list view.
The GenState (src/components/editor/gen.ts) already has removeSprite(id) and removeBackdrop(id) methods, but they are not exposed in the UI. The SpriteGenItem and BackdropGenItem collapsed thumbnails show loading animations but have no delete/cancel action.
Expected behavior: Users should be able to right-click (or via a context menu) on a collapsed gen item in the sprite/backdrop list to cancel/delete it.
Problem 2: Inconsistent "collapse" vs "close" interaction
Currently, the SpriteGenModal has two behaviors:
- Collapse (
@collapse event on SpriteGen.vue): Minimizes the modal and creates a collapsed gen item in the sprite list, keeping the generation running in the background. This is handled via genCollapseHandler.
- Close (clicking the X or mask): Shows a confirmation dialog asking whether to exit (cancel) the generation.
However, BackdropGenModal (BackdropGenModal.vue) does not have a collapse flow — it always shows the exit confirmation dialog and cancels the generation. It is missing the genCollapseHandler prop and the collapse button.
Expected behavior:
- Unify the collapse/close interaction between
SpriteGenModal and BackdropGenModal
- Backdrop generation should also support collapsing into a background gen item (similar to sprite gen)
- The "collapse" and "close" semantics should be clearly distinguished in both modals
Files involved
spx-gui/src/components/asset/gen/sprite/SpriteGenModal.vue — has collapse + close logic
spx-gui/src/components/asset/gen/backdrop/BackdropGenModal.vue — only has close logic (no collapse)
spx-gui/src/components/asset/gen/sprite/SpriteGenItem.vue — collapsed sprite gen item (no delete action)
spx-gui/src/components/asset/gen/backdrop/BackdropGenItem.vue — collapsed backdrop gen item (no delete action)
spx-gui/src/components/editor/gen.ts — GenState with removeSprite/removeBackdrop methods (unused in UI)
spx-gui/src/components/asset/index.ts — useBackdropGenModal (missing genCollapseHandler)
spx-gui/src/components/editor/sprite/SpriteList.vue — renders SpriteGenItem items (no delete handler)
spx-gui/src/components/editor/stage/backdrop/BackdropsEditor.vue — renders backdrops (no gen item UI)
Acceptance Criteria
Background
This issue is recorded from the discussion in PR #2963 (feat(spx-gui): separate generation entry).
After the gen entry is separated, there are two remaining UX issues to address:
Problem 1: No deletion support for in-progress gen assets
When a user starts generating a sprite/backdrop (via AI generation), the in-progress gen item appears in the sprite list / backdrop list as a collapsed thumbnail. Currently, there is no way to delete/cancel a collapsed gen item from the list view.
The
GenState(src/components/editor/gen.ts) already hasremoveSprite(id)andremoveBackdrop(id)methods, but they are not exposed in the UI. TheSpriteGenItemandBackdropGenItemcollapsed thumbnails show loading animations but have no delete/cancel action.Expected behavior: Users should be able to right-click (or via a context menu) on a collapsed gen item in the sprite/backdrop list to cancel/delete it.
Problem 2: Inconsistent "collapse" vs "close" interaction
Currently, the
SpriteGenModalhas two behaviors:@collapseevent onSpriteGen.vue): Minimizes the modal and creates a collapsed gen item in the sprite list, keeping the generation running in the background. This is handled viagenCollapseHandler.However,
BackdropGenModal(BackdropGenModal.vue) does not have a collapse flow — it always shows the exit confirmation dialog and cancels the generation. It is missing thegenCollapseHandlerprop and the collapse button.Expected behavior:
SpriteGenModalandBackdropGenModalFiles involved
spx-gui/src/components/asset/gen/sprite/SpriteGenModal.vue— has collapse + close logicspx-gui/src/components/asset/gen/backdrop/BackdropGenModal.vue— only has close logic (no collapse)spx-gui/src/components/asset/gen/sprite/SpriteGenItem.vue— collapsed sprite gen item (no delete action)spx-gui/src/components/asset/gen/backdrop/BackdropGenItem.vue— collapsed backdrop gen item (no delete action)spx-gui/src/components/editor/gen.ts—GenStatewithremoveSprite/removeBackdropmethods (unused in UI)spx-gui/src/components/asset/index.ts—useBackdropGenModal(missinggenCollapseHandler)spx-gui/src/components/editor/sprite/SpriteList.vue— rendersSpriteGenItemitems (no delete handler)spx-gui/src/components/editor/stage/backdrop/BackdropsEditor.vue— renders backdrops (no gen item UI)Acceptance Criteria