{error}
} - {records.length === 0 && !loading && !error && ( + {/* Only claim the collection is empty once we've actually exhausted it + (done). While records is empty but more pages remain — the initial + load, or the gap after a delete clears the page before the auto-fetch + refills it — keep showing "Loading" so we never flash a false empty + state. */} + {records.length === 0 && done && !error && (No records in this collection.
)} - {loading && records.length === 0 && ( + {records.length === 0 && !done && !error && (Loading records…
)} @@ -938,30 +982,6 @@ function CollectionList({ ); })} - - {!done && records.length > 0 && ( - - )}