Skip to content

fix: harden track forms, auto-sync events every 15s, show unsync counts - #244

Merged
tfield merged 3 commits into
mainfrom
fix/track-form-resilience-and-autosync
Apr 17, 2026
Merged

fix: harden track forms, auto-sync events every 15s, show unsync counts#244
tfield merged 3 commits into
mainfrom
fix/track-form-resilience-and-autosync

Conversation

@tfield

@tfield tfield commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

tfield added 3 commits April 17, 2026 17:36
…nging

The 15s tracking-data auto-sync was firing its own ping() every tick,
on top of the 30s shared network-health poll. On flaky venue WiFi that
meant two independent ping streams plus extra work for no new signal.

Switch autoSyncTrackingData to read the shared networkHealth snapshot
via a new non-hook getNetworkHealth() accessor. Skip the tick when the
shared state is null (pre-ready) or false (recent failure) — the next
15s tick will see any recovery the 30s poll picks up.
All sync orchestration and admin pages were each running their own
ping() per call/render. Switch to the shared networkHealth state so
the app makes one 30-second ping stream instead of N independent ones:

- sync.ts: autoSyncStrategyPlans, autoSyncMatchSchedule, doManualSync,
  doServerDataSync, refreshStrategyPlanForMatch read getNetworkHealth()
  snapshot and skip when alive !== true.
- useFetchSchedule: hook into useNetworkHealth(); check alive at submit.
- 4 admin pages (event-types, sequence-types, strategy-areas, users):
  derive `online` from useNetworkHealth().alive; drop ad-hoc useEffect+
  useState ping wiring.

useLoginStatus is unchanged (it already consumes useNetworkHealth from
the upstream network-status PR).
@tfield
tfield merged commit 457dbc3 into main Apr 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant