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

[Bug]: Multiple tabs going to server from the same browser re-uses the same session ID #4715

Open
1 task done
diwu-sf opened this issue Nov 3, 2024 · 4 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@diwu-sf
Copy link

diwu-sf commented Nov 3, 2024

Is there an existing issue for the same bug?

  • 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

@diwu-sf diwu-sf added the bug Something isn't working label Nov 3, 2024
@mamoodi
Copy link
Collaborator

mamoodi commented Nov 4, 2024

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?

@diwu-sf
Copy link
Author

diwu-sf commented Nov 4, 2024

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.

@mamoodi
Copy link
Collaborator

mamoodi commented Nov 4, 2024

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

@rbren
Copy link
Collaborator

rbren commented Nov 4, 2024

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... 👀

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