Skip to content

fix(mobile): select across quoted paragraphs on iOS - #14628

Open
hcaiano wants to merge 4 commits into
pingdotgg:mainfrom
hcaiano:t3code/fix-ios-text-selection
Open

hcaiano wants to merge 4 commits into
pingdotgg:mainfrom
hcaiano:t3code/fix-ios-text-selection

Conversation

@hcaiano

@hcaiano hcaiano commented Oct 1, 2026 •

Copy link
Copy Markdown

iOS text selection stops at the first paragraph of a blockquote because each paragraph owns a separate native text view. Dragging a selection handle or choosing Select All cannot copy a quoted email with several paragraphs.

On iOS, group consecutive plain blockquote children using the existing document chunker, so paragraphs and lists share one native selection region. The quote border remains on the parent; code, tables, images and nested quotes keep their dedicated rendering. Keep list indentation local to the quote, preserving paragraph boundaries within list items and the alignment of continuation paragraphs. Quoted paragraphs use the same spacing as normal Markdown paragraphs. Android keeps its existing blockquote and list renderer because selectable-text paragraph indents are implemented only on iOS.

Fixes #14288. This follows the maintainer triage and intended scope.

Before / after

On an iPhone 17 Pro simulator running iOS 26.5, using a local development client and isolated test state:

  1. Long-press a word in the first body paragraph of a quoted email.
  2. Drag the trailing selection handle toward the signature. Before the fix it stays within the starting paragraph; after the fix it crosses into the next paragraph. Native Copy confirms the selected text spans both paragraphs.
  3. Choose Select All and Copy. Before the fix the clipboard contains only the starting paragraph; after the fix it contains the complete email, matching the normal-paragraph control.
Before: Select All selects one paragraph After: Select All selects the full email
Before After

Selection-handle recordings: before (6 seconds), after (14 seconds). Evidence is hosted on the fork; no screenshots or videos are committed.

Verification

  • vp test run apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.test.tsx apps/mobile/src/lib/nativeMarkdownText.test.ts: 64 tests passed. Regression coverage checks native selection boundaries, rich-block separation, local indentation for quotes inside outer lists, multi-paragraph list items and preservation of the dedicated Android list renderer. Each new regression was confirmed to fail before its corresponding fix and pass afterward.
  • Targeted lint and formatting passed for the four changed files.
  • vp run typecheck in apps/mobile passed.
  • Native iOS simulator verification reproduced the original failure and confirmed cross-paragraph selection plus full-email clipboard contents after the fix. Ordinary paragraphs already supported full-email selection before the fix.

The new blockquote grouping applies only to iOS. Android retains its existing blockquote rendering and was not tested on a device; its renderer path is covered by a regression test. Selection still stops at separate rich blocks. Web and desktop use a different renderer and are unaffected. No protocol, provider or dependency changes.

Model: GPT-6.1-Sol. Harness: Codex in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 1, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 1, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7e32f98

Macroscope's review found this PR approvable — This is a focused mobile markdown bug fix that groups iOS quoted paragraphs for native selection while preserving rich-block boundaries and Android rendering. Production changes are localized and accompanied by targeted regression tests, with no schema, infrastructure, security, billing, default, or static-analysis configuration impact.

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

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b9d74912-3167-455c-966b-b520e0041bd0

📥 Commits

Reviewing files that changed from the base of the PR and between e142c25 and 7e32f98.

📒 Files selected for processing (4)
  • apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.test.tsx
  • apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.tsx
  • apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts
  • apps/mobile/src/lib/nativeMarkdownText.test.ts

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


📝 Walkthrough

Walkthrough

Blockquotes now group consecutive selectable content into chunks on iOS. Other platforms render blockquote children as rich chunks. Later paragraphs in list items receive a list break, spacing, and hanging indents. Tests cover blockquote regions and list paragraph runs.

Changes

Blockquote selection and list paragraph rendering

Layer / File(s) Summary
Build list paragraph runs
apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts, apps/mobile/src/lib/nativeMarkdownText.test.ts
Later paragraphs in list items now receive a list break, spacing, and hanging indents. The document-runs test checks paragraph order and the second paragraph's indents.
Group selectable blockquote content
apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.tsx, apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.test.tsx
iOS blockquotes use document chunks; other platforms render children as rich chunks. Tests cover grouping across paragraphs, boundaries around code blocks and nested quotes, and quoted-list regions.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 7e32f

No actionable merge-blocking risk is established. The change groups selectable iOS quote content while retaining rich-block boundaries and non-iOS rendering. Android device validation remains unreported, but this alone does not establish a regression.

🚥 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 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy the coding requirements in [#14288]. On iOS, NativeMarkdownBlock uses nativeMarkdownDocumentChunks for consecutive plain blockquote children, so paragraphs share one selectable…
Out of Scope Changes check ✅ Passed The changes stay within [#14288] and the apps/mobile scope. The production changes implement iOS blockquote selection grouping and preserve list and rich-block rendering. The added tests verify thos…
Title check ✅ Passed The title clearly describes the primary change: enabling iOS text selection across quoted paragraphs.
Description check ✅ Passed The description includes all required sections. It explains the problem, implementation, scope, maintainer approval, verification results, UI evidence, platform limitations, and agent details.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Oct 1, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 2, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 2, 2026 05:40

Dismissing prior approval to re-evaluate 7e32f98

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

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 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]: iOS text selection stops at the first paragraph of a blockquote

2 participants