Text clipped on right edge when window is tiled narrower than 840px (Wayland/Linux)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Environment
- OS: Arch Linux (Omarchy), Hyprland, native Wayland
- App: T3 Code 0.0.34 (AUR
t3code-bin), Electron,--ozone-platform=wayland
Summary
When T3 Code is tiled to a width below ~840px, text and content on the right side of the window get clipped. Fullscreen or a wide window renders correctly; the clipping only appears once the window is narrower than the app's hard-coded minimum width.
Reproduction
- Open T3 Code on a Wayland tiling compositor (Hyprland).
- Tile it so the window is narrower than 840px (on a 1366px screen, an even two-window split gives each window ~664px).
- Look at chat/composer text near the right edge: glyphs are cut off mid-character and content is hidden past the right edge.
Root cause
The Electron main window is created with a hard-coded minimum size in apps/desktop/dist-electron/main.cjs:
const window = yield* electronWindow.create({
...initialBounds,
minWidth: 840,
minHeight: 620,
...
When the compositor tiles the window narrower than 840px (misc:size_limits_tiled = false, the Hyprland default), the window is allocated at the tiled size, but the renderer still treats its viewport as 840px wide. Content past the visible right edge is clipped.
Same class of bug: https://github.com/openai/codex/issues/40518 ("Wayland tiled window reports Npx viewport while allocated Mpx") — an Electron app's renderer keeps its internal minimum size after the compositor allocates a smaller tiled surface.
Expected behavior
The renderer should match the compositor-allocated size so text reflows (wraps/scrolls) instead of being clipped. If a minimum width is needed, it should not cause content to be cut off when the compositor tiles the window smaller.
Verified
- At tiled width 664px (below the 840px minimum): ~43 rows of text glyphs lie hard against the right window edge — clipped (see screenshot).
- After widening the same window to 864px (above 840): 0 rows clipped. Consistent with the 840px minimum.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop/dist-electron/main.cjs at the Electron window creation call and reproduce the issue under Wayland below 840px, comparing the tiled viewport with a wider window. Trace how the compositor-allocated size reaches the renderer. Done means text reflows or scrolls within the visible tiled window instead of being clipped at the right edge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, linux, typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100