Repository navigation
fix(web): support clipboard copy over HTTP - #872
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes clipboard copy failures when the Web UI is accessed over plain HTTP (non-secure context) by routing copy actions through the existing useClipboard() utility (which provides fallback behavior) and surfacing a user-facing error toast when copying still fails, addressing issue #871.
Changes:
- Update “Connected Accounts” link-code copy to use
useClipboard().copyText()instead ofnavigator.clipboard.writeText(). - Update Chat code-block copy to use
useClipboard().copyText()and displaycommon.copyFailedon failure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/web/src/pages/profile/components/connected-accounts-section.vue | Uses useClipboard().copyText() for /link <code> copying and shows a localized error toast if copying fails over HTTP. |
| apps/web/src/pages/home/components/chat-code-block.vue | Uses useClipboard().copyText() for code-block copy and shows a localized error toast if copying fails over HTTP. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The fix looks right for the two reported paths, but the same HTTP issue remains in bot-checks-panel.vue, channel-settings-panel.vue, and profile/index.vue, which still call navigator.clipboard.writeText() directly. It had best to fix it all. |
|
These cases you mentioned have been fixed in the latest 4 commits. |
Summary
Fixes copy failures over plain HTTP across the Web UI:
All five paths now use the shared
useClipboard()fallback and report copy failures. The UI submodule includes the focus-trap-safe fallback from felinics/ui#11, so dialog copy no longer needs a page-level workaround.Verification
pnpm --filter @felinic/ui buildpnpm --filter @memohai/web buildFixes #871