open-webui / open-webui

User-friendly WebUI for LLMs (Formerly Ollama WebUI)
https://openwebui.com
MIT License
39.31k stars 4.59k forks source link

feat (ux): Focus on latest message when opening an existing chat #957

Closed incyclum closed 6 months ago

incyclum commented 6 months ago

Is your feature request related to a problem? Please describe.

Just noticed another small improvement that could be implemented, after updating to see the amazing prompt autofocus from #936 🎉❤️...

When I open an existing chat conversation, I have to scroll down to the latest message, which is kinda annoying when you're continuing a recent conversation.

And I noticed this because now having the prompt autofocus emphasized that seeing a blinking cursor waiting for you to type but being at the top of the conversation thread doesn't makes much sense. Imagine opening your WhatsApp chats and being at the top...

Compared to ChatGPT UI where the chat is already focused on the latest message.

Describe the solution you'd like

Like on ChatGPT, focus on latest message of a chat, so user don't have to scroll down.

Describe alternatives you've considered

When going back and forth between chats in the same work session (in the same Open WebUI tab session), It may be more useful to stay where the user left instead of latest message.

E.g:

  1. Leave "Chat A" somewhere in the middle, e.g. you're reading message 30/50
  2. Create a new "Chat B", type right away in the prompt thanks to autofocus :D
  3. Go back to "Chat A", instead of being on the latest message (or 1st one) you could stay at 30/50

BUT if I close the tab, log-out, enter a new session, I think opening "Chat A" the next day or so makes more sense focusing on latest message.

Open to discussion or any other ideas :)

Thanks!

incyclum commented 6 months ago

Well-visible "Scroll to top" / "Scroll to bottom" action buttons could be also a nice option to crack the problem! (I know hitting the edges of browser's native scrollbar can emulate this behavior but you have to think about this possibility in the first place and I guess most users don't. Especially on OSX where the scrollbar hides itself after a few seconds).

jannikstdl commented 6 months ago

I could implement a function to scroll to the bottom whenever you open a new chat like chatgpt does.

It is basically a oneliner.

incyclum commented 6 months ago

Yeah, I believe it's already a good thing doing so.

incyclum commented 6 months ago

Also realized that regarding my comment,

When going back and forth between chats in the same work session (in the same Open WebUI tab session), It may be more useful to stay where the user left instead of latest message.

Opening the chats in different tabs does the job when you work on multiple ones at the same time.

Having the chat title in tab name "My Chat | Open WebUI" instead of currently "Open WebUI" could also improve the experience.

incyclum commented 6 months ago

Awesome! Thanks!