Show refined/edited/restyled images in candidates panel
Summary
Refine, edit, and restyle actions now pass an appendVariant flag through to generate-image so their results are added to the existing candidate tray instead of resetting it, with newest results shown first.
Problem
When a user sent a prompt to refine (or edit/restyle) a generated asset, the resulting image was not surfaced in the Generated candidates UI alongside the original candidates, making it hard to compare the refined result with prior options.
Solution
Propagate the action's run context and a new appendVariant flag from edit-image, refine-image, and restyle-image through to generate-image, which forwards it to the variant slot state so the refined candidate is appended to the existing live tray for the same library/scope rather than starting a fresh candidate set.
Key Changes
edit-image.ts,refine-image.ts,restyle-image.ts: accept and forwardActionRunContextand setappendVariant: truewhen delegating togenerate-image.run.generate-image.ts: adds anappendVariantboolean arg (defaultfalse) and threads it through pending/ready/failed variant slot upserts.variant-slots.ts:upsertVariantSlotnow appends to the previous state whenappendVariantis true and the library matches, instead of resetting the candidate scope; cross-library appends are still rejected.- Updated specs for
edit-image,restyle-image, andvariant-slotsto cover context passing,appendVariantforwarding, and append/reset behavior including cross-library isolation. - Added changelog entry noting refined images now appear in the Generated candidates panel, newest first.
To clone this PR locally use the Github CLI with command gh pr checkout 2174
You can tag me at @builderio for anything you want me to fix or change
Deploy Preview for agent-native-brain canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-brain/deploys/6a58ae6987fc870008a04514 |
Deploy Preview for nutritrack-daily-calories canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/nutritrack-daily-calories/deploys/6a58ae69594cc600083b544e |
Deploy Preview for agent-native-design ready!
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-design/deploys/6a58ae6925c4ef000846dae3 |
| Deploy Preview | https://deploy-preview-2174--agent-native-design.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-images ready!
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-images/deploys/6a58ae6987fc870008a04512 |
| Deploy Preview | https://deploy-preview-2174--agent-native-images.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-content canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-content/deploys/6a58ae6920ea4400083b72a6 |
Deploy Preview for agent-native-slides canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-slides/deploys/6a58ae69eeb8e40007bb1967 |
Deploy Preview for agent-native-mail canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-mail/deploys/6a58ae69716c9300079704d4 |
Deploy Preview for agent-native-calendar canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-calendar/deploys/6a58ae69fe08ad00087db4ae |
Deploy Preview for agent-native-macros canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-macros/deploys/6a58ae69d7a60400081cb4c8 |
Deploy Preview for agent-native-dispatch canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-dispatch/deploys/6a58ae69175ddd0008ebe0f8 |
Deploy Preview for agent-native-forms canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-forms/deploys/6a58ae6920ea4400083b72ab |
Deploy Preview for agent-native-starter canceled.
| Name | Link |
|---|---|
| Latest commit | 567ad5f676d62cf15bbf53d1c50bb7d48b7ef26b |
| Latest deploy log | https://app.netlify.com/projects/agent-native-starter/deploys/6a58ae69bef98500073afb1a |
closing as it is not working as expected. will redo this.
