agent-native icon indicating copy to clipboard operation
agent-native copied to clipboard

Show refined/edited/restyled images in candidates panel

Open SajalChaplot opened this issue 4 months ago • 13 comments

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 forward ActionRunContext and set appendVariant: true when delegating to generate-image.run.
  • generate-image.ts: adds an appendVariant boolean arg (default false) and threads it through pending/ready/failed variant slot upserts.
  • variant-slots.ts: upsertVariantSlot now appends to the previous state when appendVariant is true and the library matches, instead of resetting the candidate scope; cross-library appends are still rejected.
  • Updated specs for edit-image, restyle-image, and variant-slots to cover context passing, appendVariant forwarding, and append/reset behavior including cross-library isolation.
  • Added changelog entry noting refined images now appear in the Generated candidates panel, newest first.

Edit in Builder  Preview


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

SajalChaplot avatar Jul 16 '26 06:07 SajalChaplot

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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...

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.

netlify avatar Jul 16 '26 06:07 netlify

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...

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.

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

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

netlify avatar Jul 16 '26 06:07 netlify

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

github-actions[bot] avatar Jul 16 '26 06:07 github-actions[bot]

closing as it is not working as expected. will redo this.

SajalChaplot avatar Jul 28 '26 11:07 SajalChaplot