[Bug]: Android DeX / windowed desktop clips and overlaps UI text
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Install T3 Code on a Samsung Galaxy Z Fold 4 (or similar foldable).
- Confirm the app looks normal on the unfolded inner screen (fullscreen, tablet-sized).
- Open Samsung DeX and launch T3 Code in a freeform desktop window.
- Look at the Threads sidebar, the thread title in the main pane, and the composer.
Expected behavior
Text should be fully legible. Glyphs should sit in their layout boxes. The split workspace (sidebar + thread) should scale with the window the same way it does on the Fold inner screen. Resizing the DeX window should keep type readable.
Actual behavior
In DeX the UI is in split/desktop layout, but type is vertically clipped and overlapping to the point of being unreadable:
- "Threads" and the active thread title look like stacked/chopped letter fragments.
- Sidebar row titles render as a double-exposed smear rather than a line of text.
- The composer placeholder ("Ask the repo agent, or run a command…") is comparatively readable, while surrounding React Native
Textis not. - The main chat pane does not fill the window the way a desktop-sized surface should; the composer sits as a small pill on a large empty canvas.
This is not "the app is just big because it's a tablet." The same build on this phone's unfolded inner screen is fine. The break appears when the Android app is in a windowed desktop shell (Samsung DeX).
Related: #8135 (Pixel 10a Desktop mode on an external monitor — same clipped/unreadable type and content not filling the window). This report adds:
- Samsung DeX, not only Pixel Desktop
- Galaxy Z Fold 4 inner screen works, so the trigger is windowed/desktop mode rather than large size alone
- Screenshot is 1920×1080 from Android build
F936BXXSCIZG3(Z Fold 4)
Impact
Major degradation or frequent failure
Version or commit
Play Store / device build of T3 Code Android. Reproduced 2026-08-25.
Environment
- Samsung Galaxy Z Fold 4 (
F936B) - Samsung DeX (windowed desktop), screenshot 1920×1080
- Android build
BP2A.250605.031.A3.F936BXXSCIZG3 - Native Android app (not the web client in Chrome)
- Unfolded inner screen: OK
- DeX window: broken
Logs or stack traces
n/a — visual / layout bug, no crash
Screenshots, recordings, or supporting files

Workaround
Use the unfolded inner screen (fullscreen tablet). No DeX workaround found.
Investigation notes (windowed desktop density, not tablet size)
Confirmed this is windowed / multi-display density, not “large screen.” The unfolded Z Fold inner screen is a single display (phone/tablet density matches the window). Samsung DeX and Pixel Desktop put the activity on a different display density than Display.getDefaultDisplay().
Two stacked RN bugs, both present on our mobile stack (RN 0.85.3, react-native-screens 4.25.2, Expo 56):
1. Core RN: PixelUtil uses phone-display density for every dp↔px / sp↔px conversion
DisplayMetricsHolder.initDisplayMetrics() sets windowDisplayMetrics from the activity context (correct for the DeX window), then overwrites screenDisplayMetrics via wm.defaultDisplay.getRealMetrics() — always the phone. PixelUtil (text, layout conversions) reads screen metrics.
On DeX that is typically phone xxhdpi vs window mdpi. Glyphs are painted 2–3× too large for their line boxes → clipped / overlapping type. Native TextInput (Search, composer placeholder) stays readable because EditText uses the view’s own resources.displayMetrics.
Same class of bug: facebook/react-native#56894, facebook/react-native#55659.
2. react-native-screens 4.25.2: Fabric screen frames converted with that same global density
FabricEnabledViewGroup.updateState converts measured px back to dp with PixelUtil.toDIPFromPixel. On DeX the shadow tree is told the screen is windowSize / phoneDensity, so content does not fill the window. Fixed upstream in 4.26.0 (#4160 / #4169); we are still on 4.25.2 (and we already carry a T3 patch on that version).
Why split layout still appears
JS deriveLayout keys off useWindowDimensions() (window dp, which is correct). Width ≥ 720 dp turns on the sidebar. The shell is “tablet,” the pixels are still wrong. Matches “inner screen OK, DeX window broken.”
Likely fix (smallest, no JS layout rewrite)
Expo config plugin on MainActivity, same pattern as withAndroidTabletOrientation.cjs: after onCreate / onResume / onConfigurationChanged, copy the activity resources.displayMetrics density onto DisplayMetricsHolder screen metrics when they differ. No-op on the phone and on the unfolded inner screen.
That corrects PixelUtil globally (text + screens frame math). Optionally later: bump or cherry-pick screens 4.26 density conversion; do not mix that with a screens version bump unless we want that as a separate PR.
Related: #8135 (Pixel Desktop, same failure mode).
Related report #8135 covers the same problem and adds useful evidence.
Both reports concern the native Android app on an external desktop display: glyphs clip vertically, text overlaps, and content occupies only part of the window. The DeX reporter explicitly identifies the Pixel Desktop report as the same failure and provides a working Fold inner-display control. Issue 8195 is the stronger canonical because it preserves that control, distinguishes Text from TextInput and contains the density investigation. This does not establish that the proposed density fix has shipped.
I'm linking the report here before I close it as a duplicate during an automated pass. The source report and its attachments will remain available at #8135.
#8200 is the fix for this report. It also covers the Pixel Desktop symptoms from #8135 (closed as a duplicate of this issue): the entire UI clipped, chat/settings not filling the window, messages cut off, and resize making it worse. Those come from the same DisplayMetricsHolder phone-density miss, not only the Threads title.
This issue is still missing the bug label (the closed duplicate has it). I cannot add labels here.
I can confirm, t3 code is still completely unusable on Samsung Dex, I can't read anything in the UI, it's all badly clipped
We were talking today about how if this worked we could just use our mobile phones at work and just work via Dex for our tasks. Hope we can get this fixed.
Duplicate of #8135: both reports describe vertically clipped/unreadable text and content failing to fill the native Android app window in external-display desktop mode. This report adds Samsung DeX on the Galaxy Z Fold 4 and confirms that the unfolded fullscreen layout works. Closing to consolidate the same symptom; this does not establish that it is fixed. No device reproduction was performed during this duplicate check.
It's closed as a duplicate of #8135 which is marked "Closed as not planned" though, so this is not going to be fixed? No way to use t3 code in DeX mode?