Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): Keep the last line of iOS assistant replies visible #8220

Closedmwolson(GitHub profile, opens in a new tab)wants to merge 250+ commits intot3code/codex-turn-mapping fromrefs/pull/8220/headopened View on GitHub

Long iOS markdown replies were reported to clip their last line on first open. The native view now lays out its text container at the current width before drawing, and the React wrapper uses the native line count as a minimum height, including Dynamic Type scaling.

Rebased onto v2 (07e8f8d40d). The current wrapper exposes a typed onNativeTextLayout callback only on the iOS native path; the React Native fallback paths omit it. Mike's native layout and height-floor changes are preserved.

Verification at e2b1c77f9b7f:

  • The signed iOS simulator build passes on iPhone 17e / iOS 26.5.
  • The focused TypeScript check, formatting, and React Doctor pass. Targeted lint has one unchanged warning in the existing child traversal.
  • The real app opens three completed synthetic replies: 6,305 characters with headings, 495 characters with lists/code/quote, and 9,286 characters of plain text. All three show their final sentence on both the v2 baseline and this head. The heading sample also passes at accessibility-large Dynamic Type.
  • The reported clipping did not reproduce on the current v2 baseline. These comparisons establish basic rendering compatibility; they do not yet prove the fix's benefit. Hold for a reproducible affected thread before landing.
  • CI still has the shared v2 formatting, migration expectation, dependency patch-resolution, and provider-replay failures. No current-head CI pass is claimed. The workflow's native static-analysis job is skipped for this Objective-C++ change.

Both builds used the same disposable backend, synthetic conversations, simulator, and Metro setup. Two untracked resolution-only shims worked around v2's existing .js imports of TypeScript sources. The markdown implementation came directly from each compared commit. Streaming, a physical device, and wider layouts were not verified.

Before: v2 07e8f8d40dAfter: e2b1c77f9b7f
Before: complete final sentence on current v2After: complete final sentence with native layout fix
Large Dynamic Type comparison
Before: v2After: prepared PR
Before: full last sentence at large Dynamic TypeAfter: full last sentence at large Dynamic Type

Recording: first open on the prepared iOS build (8 seconds).

Original implementation by Mike Olson. Preparation: GPT-6 via Codex.

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: b4879da9-c4d0-49e8-b779-ed7b703918bd

      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

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. mwolson(GitHub profile, opens in a new tab) changed the title

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at e2b1c77

      Macroscope's review found this PR approvable — This is a focused iOS rendering fix that forces current text layout measurement and reserves height for all rendered reply lines. The changes are confined to the existing markdown component and do not alter APIs, defaults, security-sensitive code, or deployment behavior.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium src/NativeMarkdownSelectableText.ios.tsx:199

      When the available width grows without changing runSignature, minHeight retains the height measured at the narrower width, so the markdown row keeps stale blank space and can distort list or scroll layout. The monotonic update at line 199 ignores smaller onTextLayout results; replace the cached value with the current measurement (or reset it when the layout width changes).

      ✅ Resolved in 3d92556cb354cdf7df56342b584ab5b88106682b

    6. mwolson(GitHub profile, opens in a new tab) changed the title

    7. Applied. onTextLayout now assigns the current measurement instead of only growing, and the runSignature reset is gone. Simulator first-open of the M5 Max vs Ultra thread still shows the last sentence.

    8. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    9. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      There are 2 total unresolved issues (including 1 from previous review).

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3d92556cb354cdf7df56342b584ab5b88106682b. Configure [here](https://www.cursor.com/dashboard/bugbot).
    10. juliusmarminge closed this

    11. Closing as part of the open-PR backlog sweep (wave 1).

      Reason: 1096-file / 391k-line contaminated rebase for a one-line iOS clip

      Reopen if this is still wanted and you’re willing to rebase onto current main.

Sign in to join this conversation.