v0.23.1 — Hotfix: token bg leaks outside crop + DALL-E deprecated + token thumbnail ignores tokenize settings (2026-05-16)
2026-05-16
Bug Fixes
- fix(WebGLTokenLayer): clip token backgroundColor to the circular crop — The backing mesh that fills transparent pixels behind a tokenized token's source art was a square
planeGeometrysized to the full token bounding box. The tokenized image shader discards the four corners of that quad to produce the circular crop, so when an artwork'stokenizeSettings.backgroundColor(or the legacytoken.backgroundColor) was set, it bled out through the discarded corners and rendered as a square behind the circular token. The canvas-based editor preview never had this bug becauseapplyTransformToCanvasclips itsfillRectto the same circular path. The renderer now uses acircleGeometry(radius =min(width, height)/2, matching the shader's inscribed circle) for the backing mesh when the token is in tokenized mode; non-tokenized art keeps its full square backing rect. Regression:apps/web/src/components/WebGLTokenLayer.tokenBackground.test.ts. - fix(genai): replace deprecated DALL-E models with gpt-image-1 — DALL-E image generation was failing with
OpenAI API error (400): { "error": { "message": "The model 'dall-e-3' does not exist.", "type": "image_generation_user_error", "param": "model", "code": "invalid_value" } }. The original symptom shown to users was a staleresponse_formaterror (which we'd already fixed in@purple-cat-games/genai@0.3.5); the real underlying problem only surfaced once that fix was actually being executed. OpenAI deprecateddall-e-3anddall-e-2onv1/images/generationsfor standard API tier accounts and now rejects both model ids. Diagnosed locally by adding a build-marker log toOpenAIAdapter.generateand confirming the v0.3.5 code path was running with the correct request body — so the failure was on OpenAI's side, not in genai. Fix shipped in@purple-cat-games/genai@0.3.6: drop the legacydall-e-*entries fromIMAGE_MODELS.openaiand replace withgpt-image-1(the request shape is unchanged; the b64_json fallback added in v0.3.5 already handles gpt-image-1's base64-only response). Bumped platform's pin to 0.3.6 inmodules.hosted.jsonand raised the regression floor inscripts/install-hosted-modules.test.tsto>= 0.3.6. - fix(TokenModal): Token Image drop-zone thumbnail now reflects tokenize settings live — The thumbnail in
TokenModal/tabs/GeneralTab's Token Image slot was a plain Mantine<Image>bound totokenArt.processedUrl || tokenArt.imageUrl. Since v0.22.0 we render tokenization in-shader and no longer bakeprocessedUrlat edit time, so the thumbnail showed the raw rectangular source image and ignored any circular-crop / pan / zoom / border edits until the token was inserted and something else happened to populate aprocessedUrl(which is why it "started working" after the user placed the token). Newcomponents/TokenThumbnail.tsxrenders a 2x-resolution canvas using the sameapplyTransformToCanvasmath the editor preview and WebGL shader use, so the thumbnail matches what the map will show. Falls back to the raw<Image>formapAppearance === 'original', missing settings, or CORS-tainted draws so the user always sees something.applyTransformToCanvaswas promoted from file-private to an exported function onutils/tokenizer.tsfor this reuse. Regression:apps/web/src/components/UI/TokenModal/tabs/GeneralTab.tokenThumbnail.test.ts.