fix(client): revert crossOrigin on Scryfall <img> tags (fixes card-art regression)#4352
Merged
Conversation
…t regression) PR #4343's crossOrigin=anonymous turned card art + mana symbols into CORS requests; browser/CF caches filled pre-#4343 from no-CORS requests hold ACAO-less responses, so the CORS check fails and every cached image falls back to text. The COEP/SharedArrayBuffer shared-memory card DB this was prepping for was replaced by the game-scoped subset (#4348), so crossOrigin has no remaining purpose. DeathShatter/AudioManager keep their own crossOrigin. Also render mana symbols ({T}/{W}/...) in the image-fallback oracle text via RichLabel instead of literal braces.
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the crossOrigin="anonymous" attribute from image elements in ArtCropCard, CardImage, and ManaSymbol. It also updates CardImage to render the resolved oracle text using the RichLabel component instead of plain text. There are no review comments, so no feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Card art and mana symbols were falling back to plain text on the whole board (every card showed its name + oracle text instead of its image).
Root cause
PR #4343 added
crossOrigin="anonymous"to the three Scryfall<img>components as prep for a futureCOEP: require-corpcross-origin-isolation switch (needed for aSharedArrayBuffershared-memory card DB). That switch to CORS mode is what broke image rendering:crossOriginturns each<img>into a CORS request, which only renders if the response carriesAccess-Control-Allow-Origin.access-control-allow-origin: *only when anOriginheader is sent, and — critically — its no-Origin responses carry noVary: Origin.A cold cache would have loaded fine — which is why this only began after #4343 shipped.
The app host (
preview.phase-rs.dev) has no COEP/COOP header, so this is purely the per-<img>CORS-mode change.Fix
Revert the
crossOriginattribute onCardImage,ArtCropCard, andManaSymbol, restoring the no-CORS loading that worked before. This change has no remaining purpose — the COEP/SharedArrayBuffershared-memory card DB it was prepping for was replaced by the game-scoped card-DB subset (#4348), so cross-origin isolation is no longer on the roadmap.DeathShatterandAudioManagerkeep their own self-containedcrossOrigin(canvas/audio taint needs); theindex.htmlScryfall preconnectcrossoriginpredates #4343 and is left intact.Also included: mana symbols in the image-fallback text
While the image fallback exists, its oracle text rendered
{T}/{W}/{1}as literal braces. It now routes throughRichLabel(the same building blockCardPreviewuses), so the fallback shows real mana symbols. Low-visibility after the revert (images load again), but correct.Verification
check-frontend(TypeScript + ESLint) green. Recommend a hard-reload / private-window check on the preview build to confirm art returns (a cold cache bypasses the poisoned entries).