Conversation
Pingpong 2026-04-24: Space Opera inventory reads "500 gold" — a fantasy
leak into a genre whose lore uses "debt / collateral / bought my way
out" (i.e. credits). Same bug applies to every non-fantasy pack (MW
"Salvage", neon_dystopia, etc).
Server side already landed (sidequest-server develop 007fc08): the
InventoryPayload now carries ``currency_name`` populated from the
active pack's ``inventory.yaml::currency.name``. This change wires
the UI to read and render it.
- InventoryData gains optional ``currency_name?: string | null``.
- InventoryPanel renders ``{gold} {currency_name ?? "coin"}`` —
"coin" is deliberately genre-agnostic so a legacy pre-fix server
(no currency_name field) never leaks "gold" into a cyberpunk or
post-apocalyptic UI. No silent fallback to a fantasy default.
Wiring tests added to InventoryPanel.test.tsx:
- Renders "500 credits" when payload carries currency_name="credits"
and asserts "gold" is NOT in the rendered output.
- Falls back to "5 coin" when currency_name is absent (legacy-server
payload).
Requires sidequest-server develop at 007fc08 or later. Older servers
send no currency_name → UI shows "coin" fallback until server updates.
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
InventoryPanelnow renders{gold} {currency_name ?? "coin"}instead of the hardcoded{gold} gold.007fc08which addscurrency_nametoInventoryPayload(read from active pack'sinventory.yaml::currency.name).Why
Pingpong entry: "Inventory currency reads 500 gold in Space Opera — genre-agnostic fantasy leak". Same bug affects every non-fantasy pack — MW reads "Salvage", space_opera reads "credits", spaghetti_western reads "Dollars" in their content, but the UI was throwing all that data away.
Fallback
When the server doesn't send
currency_name(legacy pre-fix server), the UI renders the genre-agnostic literal"coin"— NOT"gold". No silent fantasy fallback.Test plan
InventoryPanel.test.tsx— 2 new tests: populated currency_name renders"500 credits"+ asserts absence of "gold"; missing field falls back to"5 coin"."500 credits"not"500 gold"."42 Salvage".🤖 Generated with Claude Code