From 26069682eea22e4410a3e0f94011eb25a1179fc2 Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Wed, 1 Apr 2026 20:16:52 -0700 Subject: [PATCH] fix: copy button fallback for non-secure contexts (#2472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip orchestrates AI agents for zero-human companies > - The UI serves agent management pages including an instructions editor with copy-to-clipboard buttons > - The Clipboard API (`navigator.clipboard.writeText`) requires a secure context (HTTPS or localhost) > - Users accessing the UI over HTTP on a LAN IP get "Copy failed" when clicking the copy icon > - This pull request adds an `execCommand("copy")` fallback in `CopyText` for non-secure contexts > - The benefit is that copy buttons work reliably regardless of whether the page is served over HTTPS or plain HTTP ## What Changed - `ui/src/components/CopyText.tsx`: Added `window.isSecureContext` check before using `navigator.clipboard`. When unavailable, falls back to creating a temporary `