Skip to main content

Interface: SitesState

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

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:204

Latest database backup metadata for UI display and diagnostics.


lastSyncDeltaโ€‹

lastSyncDelta:
| SiteSyncDelta
| undefined;

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

Most recent synchronization delta captured from state sync events.


optimisticMonitoringLocksโ€‹

optimisticMonitoringLocks: Partial<Record<string, OptimisticMonitoringLock>>;

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

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:215

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


selectedSiteIdentifierโ€‹

selectedSiteIdentifier: string | undefined;

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

Currently selected site identifier


sitesโ€‹

sites: Site[];

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

Array of monitored sites


sitesRevisionโ€‹

sitesRevision: number;

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

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:230

Latest status update subscription diagnostics.