[enhancement]: special handling for canvas, linear tabs in session queue
Is there an existing issue for this?
- [X] I have searched the existing issues
Contact Details
No response
What should this feature add?
We have some complexity around tracking where a generation originated.
For example, we manually track queue items' batch IDs for canvas generations in the canvas state. When an image is generated from one of the canvas-tracked batch IDs, we add it to the canvas staging area. Handling this correctly is a major pain in the butt and has caused a number of bugs, including #5969 (this isn't the first time this bug has popped up).
Another example - we want to handle progress images differently on t2i/i2i, canvas and workflows. This is tedious currently, because we have to track each batch's origin on the client and handle appropriately.
We should explore adding a field or two to the session queue items to support the linear UI and canvas.
Could be as simple as generation_mode: Optional[Literal["linear_t2i", "linear_i2i", "canvas", "workflow"]]. When we received queue item events in the client, we can check this field and use that to determine handling.
Alternatives
No response
Additional Content
No response