Lowercase agent names as you type in the register dialog - #324
Merged
Conversation
Instead of rejecting uppercase characters after submission, the register-agent dialog now lowercases the name as the user types, matching the server's requirement silently.
abeldantas
requested review from
amaudruz and
christian-mcdermott
as code owners
August 31, 2026 16:34
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Switch Gateway “Register Agent” dialog to normalize agent names to lowercase at input time, improving UX by preventing uppercase characters from being submitted and rejected later.
Changes:
- Lowercase the agent name as the user types in the registration dialog.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Full Unicode toLowerCase() can change string length for some characters (e.g. dotted İ → "i̇") and cause input glitches. Agent names are ASCII-only per the backend validator, so only downcase A-Z.
The Console's add-agent modal was the original surface where uppercase names caused validation friction. Apply the same ASCII-only lowercasing as the gateway's RegisterAgentDialog so both dialogs behave the same.
amaudruz
approved these changes
Aug 31, 2026
…name # Conflicts: # console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/configure-agent-panel.tsx
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.
Summary
toLowerCase(), since agent names are ASCII-only per the backend validator.The Console dialog was the original surface that motivated this — uppercase names were accepted as typed but rejected on submit. The gateway dialog was a sibling surface with the same gap.
Test plan
npx tsc --noEmit).