Skip to content

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 artworks together with the legacy imageUrl mirror in one request, and the v0.30.0 patch guard rejects any PATCH combining an array with other fields — 400 PATCH 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 through utils/tokenArtworkPatch.ts#buildArtworkPatchBodies, which splits it into guard-compliant single-field PATCHes sent sequentially — artworks first, stopping on failure so the mirror never outruns the array; patchToken now 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 real patchGuard implementation plus a regression case pinning the old combined shape as rejected; a source contract pins the TokenModal wiring.)