ReviewOS

stacks/wildloop

Reconcile the two divergent capture designs (client proximity vs backend route-split)

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

Problem

There are two unrelated capture mechanics that never agree. useRecorder.ts runs a client-side 10-ping proximity capture (CAPTURE_SAMPLES_NEEDED=10, its own pointInPolygon, checkConquest) that flips ownership in localStorage; the backend runs closed-loop claim + route-intersection split. A run can 'capture' client-side while the backend claim/conquest does nothing (or vice versa), so the meters and the persisted truth disagree.

Acceptance

  • Choose the backend closed-loop+split as authoritative.
  • Make the client meters reflect backend results (or a faithful preview), not an independent rule.
  • XP/stats come from the backend response.
9 days ago

Done (commit a51b964). The backend (closed-loop claim + route-intersection split) is now the single source of truth. The recorder's in-run proximity meter is visual-only (no client-side ownership flip / XP); on stop the backend decides the outcome and the recorder re-hydrates territories from /api/territories/map and repaints. Extracted loadTerritories() so boot + post-run share one mapping.

Sign in to comment on this issue.