fix: harden track forms, auto-sync events every 15s, show unsync counts - #244
Merged
Conversation
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.