Summary
components/llm-share.tsx sets its copied state only after the clipboard write resolves. If the write fails, the button shows no change. The error goes to the console only.
Details
components/llm-share.tsx:76-80: setIsCopied(true) runs after await navigator.clipboard.writeText(...). The catch block only logs.
- Clipboard writes can fail. Causes: permissions policy, browser extensions, or an unfocused document.
- Other copy buttons set state before the await and always give a visual response. Example:
components/docskit/copy-button.tsx:18-22.
Impact
This button is on every docs page. A failed write produces a click with no response. Microsoft Clarity counted 1,486 dead clicks across 166 sessions in the week of 2026-09-15 to 2026-09-22. This button is one contributor.
Suggested fix
Set the copied state before the await, or in a finally block. Add a visible error message if the write fails.
Summary
components/llm-share.tsxsets its copied state only after the clipboard write resolves. If the write fails, the button shows no change. The error goes to the console only.Details
components/llm-share.tsx:76-80:setIsCopied(true)runs afterawait navigator.clipboard.writeText(...). Thecatchblock only logs.components/docskit/copy-button.tsx:18-22.Impact
This button is on every docs page. A failed write produces a click with no response. Microsoft Clarity counted 1,486 dead clicks across 166 sessions in the week of 2026-09-15 to 2026-09-22. This button is one contributor.
Suggested fix
Set the copied state before the await, or in a
finallyblock. Add a visible error message if the write fails.