-
Notifications
You must be signed in to change notification settings - Fork 22
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
Welcome Modal is not shown #336
Comments
Same. And I thought this happened, because we never got around to implement it. Thanks for reporting that we actually have the code, but it is broken 😇
Agreed. I think this is my fault. My previous understanding was that
Let's ask @smeragoel here.
I don't think this was the intention. IIRC, we wanted to show it every time there are no chats open. Right now this means only for a first time user, but after we fix #304, this can also happen when a user deletes all open chats. @smeragoel do you remember the details here? |
The idea of the modal was to provide a "landing page" of sorts when the user starts the app, instead of the chat config modal directly. A solution I see to reduce the number of clicks would be to move this from a modal format, to on-screen text, so that the user doesn't have to dismiss the modal to start a new chat. And you would still have a "landing page" that can always be used to provide info, updates etc. Wdyt? |
So if there are no chats open, we have static text where usually the chat interface is? |
Yep, we still have the left panel, and static text on the right side, where the chat usually is, without the input field. |
Bug description
I have never seen the Welcome Modal in the UI. While it may be technically possible, I think that in practice it is not possible.
The relevant section of code is in
main_page.py
:self.chats
is initialised asNone
. It is subsequently populated by a JSON structure byself.refresh_data()
. However,self.refresh_data()
is scheduled as a background task (asyncio.ensure_future
) and is unlikely (impossible?) to complete before hitting the if-block of code that determines whether to show the welcome modal. Hence the welcome modal logic will never be shown.How to reproduce the bug?
Open the UI!
Versions and dependencies used
Affects all versions.
Anything else?
My favoured proposal would be to remove the welcome modal entirely.
If this is not desired, it becomes a bit more complicated.
The welcome modal should only be shown the first time that someone uses
ragna
. I consider it quite a bad/annoying UX otherwise - it's just another button to click to close something and is frustrating.The question is then: how does
ragna
determine a first-time user? At the moment, the only clear way is to call the/get_chats
endpoint and determine the length of the chat history (a length of 0 means new user). To show the welcome modal, the application would need to wait for a response from this endpoint before showing themain_page
(at the moment the application does not wait for a response, it just schedules it as a future task). However, waiting for a response in this way might introduce a performance issue if/get_chats
returns something large, or if the API is slow for some reason, so I'm not sure if this is a good idea.Another solution is to introduce a new endpoint to the API that checks whether a user already exists in the DB (so, it doesn't return the entire user history, just a boolean indicating a if the user exists). This should not create the same performance issues, but it does mean that we now need to support a new endpoint. (Which is fine, but is it really worth it?)
Another partial solution is to call the welcome modal anytime a user needs to authenticate. It's not great, as it's not only first-time users who have to authenticate, but it does reduce the frequency of the welcome modal pop-up.
The text was updated successfully, but these errors were encountered: