Files
Enterprise-Knowledge-Base/frontend
Claude b7f9f155b3 fix(knowledge): prevent infinite scroll race condition causing missing documents
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
2026-05-16 16:55:30 +08:00
..
2025-08-05 15:08:07 +08:00
2026-05-13 15:04:15 +08:00
2026-05-13 15:04:15 +08:00
2025-08-05 15:08:07 +08:00
2025-08-05 15:08:07 +08:00
2025-08-05 15:08:07 +08:00