Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unnecessary scrolling to bottom while streaming a response #34

Open
struanb opened this issue Feb 3, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@struanb
Copy link
Contributor

struanb commented Feb 3, 2024

When Prompta is streaming a long response, it is currently necessary to wait until the whole response has been streamed before one can begin reading from the top as, despite manually scrolling to the top, the client repeatedly scrolls back down to the bottom with each additional piece of response added.

This is not a show-stopper at all, but it is mildly frustrating as one has to wait until the response is finished before one can start reading (and knowing that one's reading speed is much slower than the speed at which the response is being written, this shouldn't be a problem.

Please arrange that, once the user has manually scrolled up from the bottom, the client will not reset the scroll position as the response is being streamed. This behaviour would be consistent with e.g. Mac OS Terminal.

@iansinnott iansinnott added the bug Something isn't working label Feb 4, 2024
@iansinnott
Copy link
Owner

Must be a bug. I added this when first creating prompta but haven't revisited in a while. it also never worked very well (at all?) on mobile safari if I remember correctly. The code in question uses this function:

const scrollToBottom = () => {

@struanb
Copy link
Contributor Author

struanb commented Feb 4, 2024

Sorry, should have made clear I'm experiencing this on iOS PWA.

@jacksongoode
Copy link

There's definitely a bug. Seeing jumps up and down when code is written.

@iansinnott
Copy link
Owner

@jacksongoode what platform / os are you on?

@jacksongoode
Copy link

macOS 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants