Region hover/selected shows current owner, not stale parent-country code (v0.18.0) #33

Merged
kamilkrzywda merged 1 commits from fix/region-display-owner into master 2026-10-13 21:15:46 +02:00
Owner

Part of #16

Fixes a display bug: a region whose country had been taken (ownership transferred) still showed the old country's code (e.g. "FRA") on hover and in the dossier "Selected" label. That came from the static GeoJSON properties.parent (the region's geographic origin), which never updates when ownership changes.

The tooltip and the "Selected" label now show the region's name + current owner only. Ownership resolution and the choropleth are unchanged (still keyed on properties.parent for the country-level model).

  • src/components/WorldMap.tsx: removed the static parent-code sub-line from the hover tooltip (owner chip + stats intact).
  • src/App.tsx: the dossier "Selected" label no longer prints (parent).

Typecheck, lint, 59 unit tests, and build all pass.

Part of #16 Fixes a display bug: a region whose country had been **taken** (ownership transferred) still showed the old country's code (e.g. "FRA") on hover and in the dossier "Selected" label. That came from the static GeoJSON `properties.parent` (the region's geographic origin), which never updates when ownership changes. The tooltip and the "Selected" label now show the region's **name + current owner** only. Ownership resolution and the choropleth are unchanged (still keyed on `properties.parent` for the country-level model). - `src/components/WorldMap.tsx`: removed the static parent-code sub-line from the hover tooltip (owner chip + stats intact). - `src/App.tsx`: the dossier "Selected" label no longer prints `(parent)`. Typecheck, lint, 59 unit tests, and build all pass.
kamilkrzywda added 1 commit 2026-10-13 21:13:11 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-10-13 21:13:11 +02:00
kamilkrzywda merged commit 9c29779572 into master 2026-10-13 21:15:46 +02:00
kamilkrzywda deleted branch fix/region-display-owner 2026-10-13 21:15:46 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/History#33