Skip to content

fix(api-keys): reuse shared copy button for created keys#432

Open
stemirkhan wants to merge 1 commit intoSoju06:mainfrom
stemirkhan:feat/fix-api-key-copy
Open

fix(api-keys): reuse shared copy button for created keys#432
stemirkhan wants to merge 1 commit intoSoju06:mainfrom
stemirkhan:feat/fix-api-key-copy

Conversation

@stemirkhan
Copy link
Copy Markdown

Summary

  • replace the custom inline copy logic in the API key created dialog with the shared CopyButton
  • reuse the existing clipboard success/error handling instead of calling navigator.clipboard.writeText(...) directly
  • add focused component coverage for copying a newly created API key

Why

The API key created dialog had its own minimal clipboard implementation with no error handling or user feedback on failure. Reusing the shared copy control makes the behavior consistent across browsers and aligns this dialog with the rest of the frontend.

Testing

  • cd frontend && npx -y node@20 ./node_modules/vitest/vitest.mjs run src/components/copy-button.test.tsx src/features/api-keys/components/api-key-created-dialog.test.tsx

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

не копируется api ключ

1 participant