Skip to content

Poc/penina copy button - #189

Draft
Penina-Levy wants to merge 4 commits into
mainfrom
poc/penina-copy-button
Draft

Poc/penina copy button#189
Penina-Levy wants to merge 4 commits into
mainfrom
poc/penina-copy-button

Conversation

@Penina-Levy

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a lucide-style copy icon to the left of the feedback thumbs on assistant messages, reusing the existing .feedback-btn styling so default/hover states match the thumbs.
  • Copies both text/html and text/plain to the clipboard so links stay clickable when pasted into rich text targets (falls back to writeText if ClipboardItem isn't supported).
  • Icon swaps to a checkmark for 2s on successful copy, matching the Claude.ai pattern.

Test plan

  • npm run build succeeds
  • Manually verified in the dev demo: copy button renders left of thumbs with correct spacing/sizing
  • Verified checkmark swap on click and revert after 2s
  • Verified clipboard payload contains a live <a href> link when the source message has a markdown link
  • Manual QA against a real backend / real Sefaria links

Adds a lucide-style copy icon to the left of the feedback thumbs.
Copies both HTML and plain text to the clipboard so links survive
paste into rich text targets, and swaps to a checkmark for 2s on
success.
Lost in the shared-workspace churn while separating this branch
from an unrelated commit. Without it the copy button crashed the
component on click.
@coolify-sefaria-github

coolify-sefaria-github Bot commented Aug 13, 2026

Copy link
Copy Markdown

The preview deployment for sefaria/ai-chatbot:server is ready. 🟢

Open app | Open Build Logs | Open Application Logs

Last updated at: 2026-08-13 21:53:58 CET

Left-aligns the icon row with the message text above it, and swaps
the copy icon for the provided 18x18 design, recolored to currentColor
so it inherits the same --lc-disabled-text/hover color as the thumbs.
Reuses the same Tooltip component and copy/copied i18n keys already
used for aria-label, so the bubble text tracks the icon state (Copy
-> Copied) and matches the styling of the header tooltips.
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.

1 participant