Skip to content

fix(mobile): prevent collapsed composer hint clipping - #5052

Open
Kapish14 wants to merge 2 commits into
pingdotgg:mainfrom
Kapish14:fix/android-composer-placeholder-clipping
Open

Kapish14 wants to merge 2 commits into
pingdotgg:mainfrom
Kapish14:fix/android-composer-placeholder-clipping

Conversation

@Kapish14

@Kapish14 Kapish14 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Limit the Android composer editor to one line while it is in the collapsed, vertically centered state.
  • Ellipsize overflowing collapsed text at the end.
  • Restore unlimited lines and remove ellipsizing when the composer expands.

Why

On narrow Android screens, the collapsed composer placeholder could wrap onto a second line inside its fixed-height pill. The second line was clipped by the container. Keeping the native editor to one line in its existing singleLineCentered state prevents the clipped text without changing expanded multiline editing.

UI Changes

Before

Before

After

After

Validation

  • Verified the collapsed placeholder is a single ellipsized line on a physical Android device (CPH2707).
  • Verified a focused composer expands and wraps a long draft over multiple lines.
  • :t3-composer-editor:compileDebugKotlin
  • :app:assembleDebug
  • Mobile typecheck
  • Mobile tests: 580 passed
  • Mobile native static check

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (not applicable; no motion behavior changed)

Note

[!NOTE]

Fix hint text clipping in collapsed mobile composer by restricting to single line with ellipsis

In T3ComposerEditorView.kt, the setCentered method now sets maxLines = 1 and ellipsize = TextUtils.TruncateAt.END when the composer is in centered (collapsed) mode, truncating overflow text instead of clipping it. When not centered, maxLines reverts to Int.MAX_VALUE and ellipsize is cleared.

Macroscope summarized b57e616.


Note

Low Risk
Small, localized Android native UI change in collapsed composer layout only; no auth, data, or expanded-editor behavior changes.

Overview
Fixes clipped placeholder/hint text on narrow Android screens when the composer is collapsed in its fixed-height pill.

Android T3ComposerEditorView: setSingleLineCentered already toggles vertical gravity; it now also sets maxLines = 1 and TextUtils.TruncateAt.END when centered (collapsed), and restores Int.MAX_VALUE lines with no ellipsize when expanded. Collapsed text stays on one line with trailing ellipsis instead of wrapping into a second line that the container clips.

Expanded multiline editing behavior is unchanged.

Reviewed by Cursor Bugbot for commit b57e616. Bugbot is set up for automated code reviews on this repo. Configure here.

Closes #10860

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

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: a1fd5fac-091c-4a25-a453-e9761423ed6d

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 30, 2026
@Kapish14
Kapish14 marked this pull request as ready for review July 30, 2026 22:51
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved a344b1a

This is a simple, self-contained UI bug fix that adds standard Android text properties (maxLines, ellipsize) to properly handle text overflow in the collapsed composer hint view. The change has clear intent, limited scope, and no side effects beyond the intended visual improvement.

You can customize Macroscope's approvability policy. Learn more.

@none23

none23 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Would love to see it land
The issue is still present on main @ 85f2479
image

Sowyu pushed a commit to Sowyu/t3pretzel that referenced this pull request Sep 15, 2026
Fixes reproduced on an Android emulator and from upstream reports.

Feed: Android stops drawing a text view past the GPU's maximum texture
height, so a long list rendered as one selectable Text lost its tail and
took seconds per frame to draw. Long lists now split into 40-item chunks.
Wide assistant markdown blocks keep a pinned width; the feed reserves
bottom padding.

Keyboard: the feed re-pins after keyboard transitions settle and when the
composer collapses; the back gesture collapses the composer; sticky
composers only follow the keyboard after a fresh show or real focus
(upstream pingdotgg#8212).

Terminal: hardware Enter no longer moves focus off the terminal; keyboards
that use deleteSurroundingText (FUTO) send Backspace; forward delete works.

Also: stream haptics no longer buzz every 320ms on Android and all haptics
use the system engine; thread settings apply on tap without Save; typed
pairing codes are normalized to the server format; non-git projects fall
back to the current checkout instead of a dead worktree default; user CA
certificates are trusted; Ctrl/Cmd+Enter sends from a hardware keyboard;
thread rename, project favicons in the filter, tablet sidebar toggle,
desktop-window density, route titles, Material You review colors, bottom
gesture-bar insets, and the composer placeholder clipping (upstream PRs
pingdotgg#11503, pingdotgg#11370, pingdotgg#11339, pingdotgg#8200, pingdotgg#8717, pingdotgg#11445, pingdotgg#6003, pingdotgg#5052, pingdotgg#8362, pingdotgg#10709,
pingdotgg#11611, pingdotgg#8800, adapted).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 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]: Android composer placeholder wraps to a second line that renders outside the input's rounded border

2 participants