v0.32.1 - Token artwork save fix
2026-06-11
Bugs
- [x] Cannot assign artwork to an existing token: every method (AI generate, drag/drop, load from URL, library) shows "save failed" and nothing persists, while the image uploads themselves succeed (thumbnails appear locally, files land on CDN). (Root cause: the Edit Token artwork autosave PATCHed
artworkstogether with the legacyimageUrlmirror in one request, and the v0.30.0 patch guard rejects any PATCH combining an array with other fields — 400PATCH cannot change an array (artworks) together with other fields. Token creation was unaffected because POST bypasses the guard, which is why only pre-existing tokens couldn't take art. Fix: the save now goes throughutils/tokenArtworkPatch.ts#buildArtworkPatchBodies, which splits it into guard-compliant single-field PATCHes sent sequentially —artworksfirst, stopping on failure so the mirror never outruns the array;patchTokennow returns success for that. Verified against prod: the split requests return 200/200 and the artwork persists. Unit tests validate every produced body against the realpatchGuardimplementation plus a regression case pinning the old combined shape as rejected; a source contract pins the TokenModal wiring.)