Repository navigation
fix(mobile): iOS Copy as Markdown keeps bold spans whole - #29020
juliusmarminge wants to merge 2 commits into
Conversation
Copying a bold lead-in such as "- **What**: ..." on iOS put "- **W****hat**" on the clipboard: the vendored Enriched Markdown extractor wrapped each attribute run on its own, and the list-marker anchor splits a list item's first character into its own run. Bump the vendored tarball to 29ddd424 plus pingdotgg/enriched-markdown#12, which extends the previous span when the next run has identical inline delimiters. Fixes #29012 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The dependency update keeps identically formatted iOS text runs together when copying Markdown. Source inspection and reported simulator verification support a narrowly scoped clipboard-formatting fix, with Android and JavaScript unchanged. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update the enriched Markdown fork apps/mobile/package.json, pnpm-workspace.yaml, apps/mobile/deps/README.md |
The mobile dependency and workspace build permission now reference the c000d6ba tarball. The README adds the iOS Copy as Markdown fix to the fork changes. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: yash-singh1, t3dotgg
Merge Risk: 
Minimal · up to 9478d
-
The dependency update is internally consistent and targets the reported iOS Markdown-copy issue.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title "fix(mobile): iOS Copy as Markdown keeps bold spans whole" is a conventional commit that names the main change: the iOS Copy as Markdown bold-span fix. The changeset is a vendored dependency tarball bump (react-native-enriched-markdown from 29ddd424 to c000d6ba) that carries the extractor fix, plus a README note and matching path updates in package.json and pnpm-workspace.yaml. The title reflects the user-visible result of that bump, so it is related to the main change.
Full details: Linked Issues check
-
Explanation
Issue [
#29012] requires the iOS Markdown extractor to keep bold and linked spans intact across attribute runs and to update the vendored tarball. The PR updates the tarball toc000d6ba, whoseMarkdownExtractor.mextends a prior span when inline delimiters match. The included XCTest cases cover split bold text, list-item bold text, and separate formatting runs. The reported iOS result changes- **W****hat**to- **What**, and the link case is included in the verification matrix.
Full details: Out of Scope Changes check
-
Explanation
The changes are limited to the vendored dependency update, its package and workspace references, the dependency README, and the lockfile update described by the PR. These changes support issue [
#29012] by selecting and documenting the extractor fix. The reported Android and rendering behavior remains unchanged.
Full details: Description check
-
Explanation
The pull request includes complete Problem, Change, Scope and approval, and Verification sections. It explains the defect, implementation, issue reference, test results, manual before-and-after evidence, platform coverage, and known limitations.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Closing as superseded: this fix is already on |
Problem
On iOS, selecting assistant text that starts a list item with bold (
- **What**: …) and choosing Copy as Markdown put- **W****hat**on the clipboard. The vendored Enriched Markdown extractor wrapped each attribute run in its own delimiters, and the list-marker anchor on an item's first character splits that character into its own run.Reproduced on main 05c0ed7 with the T3 Code dev client on an iPhone 17 Pro simulator: a thread whose reply is
- **What**: something happened. Long-press What, then Copy as Markdown. The clipboard read- **W****hat**.Change
Bump the vendored
react-native-enriched-markdowntarball from fork commit 29ddd424 to c000d6ba. c000d6ba is 29ddd424 plus a cherry-pick of pingdotgg/enriched-markdown#12. When a run has the same inline delimiters as the span that still ends the output, the extractor moves that span's closing delimiters past the run's text instead of opening a new span. Runs with different formatting are still wrapped separately.The new tarball differs from the old one in two files only:
ios/utils/MarkdownExtractor.mand the source commit int3-fork.json. Android and JS contents are byte-identical. The path is updated inapps/mobile/package.json,pnpm-workspace.yamland the lockfile. The deps README now lists the fix among the fork's carried changes.c000d6ba is not on a
pingdotgg/enriched-markdownbranch yet. Its patch is below.Scope and approval
Fixes #29012
A focused fix of an obvious defect: Copy as Markdown produced invalid Markdown. It changes no behaviour beyond the copied text, and adds no setting.
Verification
vp run check:changed: pass (format, knip, typecheck of 39 packages, tests).diff -rq: onlyios/utils/MarkdownExtractor.mandt3-fork.jsondiffer.agent-device install, against the same server and seeded thread, with the same scripted selections.agent-device clipboard read. It then focuses the composer, where the iOS keyboard's "Paste from T3 Code Dev" bar shows the clipboard.- **W****hat**- **What**- **W****hat**: something happen- **What**: something happen- **W****hy**: see [docs](https://example.com/docs) for details- **Why**: see [docs](https://example.com/docs) for details**bold****bold**Clipboard as iOS shows it in the keyboard paste bar, per row:
The paste bar cuts off R3's long value. Here is R3 pasted into the composer, which wraps the full string:
R3 full frames
agent-device clipboard readtranscript, with the installed app bundles:The rendered message is byte-identical before and after (same crops), so a rendering diff proves nothing here; the clipboard strings are the proof. In R3 and R4 the iOS edit menu covers part of the message above the selection; the selected text stays visible.
Every frame: selection (top) and clipboard (bottom), R1 to R4, left to right
Before (05c0ed7):
After (353af61):
- **What**. The text was pasted into the composer (adb cannot read the clipboard on API 36); the capture is from a forked copy of the same thread. Android was not affected and its code is unchanged.Seeding script (not committed)
Capture drivers (not committed)
Source commit c000d6ba: the cherry-pick of #12 onto 29ddd424, as `git format-patch`
Created with Claude Opus 5.5 in Claude Code (T3 Code issue flow).
🤖 Generated with Claude Code