Preserve fleet match timing across empty telemetry
CI / checks (push) Successful in 4m46s

This commit is contained in:
2026-10-09 19:41:55 -04:00
parent d1f581d6a8
commit ce6dba17e6
12 changed files with 171 additions and 53 deletions
+2 -4
View File
@@ -20,15 +20,13 @@ export function successfulStatusFields(
};
}
/** Occupancy timers and match clearing follow the same source as the UI. */
/** Occupancy follows the UI's source; only gameplay evidence changes match timing. */
export function activityFields(current: ServerRow, status: ServerObservation): Partial<ServerRow> {
if (status.health !== 'online' || status.last_players === null) return {};
return status.last_players > 0
? { active_since: current.active_since ?? status.last_seen_at, inactive_since: null }
: {
active_since: null,
inactive_since: current.inactive_since ?? status.last_seen_at,
game_started_at: null,
game_ended_at: null
inactive_since: current.inactive_since ?? status.last_seen_at
};
}