feat(console): let a new agent be given a display name - #342
Merged
raullopez-sandbox merged 1 commit intoSep 4, 2026
Merged
Conversation
The new-agent form only ever asked for the identifier, so an agent that wanted to appear as "Switch Dev" on Discord had no way to say so — the lowercase routing name was the only name it had. Add an optional Display name field beside it, plumbed through the gateway client the same way icon_url already is: nullable, presentation-only, and never consulted for routing. When the identifier charset rejects what was typed and the slug offer is accepted, the typed text becomes the display name rather than being discarded — it is a perfectly good human name, just not a valid identifier. A display name the user wrote themselves is left alone, including one they deliberately cleared: emptying the field is the answer "show this agent under its identifier", not an absence to be filled in. Also pass the gateway's own error detail through to the rejection banner. GatewayError.message is prefixed with the raw status line, which reads as noise in a form; detail is the sentence the server actually wrote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
raullopez-sandbox
requested review from
amaudruz and
christian-mcdermott
as code owners
September 2, 2026 09:52
raullopez-sandbox
changed the base branch from
main
to
feat/display-name-03-teams-telegram
September 4, 2026 08:57
raullopez-sandbox
merged commit Sep 4, 2026
62436e1
into
feat/display-name-03-teams-telegram
9 of 10 checks passed
raullopez-sandbox
added a commit
that referenced
this pull request
Sep 4, 2026
Merging feat/display-name-04-setting-ui into this branch duplicated the display_name/displayName field this branch had already added, in the same object literals and type declarations. oxlint's no-dupe-keys rule and tsgo both catch it; this keeps one copy of each. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QzHQbV17dWpVzYwpNv2DH
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.
Fourth and last piece of the display-name work: the setting itself. The
column landed in #326 and the bridges learned to render it in #330 and
#338 — until now nothing in the product could actually set it.
What changes
The new-agent form gets an optional Display name field beside Name,
plumbed through the gateway client exactly the way
icon_urlalready is:nullable, presentation-only, never consulted for routing.
agents.namestays the lowercase identifier that rooms, sessions and the command
palette key off;
display_nameis only ever shown.Two behaviours worth calling out, both covered by tests:
Switch Devinto Name, the charset rejects it, you click Use switch-dev — the
identifier becomes
switch-devandSwitch Devmoves into Displayname. It is a perfectly good human name, just not a valid identifier,
so it should not be thrown away.
deliberately cleared. Emptying the field is the answer "show this agent
under its identifier", not an absence to be filled in. This is the
autoApproveTouchedidiom already used elsewhere in the form; a falsycheck on the value alone passes every other test and fails that one.
Also passes the gateway's own error
detailthrough to the rejectionbanner.
GatewayError.messageis prefixed with the raw status line,which its own doc comment says "reads as noise in a form" —
detailisthe sentence the server actually wrote.
Base
This targets
main, not #338. It is Console TypeScript and its realprerequisites — the
display_namecolumn (#326) and the slug-suggestionform (#325) — are both already merged. It shares no files with the bridge
PRs, so stacking it on them would only couple its CI to theirs.
Verification
Format, lint and typecheck clean. Browser 178/178, node 2999/3000 (the
one failure is a pre-existing
/varvs/private/varmacOS path test insession-spawner.test.ts, untouched here and green on Linux CI),connector-assets10/10.The form was also recorded end-to-end driving the real
AgentIdentityFieldscomponent anduseConfigureAgentFormhook, withPlaywright reading the resulting input values back off the page:
switch-dev/Switch Dev, thenswitch-dev/Release Captain.🤖 Generated with Claude Code