fix(web): preserve prompt template media metadata - #7102
Conversation
|
🧪 This PR has changes that need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready (and design/product have signed off, where applicable). |
nettee
left a comment
There was a problem hiding this comment.
I reviewed the changed Home media state and metadata paths and verified the initial, delayed-template, template-switch, override, and rejected-create retry flows. The focused Home media suite passes all 29 tests, and the full web suite, workspace typecheck, and guard are clean. Nice work closing the metadata gap while keeping the deferred run inputs intact—this is a thoughtful, well-covered fix.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.
Visual regression reviewHead:
0 changed · 21 unchanged · 0 new without baseline · 1 failed Capture or diff failures
Unchanged casesVisual diff is advisory only and does not block merging. |




























































Refs #7088
Why
Choosing an image prompt template from Home could produce a contradictory project: the template said
gpt-image-2and3:4, while the stored project metadata still said the default Vela model and16:9. The mismatch was especially easy to hit when prompt templates arrived after the Home composer had already mounted, and it could reappear after a rejected create was retried.This PR implements only the independently approved template-propagation slice from #7088. The broader user-level media defaults, runtime propagation, Cloud authentication, catalog labels, and migration work remain out of scope.
What users will see
Image projects created from Home now keep the selected prompt template's supported model and aspect ratio through initial selection, delayed template loading, project creation, and retry. Users can still change the model or aspect afterward without the template silently pinning it again.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-packflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
N/A — this changes the project metadata emitted by the existing Home template flow, without changing its layout or controls. The submitted payload is covered by the HomeView integration test.
Bug fix verification
apps/web/tests/home-media-surfaces.test.tsandapps/web/tests/components/HomeView.media-options.test.tsxValidation
pnpm --filter @open-design/web exec vitest run -c vitest.config.ts tests/home-media-surfaces.test.ts tests/components/HomeView.media-options.test.tsx --maxWorkers=2(29 passed)pnpm --filter @open-design/web testpnpm --filter @open-design/web typecheckpnpm guardpnpm typecheckgit diff --checkImplementation and test drafting were AI-assisted. I reviewed the final diff and independently verified the behavior and validation results above.