Repository navigation
Replace robot type free-text input with searchable combo box - #1
Merged
Merged
Conversation
mark-takada-airoa
force-pushed
the
feat/robot-type-combo-box
branch
from
June 5, 2026 06:00
088cbf4 to
2e44f14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The
robot_typefield was previously a free-text input, which allowed arbitrary values likeModel-X1and made it hard to keep robot identification consistent across the platform. We now want to constrain it to the two supported models (yubi-stationary,yubi-portable).Overview
Replaced the robot type free-text
Inputwith aSearchableSelecton both the create and edit robot forms, backed by a typedROBOT_TYPEconstant and localized labels. The field is required on submit. Seed data and API docs were updated to match.Technical changes
frontend/src/shared/lib/status-constants.ts: addedROBOT_TYPEconstant andRobotTypeValuetype (yubi-stationary/yubi-portable).frontend/src/shared/hooks/use-status-labels.ts: addeduseRobotTypeLabelhook returning localized labels.frontend/src/features/robots/components/create-robot-form.tsx: swapped input forSearchableSelect; default value is nowROBOT_TYPE.YUBI_STATIONARY; the form schema enforcesrobot_typeas a requiredz.enum.frontend/src/features/robots/components/edit-robot-form.tsx: same UI swap; if the existingrobot_typeis not one of the known values, the field initializes empty and the requiredz.enumvalidation blocks submit with a "Robot type is required" error until a valid value is picked.frontend/src/shared/lib/locales/{en,ja}/translation.json: removedrobotTypePlaceholder; addedrobotTypeYubiStationary,robotTypeYubiPortable,selectRobotType,robotTypeRequired.backend/internal/database/seeder/initial_data.sql&docs/robot-api-guide.md: updated samplerobot_typefromModel-X1toyubi-stationary.frontend/src/lib/api/generated/api.ts: regenerated schema picks up new optionalsite_id/site_namefields onRobot(incidental regeneration).UI changes
Manual verification
Expand verification steps
robot_type: "yubi-stationary".robot_typeis one ofyubi-stationary/yubi-portableand confirm it is preselected.🤖 Generated with Claude Code