Repository navigation
fix(agents): mark the agent name as required - #1236
Closed
ngthuydiem wants to merge 1 commit into
Closed
ngthuydiem wants to merge 1 commit into
ngthuydiem wants to merge 1 commit into
Conversation
Mark the empty agent name with an asterisk and a "Required" description, and keep the disabled Create agent button hoverable and focusable so its "Add a name first" tooltip explains why it is unavailable. Co-authored-by: Otter-Opus <72c1a2fb33d700987f1e778749662d6fc95cf78e979f43e5039baa76dc2588aa@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diem Nguyen <diem@squareup.com>
Contributor
Author
|
🤖 Evidence at The rendered empty, hover-tooltip, and named states are in the PR description's screenshots. |
Contributor
Author
|
alternative for #1232. Closing to go with the visual in 1232 for now. |
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
Alternative to #1232, implementing the second design ("B · Required marker") from the Buzz thread, with the hover hint baxen suggested on #1232.
The Create agent button stays disabled until the agent has a name, but the dialog never says so. This marks the name as required and explains the disabled button on hover:
AgentCreateHeader.tsx: while the name is empty, a red asterisk follows the centered "Agent name" placeholder and the field'sFielddescription reads "Required". The input isaria-required, and the description is linked through Base UI'saria-describedby. The asterisk is anaria-hiddenoverlay that repeats the placeholder in transparenttext-titletext, so it lands just past the placeholder's centered text without measuring anything.AgentCreateDialog.tsx: the button is wrapped in the sharedTooltip("Add a name first") and usesfocusableWhenDisabledwhile the name is empty. A natively disabled button gets no pointer or focus events, so without that the tooltip can't open.Buttonalready blocks the click while it's disabled. The tooltip is always mounted and forced closed once there's a name, which keeps the button the same DOM node while the name changes.AgentCreate.module.css: centers the description and positions the overlay.The header is shared with
AgentIdentityDialog, so clearing the name while editing an existing agent shows the same marker. That dialog also blocks saving with an empty name.Screenshots
Rendered in Chromium at 1280px from
tests/fixtures/agent-library.html(New agent → Create a new agent), with the pointer over the disabled button.Validation
AgentCreateDialog.test.tsx: the empty-name test now checksaria-required, the "Required" description (empty, spaces only, named), the tooltip on hover, and that clicking the disabled button doesn't create. It fails without the production change.vitest run src/bundled/agents/ src/bundled/builderlab/: 202/202 pass. The pre-push hook's unit tests pass.pnpm checkpasses (biome, typecheck, design checks).agent-library.spec.mjsstill passes.Open questions / deferred
DESIGN.mdmarks optional fields (Field optional) rather than required ones. This follows the mock, which uses a required marker.🤖 Generated with Claude Code