b7f9f155b3
The knowledge base file list infinite scroll had a race condition: - page++ executed before the condition check, causing page numbers to be skipped when scroll events fired rapidly - No loading guard meant concurrent API requests could overlap, with later responses overwriting earlier ones This caused documents to not load when scrolling to the bottom of the file list, especially noticeable with 100+ files where only the first page would reliably appear. Changes: - Add scrollLoading flag to prevent concurrent scroll-triggered fetches - Move page++ inside the condition check (was unconditional before) - Use resetPage() helper to consistently reset both page and loading state - Change scroll trigger threshold from >= scrollHeight to >= scrollHeight - 10 for better trigger sensitivity