Feature set 132. - #59
Merged
Merged
Conversation
Give games artwork: a full logo and a square thumbnail.
Games were the one catalogue entity with no picture. They now carry two,
because the full logo and the square emblem are different crops rather than
two sizes of the same image -- the full lockup is wide and mostly title
text, which is illegible and badly proportioned wherever a square is
wanted. Both are editable and uploadable, and both are served by
/api/games and /api/games/{id}.
No generated slot, unlike characters and monsters. The generation stage
selects those two only, so art parked at gen/games/{id}.webp would be
promoted by nothing and served by nothing.
Enforcing that turned the upload endpoint's flat resource and slot lists
into a per-resource map: characters and monsters take original or
generated, games take original or thumbnail. A shared list plus an
exception for games would have rotted at the next shape. Keys follow the
bucket layout already in use -- thumb/games/7.webp sits beside
gen/monsters/12.webp.
The dashboard's art panel was likewise hardcoded to two fixed slots in
three places. Slots are now per tab, and a tab marks which one the table
thumbnail should prefer -- the square one for games, the generated one for
everything else, which is what it already did.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Games get artwork — a full logo and a square thumbnail
Games were the one catalogue entity with no picture. They now carry two, and both are editable, uploadable and served.
Two crops, not two sizes. The full logo is the wide lockup with the title text; the thumbnail is the square emblem, artwork alone. Resizing one into the other doesn't work — the full lockup is mostly text, which is illegible and badly proportioned wherever a square is wanted. So they're separate columns, and clients pick by shape rather than by resolution.
imageUrlgames/{id}.webpthumbnailUrlthumb/games/{id}.webpKeys follow the bucket layout already in use, so
thumb/games/7.webpsits besidegen/monsters/12.webp.No generated slot
Generation selects monsters and characters only. Art parked at
gen/games/{id}.webpwould be promoted by nothing and served by nothing, so the API refuses that combination outright rather than accepting an upload into a dead column.Enforcing it turned the upload endpoint's flat
ResourcesandSlotslists into a per-resource map — characters and monsters takeoriginal|generated, games takeoriginal|thumbnail. My first pass was a shared list plus anif (resource == "games" && slot == "generated")exception; that was going to rot at the next shape, so it's a map now.The dashboard had the same problem in three places: the art panel, the zoom modal, and the create-form's hidden inputs all assumed exactly two fixed slots. Slots are now per tab, and a tab marks which one the table thumbnail should prefer — the square one for games, the generated one for everything else, which preserves existing behaviour.
Migration
One clean
AddGameImagesadding three nullable columns. TheAddGameImagefrom the previous round never shipped, so it's regenerated rather than stacked. Migrations apply on startup, so the deploy handles the schema.Notes
dotnet formatclean.X-2andXIII-2have no game rows. The catalogue is I–XVI; uploads are addressed by row id, so those need creating in the dashboard first. They'd land at ids 17/18.🤖 Generated with Claude Code