You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: All copy buttons in the web UI silently fail when accessed over HTTP (non-secure context) #17553
All copy buttons in the web UI (code block copy, assistant response copy, shell output copy, copy path, etc.) silently fail when the app is accessed over a non-secure context (e.g. HTTP over LAN via `opencode web`).
Root cause
Every copy handler called navigator.clipboard.writeText() directly. The Clipboard API requires a secure context (HTTPS or localhost). When the server is accessed via a local network IP (http://192.168.x.x:PORT), the browser rejects the call — and because most handlers had no error handling, the rejection was silently swallowed, making buttons appear to do nothing.
The only working copy in the whole app was the share-URL copy in use-session-commands.tsx, which already had a document.execCommand("copy") fallback.
Plugins
No response
OpenCode version
1.2.25
Steps to reproduce
Run opencode web --hostname 0.0.0.0 --port 39769 and access the UI from another device or via LAN IP (HTTP, not localhost)
Open any session with file context
Click the "Copy path" button on any file reference
Activity
github-actions commentedon Mar 15, 2026
This issue might be a duplicate of existing issues. Please check:
document.execCommand("copy")as fallback #14803: Covers the exact same problem — copy buttons don't work over HTTP due tonavigator.clipboardrequiring a secure context — and proposes the samedocument.execCommandfallback solution.If your issue adds new context or scope beyond #14803, please clarify the differences. Otherwise, consider continuing the discussion there.
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.