Open greenmotion opened 6 days ago
The issue you're experiencing with the chat session not automatically refreshing in the Langflow Playground might be related to how the frontend handles real-time updates or re-renders. Langflow uses WebSocket communication to update the chat interface in real-time. The handleWsMessage
function processes incoming WebSocket messages and updates the chat history, which should trigger re-renders of the chat interface [1].
Additionally, there is an event listener for visibility changes in the browser that resets certain states when the tab becomes visible again [2]. This might be affecting the refresh behavior you're observing.
To troubleshoot, you might want to check if the WebSocket connection is being established correctly and if the handleWsMessage
function is processing messages as expected. Also, ensure that there are no issues with the state management that could prevent the chat interface from updating in real-time.
To continue talking to Dosu, mention @dosu.
hey @greenmotion, I've tried the main branch and couldn't reproduce the issue, how are you running langflow exactly? are you using docker or something similar?
Bug Description
The chat session in the playground does not automatically refresh. I can submit a question to the chatbot and hit send, but the chat session will not show me the response, until I switch to another window and switch back and/or close playground and re-open it. In other words, it seems it only refreshes when the browser window gets refocused. Tried this on Mozilla and Brave (chrome)
Reproduction
Expected behavior
Upon hitting send, a response should automatically be displayed in the chat session.
Who can help?
No response
Operating System
Ubuntu LTS 20.24
Langflow Version
1.1.0
Python Version
3.12
Screenshot
No response
Flow File
No response