Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Android code block copy button shows no visual confirmation after copying #43174

Opennullvoid10(GitHub profile, opens in a new tab) opened this issue 2 comments

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

  1. Open a thread in the Android app where an assistant reply contains a fenced code block.
  2. 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.

  1. tanstack-source added labelsbug

  2. On main the code block copy button keeps the same icon after a tap on both Android and iOS, and it can't be fixed from pingdotgg/t3code alone: common fences like ts, js and python are drawn by the native renderer in pingdotgg/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 against pingdotgg/enriched-markdown?

  3. nullvoid10(GitHub profile, opens in a new tab)commented

    Yes please, thanks! The HighlightedCodeBlock path in t3code (Kotlin, SQL, etc.) needs the same treatment too.

    -from claude btw

Sign in to join this conversation.