Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The compact mobile editor now adjusts its horizontal insets for RTL layouts to avoid overlapping the model button. The change is limited to positioning and preserves LTR and expanded-editor behavior. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Calculate compact editor insets apps/mobile/src/features/threads/compactEditorInsets.ts, apps/mobile/src/features/threads/compactEditorInsets.test.ts |
The worklet calculates insets from slot and row geometry and swaps them for RTL. Tests cover LTR and RTL inputs. |
Use measured insets in ThreadComposer apps/mobile/src/features/threads/ThreadComposer.tsx |
When the editor is compact, ThreadComposer passes measured geometry and the current layout direction to the helper. Expanded positioning remains 14 points from each side. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- pingdotgg/t3code#24303: Both changes address separation between composer controls, although the issue concerns iOS and this change concerns RTL Android.
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to 26ab7
-
No concrete merge-blocking defect was established in the compact editor positioning change.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Problem
On an Android phone set to Arabic, the empty composer draws "Ask anything" on top of the model button, and the caret sits in the wrong place.
The compact composer places its text box over an empty slot in the row. It measures the slot with
onLayout, which gives x from the left edge, and then setsleftandrightfrom it. In RTL, React Native swapsleftandrightstyles by default, so the box lands in the mirrored spot, over the model button.To reproduce: set the phone language to Arabic, open New thread, look at the composer.
Change
The inset math moves into a small worklet helper,
compactEditorInsets. WhenI18nManager.isRTLis true it swaps the two insets, so the box lands back over its slot. LTR and the expanded composer are unchanged.Scope and approval
Small fix for an obvious layout bug: one composer, one helper and its test, no change outside RTL. It is separate from #23587, which handles text direction, not this placement.
Verification
vp test run --project unit src/features/threads/compactEditorInsets.test.tspasses. The RTL case fails with the old math.vp fmt --check,vp lintandtsc --noEmitare clean.Written with Claude Opus 5.5 in Claude Code in T3 Code.