[PR #10772] [DefApp] Teach connection and tab to negotiate initial size #28231

Open
opened 2026-01-31 09:27:10 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/10772

State: closed
Merged: Yes


  • For tabs started from the Terminal, the initial sizing information is
    passed into the connection and used to establish the PTY. Those
    parameters are given over to the OpenConsole.exe acting as PTY to
    establish the initial buffer/window size.
  • However, for tabs started from outside, the PTY is created with some
    default buffer information FIRST as the Terminal hasn't even been
    involved yet. As such, when the Terminal gets that connection, it must
    tell the PTY to resize just as it connects to match the window size
    it's about to use.
  • Ongoing resize operations in the Terminal did and still work fine
    because they transmitted the updated size with the
    ResizePseudoConsole API.

Validation Steps Performed

  • Confirmed existing tabs opening have correct initial size in PTY
    (like with CMD mode con command)
  • Confirmed inbound cmd tabs have correct initial size in PTY via
    mode con command per bug repro

Closes #9811

**Original Pull Request:** https://github.com/microsoft/terminal/pull/10772 **State:** closed **Merged:** Yes --- - For tabs started from the Terminal, the initial sizing information is passed into the connection and used to establish the PTY. Those parameters are given over to the `OpenConsole.exe` acting as PTY to establish the initial buffer/window size. - However, for tabs started from outside, the PTY is created with some default buffer information FIRST as the Terminal hasn't even been involved yet. As such, when the Terminal gets that connection, it must tell the PTY to resize just as it connects to match the window size it's about to use. - Ongoing resize operations in the Terminal did and still work fine because they transmitted the updated size with the `ResizePseudoConsole` API. ## Validation Steps Performed - [x] Confirmed existing tabs opening have correct initial size in PTY (like with CMD `mode con` command) - [x] Confirmed inbound cmd tabs have correct initial size in PTY via `mode con` command per bug repro Closes #9811
claunia added the pull-request label 2026-01-31 09:27:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28231