Skip to main content

Interface: SitesState

Defined in: src/stores/sites/useSitesState.ts:92

Sites state interface for managing site data and selection.

Remarksโ€‹

Defines the core state structure for site management including the sites array, selected site tracking, and UI state for monitor selection.

Propertiesโ€‹

lastBackupMetadataโ€‹

lastBackupMetadata: SerializedDatabaseBackupMetadata | undefined

Defined in: src/stores/sites/useSitesState.ts:94

Latest database backup metadata for UI display and diagnostics.


lastSyncDeltaโ€‹

lastSyncDelta: SiteSyncDelta | undefined

Defined in: src/stores/sites/useSitesState.ts:96

Most recent synchronization delta captured from state sync events.


optimisticMonitoringLocksโ€‹

optimisticMonitoringLocks: Partial<Record<string, OptimisticMonitoringLock>>

Defined in: src/stores/sites/useSitesState.ts:101

Active optimistic monitoring locks for monitors keyed by site and monitor id.


selectedMonitorIdsโ€‹

selectedMonitorIds: Partial<Record<Site["identifier"], Monitor["id"]>>

Defined in: src/stores/sites/useSitesState.ts:105

Selected monitor IDs per site (UI state, not persisted)


selectedSiteIdentifierโ€‹

selectedSiteIdentifier: string | undefined

Defined in: src/stores/sites/useSitesState.ts:107

Currently selected site identifier


sitesโ€‹

sites: Site[]

Defined in: src/stores/sites/useSitesState.ts:109

Array of monitored sites


sitesRevisionโ€‹

sitesRevision: number

Defined in: src/stores/sites/useSitesState.ts:118

Monotonic counter incremented whenever the sites collection changes.

Remarksโ€‹

Used to detect and prevent stale full-sync responses from overwriting newer local mutations (e.g., user creates a site while an initial sync is still in-flight).


statusSubscriptionSummaryโ€‹

statusSubscriptionSummary: StatusUpdateSubscriptionSummary | undefined

Defined in: src/stores/sites/useSitesState.ts:120

Latest status update subscription diagnostics.