Skip to content

Comments

[codex] Add copy button for historical AI messages and add tooltip labels to message action buttons#10

Open
MyPyDavid wants to merge 1 commit intomainfrom
codex/add-tooltips-for-small-buttons
Open

[codex] Add copy button for historical AI messages and add tooltip labels to message action buttons#10
MyPyDavid wants to merge 1 commit intomainfrom
codex/add-tooltips-for-small-buttons

Conversation

@MyPyDavid
Copy link
Member

Another vibe coded PR for the chatbot:

Motivation

  • Ensure each AI message (including historical messages shown in chat history) has a small copy action button so users can copy assistant text from the conversation history.
  • Provide localized tooltip text and aria-label attributes to match existing action buttons and improve accessibility.
  • Add a German translation entry so the new tooltip is localizable.

Description

  • Added Copy to clipboard tooltip lookup and helper functions (createCopyIcon, getMessageText, addCopyButton) to rdmo_chatbot/plugin/static/chatbot/js/copilot.js to build a copy icon, extract message text, and append a copy button that uses the Clipboard API with a textarea fallback.
  • Updated the MutationObserver in rdmo_chatbot/plugin/static/chatbot/js/copilot.js to set title and aria-label for existing action buttons (Insert as answer, Contact support, and Copy to clipboard) and to call addCopyButton for each .ai-message in the copilot shadow DOM so historical AI messages receive the copy button.
  • The copy button reuses the class of existing action buttons when present and stops click propagation to avoid interfering with other handlers.
  • Added the German translation msgid "Copy to clipboard" / msgstr "In die Zwischenablage kopieren" to rdmo_chatbot/plugin/locale/de/LC_MESSAGES/djangojs.po.

Testing

  • No automated tests were executed for these changes.

Codex Task

@MyPyDavid MyPyDavid changed the title [coded] Add copy button for historical AI messages [codex] Add copy button for historical AI messages Jan 30, 2026
@MyPyDavid MyPyDavid changed the title [codex] Add copy button for historical AI messages [codex] Add copy button for historical AI messages and add tooltip labels Jan 30, 2026
@MyPyDavid MyPyDavid changed the title [codex] Add copy button for historical AI messages and add tooltip labels [codex] Add copy button for historical AI messages and add tooltip labels to message action buttons Jan 30, 2026
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