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
Show minimal user feedback when a code-block Copy action fails #345
The message Copy button uses the shared clipboard helper and anchored feedback. The Markdown code-block Copy action calls navigator.clipboard.writeText directly; its failure callback in ChatMarkdown.tsx only logs to the console. A user can click Copy, have nothing copied, and receive no visible explanation.
Relevant code: apps/web/src/scient/presentation/CodeBlockActions.tsx, apps/web/src/components/ChatMarkdown.tsx, apps/web/src/hooks/useCopyToClipboard.ts, and apps/web/src/components/ui/anchoredCopyToast.ts.
This is an independent code-path gap, not the cause of the reported composer paste failure; that Copy action succeeded and the exact text reached the clipboard.
Desired behavior
Use Scient's existing reliable text-copy path and restrained anchored feedback where appropriate. On failure, show a small transient message near the Copy control, not a page-wide error. Keep the brief Copied success state and avoid duplicate notifications.
Validation
Test API success, unavailable/rejected API with fallback, complete failure, and unmount during an in-flight copy. Confirm the visible state matches actual clipboard success. Scope this to affected text-copy actions; do not rewrite unrelated binary or structured clipboard flows without evidence.
Activity