Repository navigation
feat: add API key visibility toggle in Endpoint dashboard - #214
Merged
Merged
Conversation
toanalien
commented
Feb 28, 2026
Contributor
- Added eye icon button to show/hide individual API keys
- Keys hidden by default on page load for security
- Added eye icon button to show/hide individual API keys - Keys hidden by default on page load for security - Copy button always copies full key regardless of visibility state - Implemented per-key visibility state with React useState - Added maskKey helper to display first 8 characters + "..." - Clean up visibility state when keys are deleted Improves security and UX when managing API keys in the dashboard.
fgogolli
pushed a commit
to fgogolli/9router
that referenced
this pull request
Mar 13, 2026
- Added eye icon button to show/hide individual API keys - Keys hidden by default on page load for security - Copy button always copies full key regardless of visibility state - Implemented per-key visibility state with React useState - Added maskKey helper to display first 8 characters + "..." - Clean up visibility state when keys are deleted Improves security and UX when managing API keys in the dashboard.
idbara
pushed a commit
to idbara/9router
that referenced
this pull request
Apr 23, 2026
- Added eye icon button to show/hide individual API keys - Keys hidden by default on page load for security - Copy button always copies full key regardless of visibility state - Implemented per-key visibility state with React useState - Added maskKey helper to display first 8 characters + "..." - Clean up visibility state when keys are deleted Improves security and UX when managing API keys in the dashboard.
luckystart79-lang
pushed a commit
to luckystart79-lang/minirouter
that referenced
this pull request
May 2, 2026
- Added eye icon button to show/hide individual API keys - Keys hidden by default on page load for security - Copy button always copies full key regardless of visibility state - Implemented per-key visibility state with React useState - Added maskKey helper to display first 8 characters + "..." - Clean up visibility state when keys are deleted Improves security and UX when managing API keys in the dashboard.
diegosouzapw
pushed a commit
to cheaper-inference/OmniRoute
that referenced
this pull request
Jun 21, 2026
…page
Each row in the API keys list now exposes an eye / eye-off button next to
the masked key. Clicking it lazy-fetches the full key via the existing
/api/keys/{id}/reveal endpoint (so the server-side policy gate is unchanged),
caches the plaintext client-side, and renders it inline. Clicking again
hides it. The toggle only appears when `allowKeyReveal` is true; when the
server policy disables reveal, the existing locked stub is preserved.
Implementation:
- Two pure helpers in apiManagerPageUtils.ts: `maskKey(s)` (keep first 8
chars + ellipsis) and `toggleKeyVisibility(prev, id)` (immutable Set
toggle, returns a fresh Set so React state setters always see a new
reference). 6-case TDD covers both, including the no-mutation contract.
- New `visibleKeys: Set<string>` and `revealedKeys: Map<string, string>`
state in ApiManagerPageClient.tsx. The reveal cache is cleared on
delete, so a recreated key cannot inherit a stale plaintext.
- Reuses the i18n keys `apiManager.showKey` / `apiManager.hideKey` that
already ship in all 42 locale catalogs — no new translation keys.
Inspired-by: decolua/9router#214
Co-authored-by: Thiên Toán <toanalien@gmail.com>
diegosouzapw
pushed a commit
to cheaper-inference/OmniRoute
that referenced
this pull request
Jun 21, 2026
…page
Each row in the API keys list now exposes an eye / eye-off button next to
the masked key. Clicking it lazy-fetches the full key via the existing
/api/keys/{id}/reveal endpoint (so the server-side policy gate is unchanged),
caches the plaintext client-side, and renders it inline. Clicking again
hides it. The toggle only appears when `allowKeyReveal` is true; when the
server policy disables reveal, the existing locked stub is preserved.
Implementation:
- Two pure helpers in apiManagerPageUtils.ts: `maskKey(s)` (keep first 8
chars + ellipsis) and `toggleKeyVisibility(prev, id)` (immutable Set
toggle, returns a fresh Set so React state setters always see a new
reference). 6-case TDD covers both, including the no-mutation contract.
- New `visibleKeys: Set<string>` and `revealedKeys: Map<string, string>`
state in ApiManagerPageClient.tsx. The reveal cache is cleared on
delete, so a recreated key cannot inherit a stale plaintext.
- Reuses the i18n keys `apiManager.showKey` / `apiManager.hideKey` that
already ship in all 42 locale catalogs — no new translation keys.
Inspired-by: decolua/9router#214
Co-authored-by: Thiên Toán <toanalien@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.