mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[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
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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.apps/host/src/lib/clipboard.ts:27-35, which toasts on both success and failure). They are barevoid navigator.clipboard.writeText(...), so a refused clipboard is simply swallowed:apps/host/src/components/ArtifactPanel.tsx:68and: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:77on the same screen does usecopyText, so the pattern is known and these are the leftovers. The repo's own testapps/host/tests/clipboard-copy.test.mjs:25-30asserts that Chat.tsx contains no barevoid navigator.clipboard.writeText— the rule exists; it is only enforced for the chat.What is already available and unused:
IconBtnaccepts anactiveflag and rendersis-on(apps/host/src/components/ui.tsx:52-61), and the stylesheet already styles it —.st-btn--icon.is-on(two rules inapps/host/src/styles/app.css). No copy button passes it, and no stylesheet anywhere keys off a copied state: a search ofapp.cssand of the shipped compiled stylesheet in an installed 0.2.8 (host/dist/assets/index-ycN8HD_X.css) givescopied0,data-copied0. 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-51swaps 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
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.8and from the compiled stylesheet inside the installed app. The six barewriteTextcall 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 engine0.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 by5faf357bandc7899f9), 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)
activefor ~1.5 s after a successfulcopyText(theis-onstyle and theIconBtnprop already exist), or set adata-copiedattribute and let CSS show a check. The served web page already does exactly this atserve/web/app.js:50-51, so the pattern is in the repo.store.ts:125-128).copyText, and extendapps/host/tests/clipboard-copy.test.mjs:25-30from "Chat.tsx has no bare writeText" to the wholeapps/host/srctree, so this cannot regress.