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

Merged
merged 4 commits into from
Jan 14, 2025
Merged

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

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

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 14, 2025

I'm testing this again. Please don't merge.

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 14, 2025

Okay this looks good now. Thank you!

@mamoodi mamoodi enabled auto-merge (squash) January 14, 2025 17:41
@mamoodi mamoodi merged commit 6b2e3f9 into main Jan 14, 2025
15 checks passed
@mamoodi mamoodi deleted the fix/runtime-setting-deselection branch January 14, 2025 17:53
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.

5 participants