Skip to content

Feature: Add Copy-to-Clipboard Button for RAG Responses and Generated Compliance Content #993

@harshitha0539

Description

@harshitha0539

Title:
Feature: Add Copy-to-Clipboard Button for RAG Responses and Generated Compliance Content

Description:

Currently, users can view generated compliance documents and RAG (Retrieval-Augmented Generation) responses within the application, but there is no quick way to copy the content for reuse in reports, documentation, or external tools.

This feature proposes adding a small Copy to Clipboard button that allows users to copy generated text with a single click.

Proposed Changes:

•Add a copy button near generated text sections.

•Use the browser Clipboard API (navigator.clipboard.writeText()).

•Display a success message or tooltip after copying.

•Handle copy failures gracefully.

•Maintain the existing UI design and styling.

Possible Areas:

•Generated compliance document views.

•RAG query response section.

•Other read-only generated text outputs where copying is useful.

•Files Likely to be Modified

Frontend:

•frontend/src/pages/RagChat.tsx (if RAG responses are displayed here)

•Components responsible for rendering compliance documents or generated content

•Shared UI component folder (if a reusable CopyButton component is created)

Optional New File:

•frontend/src/components/CopyButton.tsx

Expected Outcome:

•Users can copy generated content with one click.

•Improved usability and productivity.

•Consistent user experience across text-generation features.

Benefits:

•Beginner-friendly frontend contribution.

•Minimal risk to existing functionality.

•Reusable component that can be used across multiple pages.

•Enhances overall user experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions