"Load more messages": don't force the user to click more than once
in progress
A
Andrey
Problem:
- Every click on "Load more messages" takes refresh time and reveals only a few messages.
- Every next click to see next portion messes up scrolling position and takes additional waiting time. Let's say in a conversation of 20 messages, I have to wait several times, and my scroll position gets messed up several times. If I want to take a look at another chat - I have to repeat this "click - mess up" loop several times again, what overall is pretty distracting and counterproductive.
What if:
- We assume that the user who clicks "Load more messages" once wants to explore the full history of this chat (has particular interest in this conversation), so we expand all messages? Wait once, mess up scroll once, suffer, but then it's fine, good to go.
- We allow the user to have all messages loaded for this chat until he restarts BoltAI?
In theory:
- One full open chat should not create too much stress on the memory and performance, so we could let this happen for a win in user experience.
- We could add a guardrail — If the user expands more than 5..10 chats, then with the next one - the first one will be collapsed to prevent performance degradation.
Daniel Nguyen
in progress
I don't think load all messages is a good idea. I've tested a few scenarios and loading all, potentially 100 messages, are indeed bad for the performance.
I've changed the behavior a little bit and I quite like it. LMK what you think:
- First, it loads just 10 messages and show a "Load more messages" on top
- Once clicked, it load 10 or 20 more messages.
- After this, when you scroll to top, it automatically load more messages. Similarly to the chat list sidebar.
The tricky part is maintaining scroll position. I haven't found a good solution for this yet. I might need to rewrite the underlying UI component, which will take a lot more time.