Skip to content

Add 'Copy Document' option to document menu#160

Merged
vkarpov15 merged 1 commit intomainfrom
codex/add-copy-document-option-to-menu
Jan 31, 2026
Merged

Add 'Copy Document' option to document menu#160
vkarpov15 merged 1 commit intomainfrom
codex/add-copy-document-option-to-menu

Conversation

@vkarpov15
Copy link
Member

Motivation

  • Provide a quick way for users to copy the full document JSON from the document-details overflow (3-dot) menu on both desktop and mobile to simplify exporting or sharing a document.

Description

  • Add a "Copy Document" button to the desktop and mobile overflow menus in frontend/src/document/document.html.
  • Implement copyDocument() in frontend/src/document/document.js which serializes this.document to pretty JSON and writes it to the clipboard using navigator.clipboard.writeText with a textarea fallback, and displays a success toast on completion.

Testing

  • No automated tests were executed for this change.

Codex Task

Copilot AI review requested due to automatic review settings January 31, 2026 22:36
@vercel
Copy link

vercel bot commented Jan 31, 2026

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

Project Deployment Actions Updated (UTC)
studio Ready Ready Preview, Comment Jan 31, 2026 10:36pm

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a "Copy Document" feature to the document detail page, allowing users to quickly copy the full document JSON to their clipboard from the overflow menu. The implementation provides both a modern Clipboard API with a textarea fallback for broader browser support.

Changes:

  • Added copyDocument() method that serializes the document to JSON and copies it to clipboard using navigator.clipboard API with execCommand fallback
  • Added "Copy Document" button to both desktop and mobile overflow menus in the document header

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
frontend/src/document/document.js Implements the copyDocument() method with clipboard API and textarea fallback, displaying success toast on completion
frontend/src/document/document.html Adds "Copy Document" button to both desktop (line 87-93) and mobile (line 167-173) overflow menus

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vkarpov15 vkarpov15 merged commit 5021038 into main Jan 31, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants