Skip to content

Show refined/edited/restyled images in candidates panel#2174

Open
SajalChaplot wants to merge 3 commits into
mainfrom
ai_main_e5f966ce7f2e4fe8a37d
Open

Show refined/edited/restyled images in candidates panel#2174
SajalChaplot wants to merge 3 commits into
mainfrom
ai_main_e5f966ce7f2e4fe8a37d

Add integration tests for image variant tray generation

567ad5f
Select commit
Loading
Failed to load commit list.
Builder.io Integration / Review Agent completed Jul 16, 2026 in 4m 55s

1 potential issue found

Incremental Code Review Summary

The latest commit adds integration coverage around generate-image and broadens append behavior so source-asset-driven calls automatically append to the current candidate tray. The new tests exercise real application-state read/modify/write behavior, fresh-generation resets, direct sourceAssetId calls, and action context forwarding. The implementation is generally sound, and the added integration coverage is valuable.

The previously reported concurrency issue at variant-slots.ts:104-109 remains unresolved and was intentionally not reposted. This incremental review found one additional user-visible issue: when an append reuses the existing tray state, the unconditional metadata assignments replace the tray's original prompt with the refinement prompt. Since the tray displays variants.prompt as its subtitle, the candidate panel loses the original generation context after a refinement.

Key Findings

Medium: Preserve the original tray prompt when appending a refinement, or store refinement context separately. Metadata should only be replaced for a genuinely new generation scope or same-scope batch update.

Focused tests and typechecking reported by the review agents passed (17 focused tests and typecheck). This remains a standard-risk state-management/UI behavior change.

🧪 Browser testing: Will run after this review (PR touches UI code)