Skip to content

feat(console): let a new agent be given a display name - #342

Merged
raullopez-sandbox merged 1 commit into
feat/display-name-03-teams-telegramfrom
feat/display-name-04-setting-ui
Sep 4, 2026
Merged

feat(console): let a new agent be given a display name#342
raullopez-sandbox merged 1 commit into
feat/display-name-03-teams-telegramfrom
feat/display-name-04-setting-ui

Conversation

@raullopez-sandbox

Copy link
Copy Markdown
Collaborator

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_url already is:
nullable, presentation-only, never consulted for routing. agents.name
stays the lowercase identifier that rooms, sessions and the command
palette key off; display_name is only ever shown.

Two behaviours worth calling out, both covered by tests:

  • Accepting the slug offer keeps what you typed. Type Switch Dev
    into Name, the charset rejects it, you click Use switch-dev — the
    identifier becomes switch-dev and Switch Dev moves into Display
    name. It is a perfectly good human name, just not a valid identifier,
    so it should not be thrown away.
  • A display name you wrote yourself is left alone — including one you
    deliberately cleared. Emptying the field is the answer "show this agent
    under its identifier", not an absence to be filled in. This is the
    autoApproveTouched idiom already used elsewhere in the form; a falsy
    check on the value alone passes every other test and fails that one.

Also passes the gateway's own error detail through to the rejection
banner. GatewayError.message is prefixed with the raw status line,
which its own doc comment says "reads as noise in a form" — detail is
the sentence the server actually wrote.

Base

This targets main, not #338. It is Console TypeScript and its real
prerequisites — the display_name column (#326) and the slug-suggestion
form (#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 /var vs /private/var macOS path test in
session-spawner.test.ts, untouched here and green on Linux CI),
connector-assets 10/10.

The form was also recorded end-to-end driving the real
AgentIdentityFields component and useConfigureAgentForm hook, with
Playwright reading the resulting input values back off the page:
switch-dev / Switch Dev, then switch-dev / Release Captain.

🤖 Generated with Claude Code

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
raullopez-sandbox changed the base branch from main to feat/display-name-03-teams-telegram September 4, 2026 08:57
@raullopez-sandbox
raullopez-sandbox merged commit 62436e1 into feat/display-name-03-teams-telegram Sep 4, 2026
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
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.

1 participant