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 #5817: [Bug]: When websocket disconnects, status bar says "Agent is Stopped", even if the agent is still running #5819

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

openhands-agent
Copy link
Contributor

@openhands-agent openhands-agent commented Dec 26, 2024

This pull request fixes #5817.

The issue has been successfully resolved. The AI implemented a complete solution that directly addresses the core problem where the frontend incorrectly showed "agent has stopped" when the websocket disconnected.

Key changes made:

  1. Added a proper DISCONNECTED state to handle websocket disconnections
  2. Implemented appropriate UI feedback with "Disconnected, trying to reconnect..." message
  3. Added visual indication (orange warning state) to show connection issues
  4. Fixed the state management to properly track disconnected vs stopped states
  5. Added test coverage to verify the behavior

The solution is comprehensive as it:

  • Fixes the incorrect status message
  • Provides clear user feedback about connection state
  • Maintains accurate state tracking
  • Includes proper internationalization support
  • Has test coverage to prevent regression

This can be confidently sent to review as it addresses all aspects of the original issue while maintaining good software engineering practices (testing, i18n, proper state management).

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:15b4513-nikolaik   --name openhands-app-15b4513   docker.all-hands.dev/all-hands-ai/openhands:15b4513

…Agent is Stopped", even if the agent is still running
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]: When websocket disconnects, status bar says "Agent is Stopped", even if the agent is still running
1 participant