Show refined/edited/restyled images in candidates panel#2174
Show refined/edited/restyled images in candidates panel#2174SajalChaplot wants to merge 3 commits into
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)