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: prevent runtime size deselection #6119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Jan 7, 2025

Description

Fixes an issue where users could deselect the runtime setting (1x) in the frontend settings, which should not be possible.

Changes

  • Added selectionMode="single" to ensure only one option can be selected
  • Added isRequired={true} to prevent deselection of the value

Testing

  • Verified that runtime setting cannot be deselected
  • All frontend tests pass
  • Frontend builds successfully

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

@xingyaoww xingyaoww requested review from neubig and rbren January 7, 2025 16:20
@xingyaoww xingyaoww requested a review from mamoodi January 7, 2025 16:24
@mamoodi
Copy link
Collaborator

mamoodi commented Jan 7, 2025

It sort of works? It still allows deselection but at least now it gives you a warning that something needs to be set.

Screenshot 2025-01-07 at 11 44 59 AM

@xingyaoww
Copy link
Collaborator Author

@mamoodi how about now

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 7, 2025

Something is off here. With this change, when I Save advanced settings, and then reopen settings, it goes back to the basic settings. Really weird.
Let's hold off on this because it's not critical.

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.

4 participants