Skip to content

refactor(mobile): name shared markdown renderer without iOS suffixes - #11128

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
SunkenInTime:t3code/name-shared-markdown-renderer
Sep 10, 2026
Merged

refactor(mobile): name shared markdown renderer without iOS suffixes#11128
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
SunkenInTime:t3code/name-shared-markdown-renderer

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Android and iOS both import @t3tools/mobile-markdown-text/renderer, whose export explicitly points to SelectableMarkdownText.ios.tsx. That filename made shared code look iOS-only during review of #11079 and its revert in #11098.

Move the renderer and its two shared components to unsuffixed .tsx filenames and update the package export and internal imports. The renderer replaces an unused null-returning placeholder at SelectableMarkdownText.tsx, so the package root now exposes the same implementation as /renderer. Both app clients continue using /renderer.

The component implementations match current upstream exactly after accounting for import paths. This preserves the Android native fix from #11118 and the existing iOS layout. It does not restore the reverted block-layout changes.

Validation: Android and iOS Metro exports passed, mobile typecheck passed, and all 35 focused Markdown tests passed. Formatting passed; targeted lint reported only two existing warnings in unchanged component code. No UI changes or new simulator verification in this PR.

Model: GPT-6. Harness: Codex.

Summary by CodeRabbit

  • New Features
    • Markdown content now renders with selectable text across supported mobile platforms.
    • Rich formatting, inline icons, file actions, links, code highlighting, images, and soft-break preservation are supported.
    • File context-menu actions are shared consistently throughout markdown content.
  • Bug Fixes
    • Improved platform compatibility for selectable markdown rendering.
    • Links can open through the standard device handler when no custom action is provided.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9ebc467f-d523-4315-a682-bc8099bcf559

📥 Commits

Reviewing files that changed from the base of the PR and between 96f4370 and 90452fc.

📒 Files selected for processing (5)
  • apps/mobile/modules/t3-markdown-text/package.json
  • apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.tsx
  • apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.tsx
  • apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx
  • apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.tsx
💤 Files with no reviewable changes (1)
  • apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx

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


📝 Walkthrough

Walkthrough

The markdown renderer now uses a platform-independent selectable text component. It parses markdown into chunks, renders rich and selectable content, shares file context menu handlers, and supports platform-specific styling, links, icons, and copy behavior.

Changes

Selectable markdown rendering

Layer / File(s) Summary
Renderer entry point and wiring
apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.tsx, apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx, apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.tsx, apps/mobile/modules/t3-markdown-text/package.json
The generic renderer now parses markdown, builds chunks, provides image and file menu contexts, and renders rich or selectable content. The package export and block import use platform-independent modules.
Native selectable text implementation
apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.tsx
The new component styles and renders markdown runs with links, file menus, inline icons, platform-specific prefixes, appearance-based native rebuilds, and Android copy sanitization.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SelectableMarkdownText
  participant MarkdownParser
  participant NativeMarkdownBlock
  participant NativeMarkdownSelectableText
  SelectableMarkdownText->>MarkdownParser: Parse markdown into chunks
  SelectableMarkdownText->>NativeMarkdownBlock: Render rich chunks
  SelectableMarkdownText->>NativeMarkdownSelectableText: Render selectable runs
  NativeMarkdownSelectableText->>NativeMarkdownSelectableText: Handle links and file context menus
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 90452

The shared selectable Markdown renderer is wired for both mobile platforms, with existing native behavior preserved. Validation passed and no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: renaming the shared mobile Markdown renderer to remove iOS-specific suffixes.
Description check ✅ Passed The description explains what changed, why it changed, validation results, and that there are no UI changes. It does not reproduce the template headings or checklist, but it provides the required info…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@macroscopeapp

macroscopeapp Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 90452fc

Macroscope's review found this PR approvable — This is a contained filename/export refactor that preserves the existing renderer used by both mobile platforms. The only additive behavior is activating an unused package-root export, with no current in-repository consumers or broader product-default changes.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

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

@juliusmarminge
juliusmarminge merged commit 1a9336b into pingdotgg:main Sep 10, 2026
22 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 11, 2026
## What's Changed
* fix(ui): simplify multiple linked pull request badges by @maria-rcks in pingdotgg/t3code#11104
* fix(preview): return to pip when closing the right panel by @maria-rcks in pingdotgg/t3code#11102
* fix: quiet settled threads and simplify PR badges by @juliusmarminge in pingdotgg/t3code#11101
* fix(web): emphasize primary pull request actions by @juliusmarminge in pingdotgg/t3code#11105
* fix(web): prevent seams in the topbar scroll fade by @caezium in pingdotgg/t3code#10914
* fix(web): fit provider update text inside sidebar notices by @MatthewFeroz in pingdotgg/t3code#11034
* fix(web): align floating browser preview corners by @caezium in pingdotgg/t3code#10915
* fix(web): save PR body edits with Cmd/Ctrl+Enter by @flamboh in pingdotgg/t3code#10660
* fix(web): collapse a tool call by clicking its expanded label by @maria-rcks in pingdotgg/t3code#11017
* feat(devices): add simulator and emulator support by @juliusmarminge in pingdotgg/t3code#10677
* feat(devices): scope targets and sessions to their hosts by @juliusmarminge in pingdotgg/t3code#10854
* feat(devices): target concurrent agent sessions across hosts by @juliusmarminge in pingdotgg/t3code#10855
* feat(devices): connect simulator hosts over SSH by @juliusmarminge in pingdotgg/t3code#10856
* feat(web): use a compact right-panel surface menu by @maria-rcks in pingdotgg/t3code#11111
* fix(mobile): keep Android markdown icons aligned by @none23 in pingdotgg/t3code#11118
* fix(mobile): add close controls to tablet files and terminal by @juliusmarminge in pingdotgg/t3code#11115
* fix(mobile): preserve the final composer animation frame by @juliusmarminge in pingdotgg/t3code#11114
* fix(mobile): keep composer transitions aligned by @juliusmarminge in pingdotgg/t3code#11127
* refactor(mobile): name shared markdown renderer without iOS suffixes by @SunkenInTime in pingdotgg/t3code#11128
* fix(media): preserve playback during fullscreen transitions by @maria-rcks in pingdotgg/t3code#11113
* fix(marketing): redirect /app to app.t3.codes by @t3-code[bot] in pingdotgg/t3code#11145
* chore(marketing): update to 300k users and 22k stars by @t3-code[bot] in pingdotgg/t3code#11146
* feat(command-palette): show environments in search results by @Cyberlane in pingdotgg/t3code#10722

## New Contributors
* @Cyberlane made their first contribution in pingdotgg/t3code#10722

**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260910.1507...v0.0.41-nightly.20260911.1520

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260911.1520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants