/**
 * Central intervals for dashboard polling. Tune here for load tests or ops.
 */
export const POLL_INTERVALS = {
  adminApplicationsList: 10_000,
  /** Slow safety-net when invalidation / report-sync might be missed */
  councilApplicationsSafetyNet: 90_000,
  notificationsUnreadCount: 60_000,
  notificationsList: 60_000,
  adminOverviewHealth: 30_000,
  adminAiHealth: 30_000,
} as const;

/** ±10% jitter to reduce aligned thundering herds across clients. */
export function applyPollJitter(ms: number): number {
  return Math.round(ms * (0.9 + Math.random() * 0.2));
}
