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

Chat Settings Button disappears when Resuming Chat #1391

Open
hadarsharon opened this issue Oct 2, 2024 · 1 comment
Open

Chat Settings Button disappears when Resuming Chat #1391

hadarsharon opened this issue Oct 2, 2024 · 1 comment
Labels
bug Something isn't working data layer Pertains to data layers. needs-triage

Comments

@hadarsharon
Copy link

hadarsharon commented Oct 2, 2024

Describe the bug
When ChatSettings are defined in the application, they appear fine and usable upon a chat/thread instantiation, and are active and visible for the duration of the chat.

However when using Data Persistence (in my case I am using SQLAlchemyDataLayer), the chat settings button is not visible anymore once the chat is resumed (Resume Chat button).

This is a limitation that impairs the user experience when the thread is not the initial/active thread, and while it might be a feature rather than a bug, I think the settings should always be accessible.

FWIW, the settings are persisted from their last state (not sure if last state for that thread or last state in general), which might be even more confusing for certain use cases.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Data Persistence in your Chainlit application
  2. Define ChatSettings for your application to enable the settings button in the UI
  3. Create a new chat and send a message - note that the settings option should be available on the left side of the input bar
  4. Create another chat, send another message if you will - the settings option should just as well be available like before
  5. Go back to the chat from step 2 - now the chat settings button should not be visible, and you basically have no access to settings anymore in this chat.

Expected behavior
The Chat Settings button should be visible and accessible in the input bar at all times.

Screenshots
Fresh start without chat history (note settings button is visible to the left):

image

After sending a message in the same thread:

image

After moving to a new chat and returning to the same thread:

image

Clicking Resume Chat - then the chat settings button is no longer there:

image

¯_(ツ)_/¯

Desktop (please complete the following information):

  • OS: iOS
  • Browser Chrome
  • Version Chainlit 1.2.0
Copy link

dosubot bot commented Oct 2, 2024

The issue you're experiencing with the Chat Settings button disappearing when resuming a chat using data persistence, such as with SQLAlchemyDataLayer, seems to be a known limitation. The Chat Settings button should ideally remain visible and accessible at all times, even when resuming a chat. However, it appears that the current implementation does not support this behavior, which can indeed impair the user experience.

The settings are persisted from their last state, which might add to the confusion if the button is not visible upon resuming a chat. This behavior might be due to how the UI state is managed when a chat is resumed, possibly not reinitializing the visibility of certain UI components like the Chat Settings button.

To address this, you might need to look into how the UI state is restored during the chat resumption process and ensure that the Chat Settings button is explicitly set to be visible. This could involve modifying the logic that handles UI state restoration to include the visibility of the Chat Settings button.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added bug Something isn't working data layer Pertains to data layers. labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data layer Pertains to data layers. needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant