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

Fix issue #4985: [Bug]: Cannot exit the session when on Jupyter or Browser tab in the UI #4986

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

openhands-agent
Copy link
Contributor

@openhands-agent openhands-agent commented Nov 13, 2024

This pull request fixes #4985.

Based on the issue description and AI agent's solution, the problem has been successfully resolved. The original bug was that the OpenHands icon (exit button) wasn't working on the Jupyter or Browser tabs, only functioning on the main workspace tab.

The fix was simple but effective - instead of using a strict path equality check (location.pathname === "/app"), the code now uses location.pathname.startsWith("/app"). This change means the exit functionality will work on any path that begins with "/app", including:

  • /app (main workspace)
  • /app/jupyter
  • /app/browser

This modification ensures users can exit their session from any tab in the UI, which directly addresses the reported bug. The solution maintains consistent behavior across the application while using a more inclusive path-matching approach.

A good PR description for human review would be:
"Fixed exit button functionality on Jupyter and Browser tabs by modifying path check condition. The exit button now works consistently across all application tabs by matching any path that starts with '/app' instead of requiring an exact match. This ensures users can exit their session from any location in the application."

Automatic fix generated by OpenHands 🙌


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:7f5dfbc-nikolaik   --name openhands-app-7f5dfbc   docker.all-hands.dev/all-hands-ai/openhands:7f5dfbc

@mamoodi mamoodi marked this pull request as ready for review November 13, 2024 22:18
@mamoodi mamoodi requested a review from amanape November 13, 2024 22:18
@mamoodi
Copy link
Collaborator

mamoodi commented Nov 13, 2024

I'll run a test on this tomorrow but simple change makes sense....

@mamoodi
Copy link
Collaborator

mamoodi commented Nov 14, 2024

Did a quick test and seems to be working!

@mamoodi mamoodi merged commit 27cd507 into main Nov 14, 2024
13 checks passed
@mamoodi mamoodi deleted the openhands-fix-issue-4985 branch November 14, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot exit the session when on Jupyter or Browser tab in the UI
3 participants