fix(shard): decode the atlas places objects and render them
`AtlasCreatureDto.places` was typed `List<String>` while the server sends
`{facet, label, spawners, maxAlive}` objects. The detail route answers 200 with
~49 KB, kotlinx throws on decode, and the screen renders "Something went wrong
on the server" — so the whole Atlas creature page was dead, and the error
blamed a server that was fine. Nullable-with-defaults protects against a
missing field, never a wrong element type.
Adds AtlasPlaceDto, plus the `art` field the server also sends, so a decode
cannot depend on that staying absent (neither client renders art yet).
`places` was never rendered either, so the aggregate the atlas exists to give —
"Shrines, Isamu-Jima, Yew", resolved server-side by point-in-rect — was missing
from the app while the web page led with it. Adds a "Where it spawns" section
above the individual spawners, matching web's ordering, and a plural for the
spawner count now that single-spawner places are on screen in bulk.
Adds ShardContentDtoTest — the first decode test any of the four Protocol 3.0
DTOs has had, fed payloads captured from a live server. That absence is the
root cause: the fakes in data/api/fake/ construct DTOs in Kotlin, so no test in
the suite could see a wire mismatch, even though PLAN.md §9 already required
"DTO decode for each new shape".
Also renders a placeholder row on an unscored leaderboard (the instance name,
em dash where a score goes) rather than a blank card — deliberately not shaped
like a real entry, since a placeholder that looked like a standing would be a
fabricated one.
Found by the on-device five-rung walk against a live shard; all four screens
re-verified on the emulator afterwards.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7CBg11prhLimL9iHSX1bP
This commit is contained in:
@@ -417,6 +417,9 @@
|
||||
<!-- ── Leaderboards (Protocol 3.0 §7, M11) ─────────────────────────── -->
|
||||
<string name="leaderboards_empty">This shard isn\'t publishing any leaderboards yet.</string>
|
||||
<string name="leaderboards_board_empty">Nobody has scored here yet.</string>
|
||||
<!-- Where a score would sit on the placeholder row of an unscored board. An em
|
||||
dash, not "0" — nobody has scored zero, nobody has scored at all. -->
|
||||
<string name="leaderboards_no_score">—</string>
|
||||
<string name="leaderboards_players">%1$d players</string>
|
||||
<!-- Only shown for capped systems; most systems on a real shard are uncapped. -->
|
||||
<string name="leaderboards_cap">Cap: %1$d</string>
|
||||
@@ -444,9 +447,17 @@
|
||||
<!-- ── Spawn atlas (Protocol 3.0 §6, M11) ──────────────────────────── -->
|
||||
<string name="atlas_search_label">Search creatures</string>
|
||||
<string name="atlas_empty">No creatures match that search.</string>
|
||||
<string name="atlas_spawner_count">%1$d spawners</string>
|
||||
<!-- A place can legitimately hold a single spawner, and the aggregate list is full
|
||||
of them — "1 spawners" on every other row is worth a plural for. -->
|
||||
<plurals name="atlas_spawner_count">
|
||||
<item quantity="one">%1$d spawner</item>
|
||||
<item quantity="other">%1$d spawners</item>
|
||||
</plurals>
|
||||
<string name="atlas_total_alive">Up to %1$d alive at once</string>
|
||||
<string name="atlas_facet_count">%1$s (%2$d)</string>
|
||||
<!-- The aggregate: "where is it", as opposed to the raw coordinates below it. -->
|
||||
<string name="atlas_section_places">Where it spawns</string>
|
||||
<string name="atlas_place_max_alive">up to %1$d at once</string>
|
||||
<string name="atlas_section_spawners">Spawn points</string>
|
||||
<string name="atlas_section_also_here">Also spawns here</string>
|
||||
<string name="atlas_spawners_truncated">More spawn points than shown.</string>
|
||||
|
||||
Reference in New Issue
Block a user