Both useChat (full ChatView) and useQuickChat (FAB) loaded only the first 50 messages on open and never paginated further. In useChat, loadMoreMessages exists but ChatView never calls it — dead code. In useQuickChat, there was no pagination at all. Fix: add fetchAllMessagesInChat / fetchAllMessages helpers (paginate through the API 200-msg cap), replace all limit:50 initial-load call sites, and add stale-session guards via activeSessionRef before calling setMessages. hasMoreMessages is set to false after a full initial load. Forward-pagination path in useChat (isPaginationRequest=true) is preserved for backward compat.
43 KiB
43 KiB