AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): preserve numeric enum selections (#13147)
### Why / What / How This PR fixes SECRT-1310, where the Google Calendar Create Event block's Reminder Minutes array could render but selecting a reminder value did not update the form correctly. The problem was in the shared RJSF select widget: it passed raw enum values directly to Radix/select components. RJSF enum widgets expect the UI layer to use string option indexes, then convert those indexes back to the original enum values. String enums mostly worked by accident, but numeric enums like `10`, `30`, `60`, and `1440` did not round-trip reliably. This changes the custom select widget to use RJSF's enum conversion helpers for both select and multiselect paths, preserving numeric enum values in form data while keeping UI values string-safe. ### Changes 🏗️ - Updated `SelectWidget` to map enum values through RJSF option indexes before passing them to the UI select components. - Converted selected UI indexes back to original enum values on change, preserving numeric values like `60` instead of string values. - Added a regression test for an array of integer enum items matching the Google Calendar reminder minutes schema. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] `pnpm vitest run src/components/renderers/InputRenderer/__tests__/FormRenderer.test.tsx` - [x] `pnpm types` - [x] `npx -y react-doctor@latest . --verbose --diff` - [x] `pnpm lint` <details> <summary>Example test plan</summary> - [ ] Create from scratch and execute an agent with at least 3 blocks - [ ] Import an agent from file upload, and confirm it executes correctly - [ ] Upload agent to marketplace - [ ] Import an agent from marketplace and confirm it executes correctly - [ ] Edit an agent from monitor, and confirm it executes correctly </details> #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) No configuration changes. <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details>
A
Abhimanyu Yadav committed
2e3750b22761a6b713948cfb4c9775863bf4d299
Parent: 50c5b8b
Committed by GitHub <noreply@github.com>
on 5/18/2026, 7:35:04 AM