Skip to content

[Bug]: Shared terminal is clipped when desktop and native Android use different sizes #14463

Description

@yqecea

Area

apps/server, apps/mobile, apps/web

Steps to reproduce

  1. Connect the native Android app and a desktop client to the same T3 environment.
  2. Open the same terminal in both clients, with substantially different widths.
  3. Run a full-screen terminal CLI. My normal use case is running agent harnesses such as Devin or OpenCode directly in the terminal.
  4. Resize either client or open the phone keyboard, leaving both terminals attached.

Expected behavior

Both clients remain usable. The terminal should have a defined policy for its shared PTY dimensions, and attached renderers should agree with those dimensions. The smaller client should be able to see the whole TUI, for example by using a shared grid with scrolling or an explicit size owner.

Actual behavior

The TUI fits one device but is clipped or leaves an unexpectedly narrow layout on the other. A desktop-sized TUI can be cut off on Android; after the phone resizes it, desktop output can stay constrained to the phone's columns.

Impact

Major degradation when moving between desktop and phone while keeping an agent session alive.

Environment and evidence

The original report is from the native Android app, not a mobile browser. The exact installed mobile version is unknown. Source inspection used main at c2fa9fc.

The server currently keeps one cols/rows pair per terminal. openOrAttachForStream and resizeLocked in apps/server/src/terminal/Manager.ts resize that shared PTY to the requesting client's dimensions. TerminalResizeInput has no client identity or size ownership, and there is no geometry-change event that makes the other renderer adopt the new grid.

The existing server test "resizes running terminal on open when a different size is requested" confirms the last-attaching-client behavior. In an isolated web dev environment I attached two views to the same terminal, left one surface 1146px wide and narrowed the other to 430px. Running stty size from the wide view reported 15 54, consistent with the narrow client's PTY width. This is browser evidence for shared server behavior, not native Android verification.

This report is separate from Android Backspace #8253 and per-key echo latency #12756. Incremental output and input batching work in #11235 and #9456 may help latency, but do not establish shared terminal geometry.

Workaround

Only keep one terminal view attached at a time. This defeats seamless desktop/phone use.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions