Repository navigation
Let whoever manages a Bot change its Agent URL on Setup - #1899
Open
davidmckayv wants to merge 2 commits into
Open
davidmckayv wants to merge 2 commits into
davidmckayv wants to merge 2 commits into
Conversation
The Agent URL row on a Bot's Setup page was a plain value: nobody could move a Bot to a new address without deleting it and making it again, though the page says it edits the Bot's runtime settings and the update API already took a new endpoint. The row now opens the same dialog as the Identity rows, for whoever manages a Bot that runs at an address of its own. The address is checked for shape before it is sent, and the server's refusal (an address the deployment won't reach, say) shows under the field, which is marked invalid while it does. Saving the same address back sends nothing. The row stays read-only for anyone who can't manage the Bot, and a built-in Bot is unchanged. Every other edit on Setup stops sending the stored address. The route checks any endpoint it is sent as one somebody typed, so a Bot saved at an address the deployment's rules have since closed could not be renamed. An empty endpoint leaves the stored one as it is.
The dialog body scrolls, so it clipped the top and bottom of the field's focus ring and of the red ring an error gives it. The body has 4px of padding above and below, and its margins are 4px less, so the gaps stay as they were.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 19, 2026 21:37
This branch has not been deployed
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.
What
A Bot that runs at an address of its own showed its Agent URL on Setup as a plain value, with no way to change it. The page says it edits the Bot's runtime settings, and the update API already takes a new endpoint, so only the screen was missing. Moving a Bot to a new address meant deleting it and making it again.
The Agent URL row now has a chevron and opens the same dialog as the Identity rows above it. This applies to whoever manages a Bot that runs at its own address.
http://orhttps://web address, the same check the New Bot sheet uses (agentFormSchema.shape.endpoint). An empty field is refused too: an empty endpoint on a change leaves the stored one as it is, so saving one would look done and change nothing.aria-invalidand described by that sentence, it gets focus again, and the dialog stays open with what was typed.The stored address no longer rides along on other edits
Before this, every other Setup edit (name, title, what it does, visibility, Isolated) sent the Bot's stored endpoint back in the full update body. The route checks any endpoint it is sent as one somebody typed, using the deployment's rules as they are today. So a Bot saved at an address the rules have since closed could not be renamed. That is the case
profileUpdateInput's comment already described for a built-in Bot's managed address.profileUpdateInputnow sends an empty endpoint unless the patch changes it. Per the spec (BotEndpoint), empty on a change leaves the stored address as it is.The dialog body scrolls, so it was clipping the top and bottom of the field's focus ring, and now of the red ring an error adds. Every Identity dialog had this too. The body now has 4px of padding above and below, and its margins are 4px smaller, so the spacing is the same as before.
Best practice
aria-invalidandaria-describedbyonly while the error shows, so a screen reader reads the error with the field. Remove both once the field is valid (Chrome guidance, Mass.gov).Tests
app/tests/bot-setup-agent-url.test.tsxdraws the Setup sections from the Bot the server returns. It serves them the spec's generated MSW handlers at the API's addresses: the PATCH keeps what it was sent, and the GET returns it. A private address is refused with the server's own problem details and sentence. The tests:On main, 1 to 4 fail (there is no Agent URL button) and 6 fails (the rename sends the stored address and is refused). 5 passes on main and stays as a guard. With the change, all 6 pass. The full app suite passes: 4335 pass, 339 skip, 0 fail. The app typechecks, and biome and the copy guard tests pass.
In the real product
I ran OpenBot from this branch against a local backend at the current RC, with two small AG-UI agents on 127.0.0.1:4801 and :4802. The deployment's allowed hosts named only those two. I created "Sales Assistant" at :4801.
In headless Chromium and headless WebKit, in light and dark:
"endpoint":"http://127.0.0.1:4802/ag-ui", and after a reload the server returned :4802.agents.example.com/ag-uiwas refused before sending.Setup before, Chromium light, and after, WebKit dark:
The dialog with the new address, and the server's refusal (Chromium light, WebKit dark):
Not a web address (Chromium dark, WebKit light), and the Bot answering from its new address: