Skip to content

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 planeGeometry sized 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's tokenizeSettings.backgroundColor (or the legacy token.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 because applyTransformToCanvas clips its fillRect to the same circular path. The renderer now uses a circleGeometry (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 stale response_format error (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 deprecated dall-e-3 and dall-e-2 on v1/images/generations for standard API tier accounts and now rejects both model ids. Diagnosed locally by adding a build-marker log to OpenAIAdapter.generate and 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 legacy dall-e-* entries from IMAGE_MODELS.openai and replace with gpt-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 in modules.hosted.json and raised the regression floor in scripts/install-hosted-modules.test.ts to >= 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 to tokenArt.processedUrl || tokenArt.imageUrl. Since v0.22.0 we render tokenization in-shader and no longer bake processedUrl at 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 a processedUrl (which is why it "started working" after the user placed the token). New components/TokenThumbnail.tsx renders a 2x-resolution canvas using the same applyTransformToCanvas math the editor preview and WebGL shader use, so the thumbnail matches what the map will show. Falls back to the raw <Image> for mapAppearance === 'original', missing settings, or CORS-tainted draws so the user always sees something. applyTransformToCanvas was promoted from file-private to an exported function on utils/tokenizer.ts for this reuse. Regression: apps/web/src/components/UI/TokenModal/tabs/GeneralTab.tokenThumbnail.test.ts.