[Bug]: Android code block copy button shows no visual confirmation after copying #43174
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Steps to reproduce#
- Open a thread in the Android app where an assistant reply contains a fenced code block.
- Tap the copy button in the code block header.
Expected behavior#
The button confirms the copy, the way the message copy button already does: the icon changes to a checkmark (and the accessibility label to "Copied") for about a second, then changes back.
Actual behavior#
The code is copied (pasting works), but the button looks the same after the tap. The only feedback is a light haptic, which is easy to miss or may be turned off. So it is not clear that the tap worked, and people tap again or open the clipboard to check.
Impact#
Cosmetic issue
Version or commit#
Read against 630f2e1444 (2026-11-21).
Environment#
T3 Code mobile app, Android.
Logs or stack traces#
None. Nothing fails; the button just gives no visual sign.
Likely cause#
The code block header button in apps/mobile/src/native/HighlightedCodeBlock.tsx:125 calls copyTextWithHaptic(code) and does nothing else:
<CodeBlockHeaderButton
icon="doc.on.doc"
label={gt("Copy code")}
textStyle={textStyle}
onPress={() => copyTextWithHaptic(code)}
/>
apps/mobile/src/features/threads/CopyTextButton.tsx (used for message copy) already has the "copied" state: copiedAtMs + COPY_FEEDBACK_DURATION_MS (1200 ms), the icon changes to { ios: "checkmark", android: "check" } and the label to "Copied". The code block button could use the same state (or CopyTextButton itself) so the two buttons act the same.
Workaround#
Paste somewhere to check that the code was copied.
tanstack-source added labelsbug
Yes please, thanks! The
HighlightedCodeBlockpath in t3code (Kotlin, SQL, etc.) needs the same treatment too.-from claude btw
Sign in to join this conversation.
On
mainthe code block copy button keeps the same icon after a tap on both Android and iOS, and it can't be fixed frompingdotgg/t3codealone: common fences likets,jsandpythonare drawn by the native renderer inpingdotgg/enriched-markdown, whose copy action copies the text without touching the icon (CodeBlockContainerView.kt on Android, ENRMCodeBlockContainerView.m on iOS). I have a patch for the package that switches the icon to a checkmark and resets it, tested on a Galaxy Z Fold 8, an Android emulator and an iOS simulator. Would you like it as a PR againstpingdotgg/enriched-markdown?