[Bug]: Multiple tabs going to server from the same browser re-uses the same session ID
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Describe the bug and reproduction steps
The session is stored in local storage, so if a second tab is opened to http://localhost:3000/app while a session already is running, the websockets start sending data to the new tab and the old tab is broken.
Overall, it's just an awful experience and the app only really works if there's a single tab active.
OpenHands Installation
Docker command in README
OpenHands Version
No response
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
Hmmm yeah you cannot have multiple conversations going. There are issues open to allow that. Wondering if this is a bug or an enhancement request.
When you open the second tab, does it have all the conversation context and you can see the full chat? Or does it start from the beginning?
It actually doesn't, that's why I thought it would be a bug, since my expectation would be:
- either it grab the full chat conversation from the previous on every tab, and every tab is able to the same eventstream and UI state is the same
- OR, each tab is a new session, independent of each other (different SID on the backend)
What I observe instead is that the tabs share the same SID (due to localstorage i think) but they don't load up the same conversation, and often the tabs just show blank. If the tabs all end up showing and streaming from the same SID that'd be an okay behavior until multi-session is in-place.
I also think it's cleaner if it wasn't using local-storage for SID persistence and instead just go off of a query-param, which would make it clear what session is loaded / connected in each tab.
Hmmmm yeah this is going to be tricky. I just tried this and I get a weird behavior. It retained the history and context but it didn't keep the workspace and only the new tab works. Yeah we should rethink this. CC @rbren , @amanape
Hmm multi-conversation support is on our roadmap for sure, but explicitly not supported today
That said, you should be able to view the same conversation in multiple tabs... 👀
This is fixed in the latest release