ReviewOS

stacks/wildloop

Fix territory status enum mismatch (backend active|contested vs store secure|contested)

#942
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

Backend Territory.status is 'active' | 'contested' (model + migration), but the frontend store types it 'secure' | 'contested' (resources/components/stores.stx). useTerritoryCatalog.ts maps 'active'→'secure' on hydrate, but the divergence is a footgun and breaks the 'mine/contested' filters' intent.

Acceptance

  • Pick one vocabulary and use it consistently across model, Actions, store, and UI (or formalize the mapping in one place).
9 days ago

Fixed in a5d1fa1. One vocabulary now — the store, catalog hydration, and seeds all use the backend's active|contested; "Secure" survives only as a display label. The persist key was bumped to v3 so older localStorage snapshots can't resurrect the dead secure value.

Sign in to comment on this issue.