[GH-ISSUE #4748] [GUI] a copy gives no confirmation on the control itself: one 5.2-second toast in the far corner, and six copy buttons give no feedback at all #2178

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

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

2026-11-06 核对结果:装机 0.2.11 与 main@9f7d977d2 已存在该修复——复制控件点击后自身显示对勾并 tooltip "Copied"(CopyBtn.tsx,is-copied/check,注释含 #4748)。未做 GUI 实测。可关单;如仍无反馈请带控件位置。


Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows)

What happened

After 0.2.5 the copy actions do report themselves (#3731), but the report is a toast in the far corner that disappears in 5.2 seconds. The control you just clicked never changes: no background, no check icon, no label. So the only way to know a copy worked is to have been looking at the bottom-right corner at the right moment, which is not where a reader looks after pressing Copy on a message.

The person at the keyboard cannot tell whether a reply actually landed on the clipboard, and re-pressing is not safe either: a second press copies the same text again, so a missed toast is indistinguishable from a silent failure.

Two things make it worse:

  1. The toast is easy to miss by design. It is position:fixed; right:20px; bottom:20px (apps/host/src/styles/kit/components.css:128), it lives 5.2 s (apps/host/src/lib/store.ts:391 TOAST_MS = 5200, armed at :406, re-armed on hover at :424, removed at :431), and the stack holds only three: past three, the oldest collapses (store.ts:395-405, with the comment "A toast nobody can read is not a notification"). Task and monitor errors push into the same stack, so a busy session can eat the copy confirmation.
  2. Six copy controls give no feedback at all, because they never go through the helper that the rest of the app uses (apps/host/src/lib/clipboard.ts:27-35, which toasts on both success and failure). They are bare void navigator.clipboard.writeText(...), so a refused clipboard is simply swallowed:
    • apps/host/src/components/ArtifactPanel.tsx:68 and :69 — the preview's "Copy code" button and its menu item;
    • apps/host/src/screens/Serving.tsx:84 ("Copy Cloudflare tunnel URL"), :93 ("Copy request template"), :95 ("Copy local network URL");
    • apps/host/src/components/CloudflareDialog.tsx:87 ("Copy tunnel URL") and :96 (origin URL).
      Serving.tsx:77 on the same screen does use copyText, so the pattern is known and these are the leftovers. The repo's own test apps/host/tests/clipboard-copy.test.mjs:25-30 asserts that Chat.tsx contains no bare void navigator.clipboard.writeText — the rule exists; it is only enforced for the chat.

What is already available and unused: IconBtn accepts an active flag and renders is-on (apps/host/src/components/ui.tsx:52-61), and the stylesheet already styles it — .st-btn--icon.is-on (two rules in apps/host/src/styles/app.css). No copy button passes it, and no stylesheet anywhere keys off a copied state: a search of app.css and of the shipped compiled stylesheet in an installed 0.2.8 (host/dist/assets/index-ycN8HD_X.css) gives copied 0, data-copied 0. The action row itself is hover-only (app.css:3966-3983), so the control you clicked is often invisible a moment later, which removes the last spatial cue.

The repo's own served web chat page already does this better: serve/web/app.js:50-51 swaps the button's icon to a check and back after 1500 ms, plus a toast at :53. The desktop app has no equivalent at all.

Smallest steps or command that reproduce it

  1. Open the desktop app and a chat; send any message and wait for the reply.
  2. Click "Copy response" (or the Copy button on a code block).
  3. Watch the button: it never changes at all. Watch the bottom-right corner: a "Copied / Response" toast appears and is gone after about five seconds.
  4. Repeat while the Monitor or a task is also reporting toasts, so the stack is full: the copy confirmation is gone in under a second, and there is no way to tell afterwards whether the text is on the clipboard.
  5. For the silent ones: open a preview of a code file and click "Copy code" with the clipboard permission refused (or with another app holding the clipboard): nothing at all is reported — no success mark, no failure notice.

Reproduction status

Confirmed: the behaviour is observed by the person at the keyboard (they could not tell whether the copy worked), and the mechanism is read from the shipped 0.2.8 tree at tag v0.2.8 and from the compiled stylesheet inside the installed app. The six bare writeText call sites were read directly at the tag, with the line numbers above. No automated GUI test was run.

Strata version

Strata 0.2.8 — app 0.2.8, Control and engine 0.1.54.

Graphics card, memory and system

NVIDIA GeForce RTX 3080 Ti Laptop GPU 16 GB - 64 GB RAM - Windows 11 Pro build 26300

Model, size and settings

Not relevant: this is the transcript's copy controls. Qwen3.8-Flash-Next IQ3_S, 384K context was loaded while testing.

Logs

None — no request is involved.

Searched open and closed issues for copy, copied, confirm copy, copy toast, clipboard: the only match is #3731 (closed, fixed in 0.2.5 by 5faf357b and c7899f9), which asked that the copy work and that some report exist; its own body's aside about the hover-hidden action row is the only overlap with this. Nothing asks for the confirmation to be attached to the control, and no code in 0.2.5-0.2.8 does that.

Suggested fix (not tested)

  • Put the confirmation on the control: pass active for ~1.5 s after a successful copyText (the is-on style and the IconBtn prop already exist), or set a data-copied attribute and let CSS show a check. The served web page already does exactly this at serve/web/app.js:50-51, so the pattern is in the repo.
  • Keep the toast, but make the failure case outlast the success case (5.2 s for "Copied" is fine; a "Couldn't copy" that also vanishes in 5.2 s is how a silent failure is remembered) — the store already has a precedent for holding failures instead of toasting them (store.ts:125-128).
  • Route the six remaining controls through copyText, and extend apps/host/tests/clipboard-copy.test.mjs:25-30 from "Chat.tsx has no bare writeText" to the whole apps/host/src tree, so this cannot regress.
Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4748 **2026-11-06 核对结果**:装机 0.2.11 与 main@9f7d977d2 已存在该修复——复制控件点击后自身显示对勾并 tooltip "Copied"(CopyBtn.tsx,is-copied/check,注释含 #4748)。未做 GUI 实测。可关单;如仍无反馈请带控件位置。 --- ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows) ### What happened After 0.2.5 the copy actions do report themselves (#3731), but the report is a toast in the far corner that disappears in 5.2 seconds. The control you just clicked never changes: no background, no check icon, no label. So the only way to know a copy worked is to have been looking at the bottom-right corner at the right moment, which is not where a reader looks after pressing Copy on a message. The person at the keyboard cannot tell whether a reply actually landed on the clipboard, and re-pressing is not safe either: a second press copies the same text again, so a missed toast is indistinguishable from a silent failure. Two things make it worse: 1. The toast is easy to miss by design. It is `position:fixed; right:20px; bottom:20px` (`apps/host/src/styles/kit/components.css:128`), it lives 5.2 s (`apps/host/src/lib/store.ts:391 TOAST_MS = 5200`, armed at `:406`, re-armed on hover at `:424`, removed at `:431`), and the stack holds only three: past three, the oldest collapses (`store.ts:395-405`, with the comment "A toast nobody can read is not a notification"). Task and monitor errors push into the same stack, so a busy session can eat the copy confirmation. 2. Six copy controls give **no** feedback at all, because they never go through the helper that the rest of the app uses (`apps/host/src/lib/clipboard.ts:27-35`, which toasts on both success and failure). They are bare `void navigator.clipboard.writeText(...)`, so a refused clipboard is simply swallowed: - `apps/host/src/components/ArtifactPanel.tsx:68` and `:69` — the preview's "Copy code" button and its menu item; - `apps/host/src/screens/Serving.tsx:84` ("Copy Cloudflare tunnel URL"), `:93` ("Copy request template"), `:95` ("Copy local network URL"); - `apps/host/src/components/CloudflareDialog.tsx:87` ("Copy tunnel URL") and `:96` (origin URL). `Serving.tsx:77` on the same screen does use `copyText`, so the pattern is known and these are the leftovers. The repo's own test `apps/host/tests/clipboard-copy.test.mjs:25-30` asserts that Chat.tsx contains no bare `void navigator.clipboard.writeText` — the rule exists; it is only enforced for the chat. What is already available and unused: `IconBtn` accepts an `active` flag and renders `is-on` (`apps/host/src/components/ui.tsx:52-61`), and the stylesheet already styles it — `.st-btn--icon.is-on` (two rules in `apps/host/src/styles/app.css`). No copy button passes it, and no stylesheet anywhere keys off a copied state: a search of `app.css` and of the shipped compiled stylesheet in an installed 0.2.8 (`host/dist/assets/index-ycN8HD_X.css`) gives `copied` 0, `data-copied` 0. The action row itself is hover-only (`app.css:3966-3983`), so the control you clicked is often invisible a moment later, which removes the last spatial cue. The repo's own served web chat page already does this better: `serve/web/app.js:50-51` swaps the button's icon to a check and back after 1500 ms, plus a toast at `:53`. The desktop app has no equivalent at all. ### Smallest steps or command that reproduce it 1. Open the desktop app and a chat; send any message and wait for the reply. 2. Click "Copy response" (or the Copy button on a code block). 3. Watch the button: it never changes at all. Watch the bottom-right corner: a "Copied / Response" toast appears and is gone after about five seconds. 4. Repeat while the Monitor or a task is also reporting toasts, so the stack is full: the copy confirmation is gone in under a second, and there is no way to tell afterwards whether the text is on the clipboard. 5. For the silent ones: open a preview of a code file and click "Copy code" with the clipboard permission refused (or with another app holding the clipboard): nothing at all is reported — no success mark, no failure notice. ### Reproduction status Confirmed: the behaviour is observed by the person at the keyboard (they could not tell whether the copy worked), and the mechanism is read from the shipped 0.2.8 tree at tag `v0.2.8` and from the compiled stylesheet inside the installed app. The six bare `writeText` call sites were read directly at the tag, with the line numbers above. No automated GUI test was run. ### Strata version Strata 0.2.8 — app `0.2.8`, Control and engine `0.1.54`. ### Graphics card, memory and system NVIDIA GeForce RTX 3080 Ti Laptop GPU 16 GB - 64 GB RAM - Windows 11 Pro build 26300 ### Model, size and settings Not relevant: this is the transcript's copy controls. Qwen3.8-Flash-Next IQ3_S, 384K context was loaded while testing. ### Logs None — no request is involved. ### Duplicate search Searched open and closed issues for `copy`, `copied`, `confirm copy`, `copy toast`, `clipboard`: the only match is #3731 (closed, fixed in 0.2.5 by `5faf357b` and `c7899f9`), which asked that the copy work and that *some* report exist; its own body's aside about the hover-hidden action row is the only overlap with this. Nothing asks for the confirmation to be attached to the control, and no code in 0.2.5-0.2.8 does that. ### Suggested fix (not tested) - Put the confirmation on the control: pass `active` for ~1.5 s after a successful `copyText` (the `is-on` style and the `IconBtn` prop already exist), or set a `data-copied` attribute and let CSS show a check. The served web page already does exactly this at `serve/web/app.js:50-51`, so the pattern is in the repo. - Keep the toast, but make the failure case outlast the success case (5.2 s for "Copied" is fine; a "Couldn't copy" that also vanishes in 5.2 s is how a silent failure is remembered) — the store already has a precedent for holding failures instead of toasting them (`store.ts:125-128`). - Route the six remaining controls through `copyText`, and extend `apps/host/tests/clipboard-copy.test.mjs:25-30` from "Chat.tsx has no bare writeText" to the whole `apps/host/src` tree, so this cannot regress.
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#2178
No description provided.