diff --git a/apps/mobile/src/components/pr-review/pr-review-entry-screen.test.ts b/apps/mobile/src/components/pr-review/pr-review-entry-screen.test.ts index e589d7b1ee..7c2e33c644 100644 --- a/apps/mobile/src/components/pr-review/pr-review-entry-screen.test.ts +++ b/apps/mobile/src/components/pr-review/pr-review-entry-screen.test.ts @@ -125,6 +125,21 @@ describe('provider-neutral URL field', () => { expect(mocks.push).not.toHaveBeenCalled(); }); + it('keeps the one-line field from wrapping and clipping its placeholder', async () => { + const tree = await renderLoaded(); + const input = propsOf(find(tree, 'TextInput', () => true)); + // The field is one line tall, so Android must not wrap the hint onto a + // second line: the hint's second line was drawn below the field's own + // bounds and clipped at its bottom edge (explorer capture). numberOfLines + // caps the native hint layout at one line instead of wrapping it. + expect(input.numberOfLines).toBe(1); + expect(input.multiline).toBeFalsy(); + // Height comes from min-h-* (see apps/mobile/AGENTS.md), never py-*: + // vertical padding draws the single-line text below the middle. + expect(String(input.className)).toContain('min-h-14'); + expect(String(input.className)).not.toContain('py-3'); + }); + it('shows the clear control only once the field has text', async () => { const before = await renderLoaded(); expect( diff --git a/apps/mobile/src/components/pr-review/pr-review-entry-screen.tsx b/apps/mobile/src/components/pr-review/pr-review-entry-screen.tsx index cf177f2d42..4495f692f7 100644 --- a/apps/mobile/src/components/pr-review/pr-review-entry-screen.tsx +++ b/apps/mobile/src/components/pr-review/pr-review-entry-screen.tsx @@ -275,9 +275,16 @@ export function PrReviewEntryScreen() { inputValueRef.current = value; setHasInput(value.length > 0); }} + // A one-line field: without numberOfLines the native hint wraps + // onto a second line the field's bounds then clip at the bottom + // edge (Android explorer capture). The cap keeps the hint on one + // line; the label above already states what the field takes. + numberOfLines={1} // leading-[normal] so no lineHeight reaches the style: an explicit lineHeight // makes iOS draw the placeholder lower than the typed text (see AGENTS.md). - className="min-w-0 flex-1 bg-transparent py-3 pl-3 pr-1 text-base text-foreground leading-[normal]" + // min-h-14 (not py-3) sizes the field: vertical padding draws the + // single-line text below the middle (see AGENTS.md). + className="min-h-14 min-w-0 flex-1 bg-transparent pl-3 pr-1 text-base text-foreground leading-[normal]" accessibilityLabel={t('prReview.entry.urlAccessibility')} returnKeyType="go" onSubmitEditing={handleSubmit}