Skip to content

Add adaptive card artwork display - #29

Open
Sisyphe42 wants to merge 5 commits into
masterfrom
feature/adaptive-card-art
Open

Add adaptive card artwork display#29
Sisyphe42 wants to merge 5 commits into
masterfrom
feature/adaptive-card-art

Conversation

@Sisyphe42

Copy link
Copy Markdown
Owner

Summary

  • add an optional per-asset artwork display contract with adaptive, contain, and cover modes plus normalized focal points
  • add host-neutral editing and matching local/Hosted PATCH /api/editor/assets/:assetId persistence
  • use one defensive artwork runtime across Creator thumbnails, Developer Preview, Shared/Hosted Player, and Standalone Player
  • keep the existing fixed 1:1 artwork frame and preserve legacy assets through centered Adaptive defaults

Contract and compatibility

{
  "metadata": {
    "display": {
      "fit": "adaptive",
      "focalPoint": { "x": 0.5, "y": 0.5 }
    }
  }
}
  • fit accepts adaptive | contain | cover; focal coordinates must be finite values in 0..1
  • missing metadata needs no migration and renders as centered adaptive
  • the PATCH route merges only metadata.display, preserving MIME, SHA, source, and other metadata
  • AI image replacement that reuses an asset id preserves its display settings
  • malformed runtime input falls back defensively even though authored validation rejects it

Rendering and smoke evidence

  • Adaptive: complete contain foreground over an aria-hidden blurred cover backdrop
  • Full image: complete contain foreground without the backdrop
  • Fill frame: focal-point-aware cover foreground without the backdrop
  • Hosted browser coverage exercises all Creator controls, reload persistence, Developer Preview, Shared Player rendering, and landscape/portrait/square source ratios
  • Standalone Player smoke passed at 1440×1000 and 390×844: the artwork frame remained square (176×176 desktop, 155.5×155.5 mobile), Adaptive used contain, the backdrop was aria-hidden, and no page errors occurred

Validation

  • npm run verify — passed (112 unit tests, 30 integration tests)
  • npm run test:hosted — passed (19 browser tests)
  • npm run build:game -- fixtures/content/oss-court.cards.json <temporary-output-dir> — passed; emitted assets/card-artwork.js and all referenced assets
  • Creator Preview, Shared Player, and Standalone Player visible smoke — passed

No Sharp, smartcrop.js, cropper, or other image-processing dependency was added. The implementation creates no derived images and does not modify source asset bytes, dimensions, formats, or URIs.

Define validated per-asset fit and focal metadata, expose matching local and Hosted editor mutations, and preserve display settings across image replacement. Review the nested metadata merge and host-parity API coverage.
Render card artwork through a shared defensive runtime across Creator, Hosted, and standalone Players, with fit and focal-point controls plus packaged runtime coverage.

Review the fixed 1:1 frame semantics, accessibility behavior, and offline build inclusion.
Document the asset display schema, persistence contract, rendering modes, and packaging requirement. Add Hosted coverage for Creator Preview plus landscape, portrait, and square source images.

Review the recorded validation results and compatibility defaults; source images remain unchanged and no image-processing dependency is introduced.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
reigns-agent-creator-web Ready Ready Preview, Comment Jul 23, 2026 5:36pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant