fix: show copy button confirmation on click only - #77
Open
marekdano wants to merge 2 commits into
Open
Conversation
Signed-off-by: Marek Dano <mk.dano@gmail.com>
vishu-bh
requested changes
Aug 24, 2026
vishu-bh
left a comment
Contributor
There was a problem hiding this comment.
Changes are clean just some accessibility/i18n gaps needs closing.
| <span className="truncate">{identifier}</span> | ||
| <CopyButton | ||
| value={identifier} | ||
| label={intl.formatMessage( |
Contributor
There was a problem hiding this comment.
This button copies component identifier, but accessible label says only Copy {title} (for example, “Copy Tool One”). Use field + row naming, such as “Copy tool ID for Tool One”. Same issue exists in VirtualServerDetailsPanel.tsx:590-593
| label={intl.formatMessage( | ||
| { id: "common.copyValue" }, | ||
| { label: identifier }, | ||
| { label: component.type.slice(0, -1) }, |
Contributor
There was a problem hiding this comment.
component.type.slice(0, -1) produces English labels like tool and resource. In Spanish/Portuguese, screen readers announce “Copiar tool/resource”. Add localized singular component labels and use them here.
Signed-off-by: Marek Dano <mk.dano@gmail.com>
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.
Closes #72
Summary
Builds on #61 (which consolidated 17 copy buttons onto a shared
CopyButton). This closes #72 by reserving the tooltip for the copy confirmation instead of double-duty as a hover hint, fixing an accessibility/interaction bug along the way: a hover-opened Radix tooltip insideToolSchemaDialog/TokenCreatedDialogwas swallowing the first Escape press meant for the dialog, since only the topmostDismissableLayerresponds to Escape.Interaction
CopyButtonnow shows its confirmation bubble on click only — hover and focus produce nothing.Tooltipwith@floating-ui/react-dom+createPortal, sidestepping the Escape-layering bug and clipping againsttable/dialog/TestConnectionPanelcontainers.aria-labelstays fixed at all times; a single always-mountedrole="status"region is now the sole non-visual announcement channel for the copied/failed state.@floating-ui/react-domas a direct dependency (was already present transitively via Radix).Accessible labels
Copy tool ID for {name}) across the tools/resources/servers tables and the MCP server / virtual server detail panels.UUID,URL,Input,Output,server ID) andCodeBlock's default"Copy code"label, adding matchinges-ES/pt-BRtranslations.Focus placement
TokenCreatedDialog's auto-focus redirect — it existed only to dodge the hover-tooltip issue, which no longer applies.ToolSchemaDialog's redirect (Close is still the more useful landing spot in a mostly read-only dialog) with an updated comment.Tests
CopyButtontests for the click-only behavior and the always-mounted status region.vi.useFakeTimers()leak inServersTable.test.tsxthat was silently hanging unrelated tests after an assertion failure.Test plan
npx vitest run— 183 test files, 3090 tests passingnpx tsc -b— cleannpx eslint src server e2e— cleannpx prettier --check— cleannpm run build— succeeds