[GH-ISSUE #3731] [GUI] AI reply cannot be copied in the desktop app (Copy response does nothing, no feedback) #1561

Closed
opened 2026-11-04 01:52:16 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3731

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows)

What happened

An AI reply in the desktop app cannot be copied. Hovering the reply shows the small copy icon at the top right ("复制回复" in the Chinese UI, "Copy response" in English). Clicking it leaves the clipboard unchanged, and the app shows no "Copied" confirmation and no error. The ··· menu's "Copy response" item and the user-message "复制消息" / "Copy message" action use the same handler.

The handler is a bare, unawaited call with no catch:

// host/dist/assets/index-DsqNG4H4.js (0.2.2)
s.jsx(Qs,{name:"copy",title:o("Copy response"),
  onClick:()=>void navigator.clipboard.writeText(t.content)})

// the ··· menu item
s.jsx("button",{role:"menuitem",className:"menu__item",
  onClick:()=>void navigator.clipboard.writeText(t.content),
  children:o("Copy response")})

void drops the returned promise. If navigator.clipboard.writeText() rejects, or navigator.clipboard is unavailable, the UI does nothing: no toast, no log, no fallback.

The app already has a copy helper that handles both outcomes, and uses it for other copy actions (API base URL, Model ID, API key):

async function ws(js,fs){
  try{await navigator.clipboard.writeText(js),qs("success","Copied",fs)}
  catch{qs("warn","Couldn’t copy","Select the value and copy it manually.")}
}

The chat message actions just do not use it. This looks like an oversight rather than a design choice: the bundle already contains a Couldn’t copy string and the toast system.

The desktop app is Tauri with WebView2 (msedgewebview2.exe 155.0.4283.62), so the web clipboard call depends on WebView2's permission handling. A rejection is exactly the case the missing catch hides.

Additional check on the same build in a test browser (not the desktop app): the handler received the 633-character reply and navigator.clipboard.writeText() rejected with:

NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Write permission denied.

No toast or error appeared ([role=status] and [role=alert] were empty). This test browser denies clipboard writes by policy, so it does not prove that WebView2 denies them; it shows what the handler does when a write is denied: nothing.

The copy action is also invisible until the pointer is over the message or the action has keyboard focus:

.st-msg__actions{opacity:0;transition:opacity var(--st-t-micro)}
.st-msg:hover .st-msg__actions,.st-msg:focus-within .st-msg__actions{opacity:1}
@media(hover:none){.st-msg__actions{opacity:1}}

That makes the action easy to miss, but the main problem is that clicking it does nothing when the clipboard write fails.

Smallest steps or command that reproduce it

  1. Open the desktop app on Windows and a chat with a completed AI reply.
  2. Hover the AI reply; the action row appears at the top right of the reply.
  3. Click the copy icon (复制回复 / "Copy response"), or open ··· -> "Copy response".
  4. Paste into any text field: the clipboard is unchanged. No confirmation or error appears.

Expected: the reply is copied and a confirmation appears. If the copy fails, an error explains it, as the app already does for other copy actions.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.2 · engine 0.1.47

Graphics card, memory and system

RTX 3080 Ti Laptop 16 GB · 64 GB RAM · Windows 11 (10.0.26300)

Model, size and settings

Swift 1.5 IQ3_XXS · 393K context · pictures on (the copy action is not model-specific)

Logs

No engine log: this is a client-side copy action. Evidence from the installed 0.2.2 bundle:

  • host/dist/assets/index-DsqNG4H4.js: the message-copy handlers above (bare void navigator.clipboard.writeText(t.content)), and the ws() helper above used by the API base URL / Model ID / API key copy actions.
  • host/dist/assets/index-BZOwU-vv.css: .st-msg__actions{opacity:0} and .st-msg:hover .st-msg__actions{opacity:1}.
  • Desktop runtime: Tauri window + msedgewebview2.exe 155.0.4283.62.
  • Test browser: NotAllowedError: ... Write permission denied.; no toast.

Possible fix (not tested): route the message copy actions through ws() (or an equivalent try/await/catch) so the app shows "Copied" / "Couldn't copy"; if the WebView2 clipboard API is unavailable, use Tauri's clipboard plugin (@tauri-apps/plugin-clipboard-manager) or a temporary textarea + document.execCommand('copy'). The existing helper already gives a manual fallback ("Select the value and copy it manually.").

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3731 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows) ### What happened An AI reply in the desktop app cannot be copied. Hovering the reply shows the small copy icon at the top right ("复制回复" in the Chinese UI, "Copy response" in English). Clicking it leaves the clipboard unchanged, and the app shows no "Copied" confirmation and no error. The `···` menu's "Copy response" item and the user-message "复制消息" / "Copy message" action use the same handler. The handler is a bare, unawaited call with no `catch`: ```js // host/dist/assets/index-DsqNG4H4.js (0.2.2) s.jsx(Qs,{name:"copy",title:o("Copy response"), onClick:()=>void navigator.clipboard.writeText(t.content)}) // the ··· menu item s.jsx("button",{role:"menuitem",className:"menu__item", onClick:()=>void navigator.clipboard.writeText(t.content), children:o("Copy response")}) ``` `void` drops the returned promise. If `navigator.clipboard.writeText()` rejects, or `navigator.clipboard` is unavailable, the UI does nothing: no toast, no log, no fallback. The app already has a copy helper that handles both outcomes, and uses it for other copy actions (API base URL, Model ID, API key): ```js async function ws(js,fs){ try{await navigator.clipboard.writeText(js),qs("success","Copied",fs)} catch{qs("warn","Couldn’t copy","Select the value and copy it manually.")} } ``` The chat message actions just do not use it. This looks like an oversight rather than a design choice: the bundle already contains a `Couldn’t copy` string and the toast system. The desktop app is Tauri with WebView2 (`msedgewebview2.exe` 155.0.4283.62), so the web clipboard call depends on WebView2's permission handling. A rejection is exactly the case the missing `catch` hides. Additional check on the same build in a test browser (not the desktop app): the handler received the 633-character reply and `navigator.clipboard.writeText()` rejected with: ```text NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Write permission denied. ``` No toast or error appeared (`[role=status]` and `[role=alert]` were empty). This test browser denies clipboard writes by policy, so it does not prove that WebView2 denies them; it shows what the handler does when a write is denied: nothing. The copy action is also invisible until the pointer is over the message or the action has keyboard focus: ```css .st-msg__actions{opacity:0;transition:opacity var(--st-t-micro)} .st-msg:hover .st-msg__actions,.st-msg:focus-within .st-msg__actions{opacity:1} @media(hover:none){.st-msg__actions{opacity:1}} ``` That makes the action easy to miss, but the main problem is that clicking it does nothing when the clipboard write fails. ### Smallest steps or command that reproduce it 1. Open the desktop app on Windows and a chat with a completed AI reply. 2. Hover the AI reply; the action row appears at the top right of the reply. 3. Click the copy icon (`复制回复` / "Copy response"), or open `···` -> "Copy response". 4. Paste into any text field: the clipboard is unchanged. No confirmation or error appears. Expected: the reply is copied and a confirmation appears. If the copy fails, an error explains it, as the app already does for other copy actions. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.2 · engine 0.1.47 ### Graphics card, memory and system RTX 3080 Ti Laptop 16 GB · 64 GB RAM · Windows 11 (10.0.26300) ### Model, size and settings Swift 1.5 IQ3_XXS · 393K context · pictures on (the copy action is not model-specific) ### Logs No engine log: this is a client-side copy action. Evidence from the installed 0.2.2 bundle: - `host/dist/assets/index-DsqNG4H4.js`: the message-copy handlers above (bare `void navigator.clipboard.writeText(t.content)`), and the `ws()` helper above used by the API base URL / Model ID / API key copy actions. - `host/dist/assets/index-BZOwU-vv.css`: `.st-msg__actions{opacity:0}` and `.st-msg:hover .st-msg__actions{opacity:1}`. - Desktop runtime: Tauri window + `msedgewebview2.exe` 155.0.4283.62. - Test browser: `NotAllowedError: ... Write permission denied.`; no toast. Possible fix (not tested): route the message copy actions through `ws()` (or an equivalent `try/await/catch`) so the app shows "Copied" / "Couldn't copy"; if the WebView2 clipboard API is unavailable, use Tauri's clipboard plugin (`@tauri-apps/plugin-clipboard-manager`) or a temporary textarea + `document.execCommand('copy')`. The existing helper already gives a manual fallback ("Select the value and copy it manually.").
Author
Owner

@xvcezrqpbxtpzblrt commented on GitHub (Oct 23, 2026):

Confirmed still present in 0.2.3 (v0.2.3 = 5c8dd322528cc84f68f461ad54a506b9da8fa8d4, also the control/COMMIT of the installed app):

  • apps/host/src/screens/Chat.tsx L623, L662, L666: still void navigator.clipboard.writeText(m.content) with no catch and no toast.
  • apps/host/src/components/Markdown.tsx L72: the fenced-code copy button has the same unguarded call.

The source maps inside the installed 0.2.3 build match that commit for both files, so the handlers above are the code that runs. The transcript selection and line-break side is #3818.

<!-- gh-comment-id:6363160276 --> @xvcezrqpbxtpzblrt commented on GitHub (Oct 23, 2026): Confirmed still present in **0.2.3** (`v0.2.3` = `5c8dd322528cc84f68f461ad54a506b9da8fa8d4`, also the `control/COMMIT` of the installed app): - `apps/host/src/screens/Chat.tsx` L623, L662, L666: still `void navigator.clipboard.writeText(m.content)` with no `catch` and no toast. - `apps/host/src/components/Markdown.tsx` L72: the fenced-code copy button has the same unguarded call. The source maps inside the installed 0.2.3 build match that commit for both files, so the handlers above are the code that runs. The transcript selection and line-break side is #3818.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Fixed in 0.2.5: Copy response, Copy message and the code Copy button now say Copied, or say they could not copy, and try an older copy route first. Please update and tell us if it still does nothing.

<!-- gh-comment-id:6423309908 --> @Niko1221 commented on GitHub (Oct 26, 2026): Fixed in 0.2.5: Copy response, Copy message and the code Copy button now say Copied, or say they could not copy, and try an older copy route first. Please update and tell us if it still does nothing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1561
No description provided.