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

feat: add browser control toggle in FE UI settings #4856

Closed
wants to merge 7 commits into from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Nov 9, 2024

Let me help you complete the PR template:

End-user friendly description of the problem this fixes or functionality that this introduces

This change adds a browser control toggle in the settings panel under advanced options.

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

  • Added a new browser control toggle in Settings > Advanced Options

  • Browser control is now disabled by default and must be explicitly enabled

  • This gives users more control over the AI assistant's capabilities


Give a summary of what the PR does, explaining any non-trivial design decisions

This PR adds a browser control toggle in the settings panel that allows users to enable/disable the AI assistant's ability to control web browsers. Key implementation details:

  1. Added ENABLE_BROWSING setting to both frontend and backend
  2. Made browser control disabled by default for security reasons
  3. Added the toggle under advanced options in the settings form
  4. When disabled, the setting is passed to the agent config as codeact_enable_browsing=False
  5. Updated test cases to include the new setting

Design decisions:

  • Placed under advanced options since it's a power user feature
  • Default to disabled for security (principle of least privilege)
  • Reused existing settings infrastructure for consistency
  • Made the setting persistent across sessions

Link of any specific issues this addresses


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

- Add ENABLE_BROWSING setting to control browser functionality
- Update agent config to use the browser toggle setting
- Update session initialization to handle browser toggle
- Add ENABLE_BROWSING to Settings type
- Add browser control toggle to settings form
- Update settings route to handle browser toggle
- Change default value of ENABLE_BROWSING to false in frontend settings
- Change default value of codeact_enable_browsing to false in agent config
- Update session initialization to default to disabled browsing
- Move browser control toggle from settings form to browser tab
- Add toggle in browser tab header next to URL
- Keep same functionality but improve discoverability
@mamoodi
Copy link
Collaborator

mamoodi commented Nov 25, 2024

Another gentle ping @xingyaoww just in case this fell of the radar and needs some eyes.

@mamoodi
Copy link
Collaborator

mamoodi commented Dec 2, 2024

Closing this. Please reopen if you think this was a mistake.

@mamoodi mamoodi closed this Dec 2, 2024
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.

3 participants