@ -87,36 +93,51 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@@ -87,36 +93,51 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@ -136,7 +157,11 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@@ -136,7 +157,11 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
for(constkofkeys){
constrow=snapshot.get(k)
if(!row)continue
if(row.status==='loaded'&&row.event)continue
// Auto-queue should only process idle rows.
// - loaded rows are done
// - loading rows are already in-flight
// - error rows require explicit retry via retry button
if(row.status!=='idle')continue
refsToLoad.push(row.ref)
}
@ -202,6 +227,25 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@@ -202,6 +227,25 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@ -249,7 +293,9 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@@ -249,7 +293,9 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
flushInFlightRef.current=false
// While a batch was in flight, debounced runFlush() calls may have returned early
// (flush lock). Drain any keys that accumulated so scroll-triggered sections still load.
if(pendingRef.current.size>0){
// IMPORTANT: if relay URLs are not ready yet, do NOT spin in a tight retry loop.
// The relayReady effect will trigger requestKeys() once relays are available.
@ -277,7 +323,7 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
@@ -277,7 +323,7 @@ export function usePublicationSectionLoader(indexEvent: Event, referencesData: P
if(!relayReady||orderedKeys.length===0)return
// Full list: scroll-IO may have fired before relays were ready; those keys were re-queued idle.