chore(mobile): sync Enriched Markdown with upstream 1d00a92a#32180

merged5
main
t3code/enriched-markdown-sync-0b59df11
opened3d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 11h ago

Upstream merged five of our Enriched Markdown PRs since the archive the app ships today: onLinksChange (software-mansion/enriched-markdown#1088), Android inline image alignment (software-mansion/enriched-markdown#1089), the iOS and Android build fixes (software-mansion/enriched-markdown#1086, software-mansion/enriched-markdown#1087), and the iOS streaming memory bounds from #24263 (software-mansion/enriched-markdown#1138). The fork still carried its own copies, three of which upstream edited before merging.

This moves the mobile app to archive 1.2.0-t3.18 from fork/t3-mobile 4287c5d3, on upstream 1d00a92a. The fork reverted its copies so upstream's versions apply, then merged upstream main. Upstream also brings code block renderers (used by #32190), onTextPress, spoken LaTeX, several Android layout fixes, and on iOS a newly mounted message now draws in its first frame instead of showing an empty box for a few frames (software-mansion/enriched-markdown#1139). Since software-mansion/enriched-markdown#1121 the app generates the library's codegen itself, so both native clients need a rebuild.

The fork carries these changes, each with an upstream PR:

  • Clipboard link metadata: software-mansion/enriched-markdown#962. The maintainer asked for a smaller API, and we agreed.

  • Development-host autolinks: software-mansion/enriched-markdown#961, waiting on software-mansion-labs/md4c#7.

  • md4cFlags.preserveWindowsPaths: software-mansion/enriched-markdown#1105, after mity/md4c#477.

  • New: ~ strikes through by GitHub's rules, so ~$0.48 vs ~$0.65 and ~/foo and ~/bar stay plain. From pingdotgg/enriched-markdown#11 by ahalekelly; upstream is software-mansion-labs/md4c#6.

  • New: links whose fragment is a hash route now link, such as https://host:9501/#/chat and our own /pair#token=… links. From pingdotgg/enriched-markdown#9 by Dananz, plus a fix that keeps a trailing ; out of the link. md4c master already does this (mity/md4c#454), and it arrives with software-mansion-labs/md4c#7.

  • New: with Render math on, \(…\) and \[…\] render as math. This is upstream's software-mansion/enriched-markdown#1043 (with software-mansion-labs/md4c#4) by Yash-Singh1, copied line for line. Fixes pingdotgg/t3code#29599.

  • New: on iOS, Copy as Markdown on part of - **What**: … no longer copies **W****hat**. From pingdotgg/enriched-markdown#12 by dansanduleac; upstream is software-mansion/enriched-markdown#1143.

  • New: a line break in a copied table cell stays <br>, so Copy as Markdown keeps the row whole. #29355 shipped this as a pnpm patch on the old archive. The fork now carries the same change, by shivamhwp; upstream is software-mansion/enriched-markdown#1144. The patch is gone.

.pnpmfile.cjs now fails any install whose patchedDependencies names a package that apps/mobile installs from apps/mobile/deps, Enriched Markdown or our react-native-screens fork. A patch on a fork tarball is a second source of truth that the next tarball drops without a trace, as the t3.16 patch would have been here.

Icon links that wrap (#32238) are left for a later build.

Verification

  • Fork: the core parser fixtures (the strikethrough golden re-recorded, a new hash-route and ; case, and upstream's LaTeX cases), the WASM bundle check after a rebuild, all 1816 Jest tests, and the library build pass.
  • In T3, vp run check:changed passes.
  • Both native dev clients were built from this stack and opened the Markdown fixture thread: iOS 27 on an iPhone 18 Pro Max simulator, and Android 17 on a Pixel 10 Pro emulator. On both:
    • ~$0.48, ~/foo and ~/bar stay plain and ~~this~~ is struck;
    • both hash-route URLs link, with the trailing ; outside;
    • with Render math on, \(e^{i\pi}+1=0\) renders inline and the \[…\] sum as display math. With it off, the text is unchanged from before;
    • Mermaid diagrams, math fences, link pills, tables and code blocks render as before.
  • On iOS, Copy as Markdown on "What" in - **What**: … copies - **What**. In a 30 fps recording of opening the thread, all message content appears in the same frame.

Done with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Checks

25 successful · 12 skipped
All checks passed
7750c24
Synced from GitHub

Approvability

Verdict: Approved at 7750c24

Macroscope's review found this PR approvable — Updates mobile Markdown rendering and copying behavior, consolidates the fork patch, and adds an install-time guard against patch drift. Reported iOS and Android verification supports the limited presentation risk; native clients need rebuilding.

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

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
CodexLive turn WebSocket decoded21.5 KiB21.5 KiB0 B (0.0%)24.4 KiB✅
CodexLive turn messages110 (0.0%)8✅
ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
ClaudeLive turn messages110 (0.0%)8✅

Baseline: 0770446 · PR result: 7750c24 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile package now uses the react-native-enriched-markdown t3.17 archive, and the workspace allows its build scripts. The dependency README updates upstream notes and the archive example.

Changes: Enriched Markdown dependency

Layer / File(s)Summary
Update archive reference and documentation
apps/mobile/package.json, pnpm-workspace.yaml, apps/mobile/deps/README.md
The mobile dependency and workspace build permission now reference the t3.17 archive. The README identifies onLinksChange as upstream, removes two fork-specific entries, updates the Windows-path reference, and changes the archive example version and commit prefix.

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

Change: Other

Possibly related PRs

  • pingdotgg/t3code#24534: Updates Enriched Markdown block renderers and link-menu handling, which this archive update also references.
  • pingdotgg/t3code#24263: Includes the same streaming change in the updated Enriched Markdown archive.

Suggested labels: 📱 Native Change

Suggested reviewers: yash-singh1

Merge Risk: External image Minimal · up to edcb1

The update is ready to merge after normal checks and native client rebuilds.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description follows the repository template in substance. It has a Problem-equivalent section explaining the archive move from t3.16 to t3.18 and the upstream changes it brings in. It has a Change…1. Add a 'Scope and approval' section. For each new fork behavior, link the triaged bug issue or the maintainer discussion with explicit approval, including the approval comment. Examples are the hash-route autolinks, bracket math delimiter…
Passed Passed checks: 3 passed

Check nameStatusExplanation
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Title checkPassedThe title "chore(mobile): sync Enriched Markdown with upstream 1d00a92a" names the main change: syncing the mobile app's Enriched Markdown dependency with upstream commit 1d00a92a. The objectives and …
Full details: Title check

Explanation

The title "chore(mobile): sync Enriched Markdown with upstream 1d00a92a" names the main change: syncing the mobile app's Enriched Markdown dependency with upstream commit 1d00a92a. The objectives and raw summary describe the dependency bump to archive t3.17 (commit 0706a56a, based on upstream 0b59df11), and the description describes archive t3.18 on upstream 1d00a92a. The title therefore matches the broad intent (a sync with upstream), but the referenced archive and upstream commits differ between the title/description and the code-level summary and objectives. The title is specific and conventional, so this is a discrepancy to note, not a failure.

Full details: Description check

Explanation

The description follows the repository template in substance. It has a Problem-equivalent section explaining the archive move from t3.16 to t3.18 and the upstream changes it brings in. It has a Change section describing the fork reverting its copies, merging upstream main, and the fork-carried changes, each with an upstream PR link. It has a Verification section with specific focused checks, observed results, and before/after screenshots and a recording reference. Gaps: the template's Scope and approval section is not present. The description does not link a triaged bug issue or maintainer-approved discussion for the new fork-carried behavior changes, such as the hash-route autolinks, the Render math bracket delimiters, and the iOS Copy as Markdown fix. It also does not explain why those 'New' items qualify for an exemption. The description also says the Windows-path and autolink entries await upstream, but it does not state what is not verified. The template asks for the model and harness used, and the description includes 'Done with Claude Opus 5.5 in Claude Code', which meets that requirement. The objectives text also reports a different archive commit (0706a56a, t3.17) and a different test count (1812 vs 1816) than the description (t3.18, 4287c5d3, 1816), which is a discrepancy the author should reconcile.

Resolution

  1. Add a 'Scope and approval' section. For each new fork behavior, link the triaged bug issue or the maintainer discussion with explicit approval, including the approval comment. Examples are the hash-route autolinks, bracket math delimiters, the strikethrough rule change, and the table-cell <br> change. If a fix is a very small, focused fix of an obvious bug, explain why it qualifies without a prior issue. 2. Reconcile the archive version and commit. The description says t3.18 and 4287c5d3. The PR objectives say t3.17 and 0706a56a. The raw summary of the diff also says t3.17 and 0706a56a. Confirm which archive the diff ships and correct the description. 3. Reconcile the Jest test count. The description says 1816 and the objectives say 1812. 4. Note the iOS streaming memory bounds change in the description, because the objectives say it has no upstream PR yet. State which upstream PR, if any, carries it. 5. State any checks not performed, for example the Windows-path behavior on Windows hosts.
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
External image Recent review info

External image Run configuration

External image Commits

Reviewing files that changed from the base of the PR and between bdb8d5dfc067134f460ea7757e62355fe5f9b2a7 and edcb13d0ce3e2e140d64d19cd9e72239776f4ceb.

External image Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
External image Files selected for processing: 5

  • apps/mobile/deps/README.md
  • apps/mobile/deps/react-native-enriched-markdown-1.2.0-t3.16-29ddd424.tgz
  • apps/mobile/deps/react-native-enriched-markdown-1.2.0-t3.17-0706a56a.tgz
  • apps/mobile/package.json
  • pnpm-workspace.yaml

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

Added 5 commits

  • docs(mobile): link the upstream PR for the fork's iOS memory bounds4d62244
  • chore(mobile): sync Enriched Markdown with upstream 0b59df11711acfa
  • chore(mobile): update Enriched Markdown to t3.18 on upstream 1d00a92a746abf0
  • chore(mobile): carry the table cell line break fix in the Enriched Markdown fork1ca3d66
  • build(mobile): installs fail when a fork tarball is patched7750c24