Skip to content

Fix API keys copy button for safari - #42036

Merged
awaseem merged 2 commits into
masterfrom
chore/fix-api-keys-copy-button-safari
Jan 21, 2026
Merged

awaseem merged 2 commits into
masterfrom
chore/fix-api-keys-copy-button-safari

Conversation

@joshenlim

@joshenlim joshenlim commented Jan 21, 2026 •

Copy link
Copy Markdown
Member

Context

Copy button for API keys isn't working on Safari - this PR fixes it

To test

  • Verify that you can copy the values from the copy button on the API keys page on Safari and on Chrome

Summary by CodeRabbit

  • Refactor
    • Simplified internal implementation of the copy button component's event handling and styling logic for improved code maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@joshenlim
joshenlim requested a review from a team as a code owner January 21, 2026 15:25
@vercel

vercel Bot commented Jan 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jan 21, 2026 3:34pm
studio-staging Ready Ready Preview, Comment Jan 21, 2026 3:34pm
6 Skipped Deployments
Project Deployment Review Updated (UTC)
cms Ignored Ignored Jan 21, 2026 3:34pm
studio Ignored Ignored Jan 21, 2026 3:34pm
design-system Skipped Skipped Jan 21, 2026 3:34pm
docs Skipped Skipped Jan 21, 2026 3:34pm
ui-library Skipped Skipped Jan 21, 2026 3:34pm
zone-www-dot-com Skipped Skipped Jan 21, 2026 3:34pm

Request Review

@supabase

supabase Bot commented Jan 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

The CopyButton component's onClick handler was refactored to remove async/await when calling asyncText(), directly passing the function result to copyToClipboard. Additionally, className construction was simplified by removing nested object patterns.

Changes

Cohort / File(s) Summary
CopyButton refactoring
apps/studio/components/ui/CopyButton.tsx
Removed async/await pattern from onClick handler when invoking asyncText(); simplified className construction using cn utility function; preserved copied state and icon switching behavior
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete compared to the template. It lacks sections on change type, current behavior with linked issues, new behavior, and additional context. Add missing template sections: specify the change type (Bug fix), link the relevant issue, describe the current vs. new behavior, and provide additional context if available.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing the API keys copy button functionality for Safari.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  70 passed
skipped  4 skipped

Details

stats  74 tests across 12 suites
duration  8 minutes, 17 seconds
commit  3361868

Skipped tests

Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@awaseem awaseem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Safari on staging and it works!

@awaseem
awaseem merged commit b55c399 into master Jan 21, 2026
16 of 17 checks passed
@awaseem
awaseem deleted the chore/fix-api-keys-copy-button-safari branch January 21, 2026 16:45
@github-actions

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

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.

2 participants