diff --git a/apps/client/lib/src/widgets/chat_panel/chat_message_list.dart b/apps/client/lib/src/widgets/chat_panel/chat_message_list.dart index 036bbc2d..b6ec5035 100644 --- a/apps/client/lib/src/widgets/chat_panel/chat_message_list.dart +++ b/apps/client/lib/src/widgets/chat_panel/chat_message_list.dart @@ -252,6 +252,12 @@ class ChatMessageList extends ConsumerWidget { child: ListView.builder( controller: scrollController, padding: const EdgeInsets.only(bottom: 16), + // Pre-build ~one viewport of off-screen messages on each side so that + // momentum scrolling doesn't flash blank space while items mount. The + // Flutter default of 250 is too tight for chat where rows include + // images, reactions, and reply quotes that each take a frame to lay + // out. Tuned conservatively to keep memory in check on long histories. + cacheExtent: 600, itemCount: messages.length + 1, itemBuilder: (context, index) { if (index == 0) {