Skip to content

fix(mobile): show the Android code block copy icon - #16933

Open
X2Borgo wants to merge 11 commits into
pingdotgg:mainfrom
X2Borgo:fix/droid-copy
Open

X2Borgo wants to merge 11 commits into
pingdotgg:mainfrom
X2Borgo:fix/droid-copy

Conversation

@X2Borgo

@X2Borgo X2Borgo commented Oct 7, 2026

Copy link
Copy Markdown

Problem

On Android, fenced code blocks in chat (and in markdown file previews) show their header copy button as an empty rounded square. Tapping it still copies, but neither the copy icon nor the "copied" checkmark is drawn. iOS is unaffected.

Reproduce: open any thread on the Android app whose assistant reply contains a fenced code block, and look at the top-right of the block header.

Change

Android renders markdown through the native module, so code fences use NativeCodeBlock, which mounts the module's own CopyTextButton (apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx). That button passed SF Symbol names to expo-symbols as plain strings. expo-symbols only treats a string as an iOS SF Symbol, so on Android the name resolves to null and nothing renders inside the button.

The button now passes { ios, android } names for both states, the same names the app-level apps/mobile/src/components/CopyTextButton.tsx uses: doc.on.doc / content_copy for copy, and checkmark / check for copied. iOS still receives the same SF Symbols.

The module doesn't import the app's AppSymbol wrapper. No module under apps/mobile/modules imports app code, and AppSymbol depends on Uniwind and Tabler. Using the raw expo-symbols Android path adds no new cost: the module already imports it on Android, and its SymbolView loads the bundled Material Symbols font on mount even when the name is missing.

Scope and approval

Fixes #13376. That issue is a triaged bug (bug, accepted) with a maintainer diagnosis that identifies this exact file and cause.

The same one-line approach was proposed in #13580. That PR was closed for missing device verification, not for the code. This PR adds the on-device before/after evidence it lacked.

One file changed: the module's copy button. No other behavior changes.

Verification

Checked on a Samsung Galaxy S22 (SM-S901B), Android 16, against a T3 Code server running 0.0.46-nightly.20261007. Both screenshots show the same code block in the same thread.

Before (installed T3 Code 2.0.0, build 77) After, copy icon After, checkmark right after tapping

Build for "after": the T3 Code Dev (com.t3tools.t3code.dev) debug development client, built locally with expo prebuild --clean --platform android and expo run:android (the android:dev script) from commit 82212f6, with JS served by Metro from this branch.

Manual checks on that device:

  • The chat code block header shows the copy icon.
  • Tapping it shows the checkmark (screenshot taken about 0.3 s after the tap).

Not checked: the clipboard contents after the tap (this change doesn't touch the copy call), the markdown file preview (it uses the same button), and iOS on a device. The iOS names are unchanged, and SymbolView.ios reads name.ios. No unit test added: the change is a static icon name, and a test would only mirror the implementation.

Static checks: tsc --noEmit in apps/mobile passes.

Agent-assisted: Claude Opus 5.5 (Claude Code, in T3 Code).

The markdown module's copy button passed SF Symbol names as plain strings,
which expo-symbols only resolves on iOS, so Android drew an empty button.
Give it the same { ios, android } names the app's CopyTextButton uses, for
both the copy and copied states.

Fixes pingdotgg#13376
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 7, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 82212f6

Macroscope's review found this PR approvable — This one-file mobile fix only adds explicit Android icon names to an existing markdown copy button, preserving iOS symbols and copy behavior. Its scope is small and self-contained, with no default, schema, infrastructure, or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cddc0762-fc9d-4053-b40d-264ac733fb63

📥 Commits

Reviewing files that changed from the base of the PR and between 5d62794 and 234f780.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a9cfcf60-b286-4ebd-9ff0-e5fd80312381



📥 Commits

Reviewing files that changed from the base of the PR and between a9fb6a8 and 82212f6.




📒 Files selected for processing (1)
  • apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx



Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

CopyTextButton now supplies platform-specific symbol names to SymbolView for its copied and uncopied states. iOS retains its existing names, while Android receives Android-specific names.

Changes

Copy button icons

Layer / File(s) Summary
Platform-specific symbol names
apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx
SymbolView receives checkmark and doc.on.doc on iOS, and check and content_copy on Android.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low





Merge Risk: ⚪ Minimal · up to 82212

The copy control uses supported platform-specific icons, and no issue blocking the documented behavior is established. The change is mergeable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: fixing the Android code block copy icon.
Description check ✅ Passed The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the cause, implementation, linked issue, device verification, screenshots, static checks, …
Linked Issues check ✅ Passed Issue #13376 requires a visible copy icon in Android fenced-code-block headers. The changed apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx now passes android: "content_copy" for the c…
Out of Scope Changes check ✅ Passed The whole pull request changes only the Markdown module's CopyTextButton. The change supplies the platform-specific names needed for the issue behavior and preserves existing copy logic and iOS beha…
Approvability ✅ Passed The pull request changes only apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx. It supplies Android symbol names while preserving the existing iOS names. The diff does not change product …





✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR





  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Mobile] Android code block copy button is missing its icon

1 participant