public uptime monitoring + (soon) observability with events saved to PDS

stop early if new batch is smaller than batch size (probably fetched all that we could

Changed files
+8
web
src
+8
web/src/lib/atproto.ts
···
/**
* fetches up to 2000 uptime check records using cursor pagination with progress callback
+
* stops early if no more records are available
*
* @param pds the PDS URL
* @param did the DID or handle to fetch records for
···
if (onProgress) {
onProgress(allRecords);
}
+
+
// Stop early if we got fewer records than the batch size (indicating we've exhausted all records)
+
// or if no cursor is returned (also indicating no more records)
+
if (newRecords.length < batchSize || !cursor) {
+
break;
+
}
+
} while (cursor && totalFetched < maxRecords);
return allRecords;