Skip to content

Client: face-down marker art never loads — useCardImage bails on the empty name before reading tokenImageRef (#7535 dead on arrival) #7549

Description

@cuinhellcat

What you see

Every face-down permanent renders the generic card back. The #7535 marker tokens (Morph / Manifest / A Mysterious Creature) never appear — for opponents' permanents either, where the render path is engaged as designed.

Why

The marker request deliberately carries NO card name and NO oracle id — only tokenImageRef names the printing (CardImage.tsx:78-86, ArtCropCard.tsx:51-63). But useCardImage short-circuits on exactly that shape before the ref-driven fetch can run:

  • client/src/hooks/useCardImage.ts (effect): if (!cardName && !oracleId) { setSrc(null); ... return; }
  • same guard again in the synchronous first-render snapshot

so fetchTokenImageByRef — which resolves fine against scryfall-token-images.json (all three oracle-id keys present, art_crop/normal URLs included) — is unreachable, and every caller falls back to CARD_BACK_URL.

Why the tests were green

The #7535 component tests stub the image hook, so they prove the callers pass the right ref — and cannot observe that the real hook drops it. The regression for this fix must exercise the REAL hook (service layer mocked, hook logic live).

Found by live playtest (the human half of this account); the marker feature shipped merged-and-green without ever working in the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions