Repository navigation
fix(studio): make new API tokens selectable on plain HTTP - #9906
Souravrajvi0 wants to merge 9 commits into
Conversation
On http:// Studio installs the clipboard API is blocked, and the old KeyRevealCard wrapped the token in a button so it could not be selected manually when copy failed silently. Show the token in a read-only input with a separate copy button, auto- select on reveal, and toast with manual-copy guidance when automatic copy fails.
|
Confirmed this hits key-reveal-card.tsx, where handleCopy has no failure branch and the token sits inside a button so it cannot be selected when the clipboard API is unavailable. Will get this reviewed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks @Souravrajvi0. I pushed two commits to the branch rather than send it back for a round trip.
The read-only Verified against a running Studio: the token lands in a read-only field that has focus and a full selection on mount (so Ctrl+C works immediately), the copy button still writes the token, and with every clipboard writer forced to fail the field is re-selected and the toast appears. Also confirmed the move from All 37 checks are green and Codex is clean on |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Checked this against main, where key-reveal-card.tsx still renders the token inside the copy button with no failure branch, so #9899 is still live and this addresses it. Thanks for the locale parity and aria-label follow-ups, nothing further needed from you. |
|
Thank you for the PR and for tracking this down! Closing as superseded by #11489, which landed on main on 2026-09-22 and closed #9899. Current main now renders the new token in a read-only input beside a separate copy button, focuses and selects it when the card appears so Ctrl+C works straight away, and re-selects the field when the copy button fails. That covers the plain HTTP case this PR addressed. The one piece not carried over is the copy failure toast; #11489 kept the change string-free so locale parity is unaffected, and re-selecting the field gives the same hint without a new translation key. Thanks again, and thanks @oobabooga for the locale follow-ups along the way. |
Fixes #9899
Problem
On
http://Studio installs (common for local/LAN use), the clipboard API is blocked. The new-token reveal UI wrapped the full API key in a click-to-copy button, so when automatic copy failed silently users could not select the token manually — they had to inspect the page DOM.Fix
<Input>with a separate copy buttonTesting
node --test tests/key-reveal-card.test.ts— 3 passed (source contracts for input, select-on-focus, copy-failure toast)