Skip to content

Pass pixel dimension through terminal resize - #295820

Merged
Anthony Kim (anthonykim1) merged 3 commits into
mainfrom
anthonykim1/passPixelThroughTerminalResize
Feb 17, 2026
Merged

Anthony Kim (anthonykim1) merged 3 commits into
mainfrom
anthonykim1/passPixelThroughTerminalResize

Conversation

@anthonykim1

Copy link
Copy Markdown
Contributor

Resolves: #295819
Similar to xtermjs/xterm.js#5693 adapting to microsoft/node-pty#881

Copilot AI review requested due to automatic review settings February 17, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for passing pixel dimensions (width and height) through the terminal resize flow, enabling more accurate terminal rendering. The changes adapt VSCode's terminal implementation to support the pixel dimension parameters that were recently added to node-pty.

Changes:

  • Extended the resize method signature across all terminal-related interfaces and implementations to accept optional pixelWidth and pixelHeight parameters
  • Modified _updatePtyDimensions in TerminalInstance to extract and pass pixel dimensions from the xterm.js terminal's canvas dimensions
  • Updated the TerminalProcess implementation to construct and pass a pixel size object to node-pty when both dimensions are provided

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vs/workbench/contrib/terminal/electron-browser/localPty.ts Updated LocalPty's resize method to accept and forward pixel dimensions
src/vs/workbench/contrib/terminal/common/terminal.ts Extended ITerminalProcessManager interface with pixel dimension parameters across all setDimensions overloads
src/vs/workbench/contrib/terminal/common/remote/remoteTerminalChannel.ts Modified RemoteTerminalChannelClient to pass pixel dimensions through remote channel
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts Updated TerminalProcessManager's setDimensions and _resize methods to handle pixel dimensions
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts Modified _updatePtyDimensions to extract pixel dimensions from xterm.js canvas and pass them to process manager
src/vs/workbench/contrib/terminal/browser/remotePty.ts Updated RemotePty's resize method to accept and forward pixel dimensions
src/vs/platform/terminal/node/terminalProcess.ts Enhanced TerminalProcess to construct pixel size object for node-pty when dimensions are provided
src/vs/platform/terminal/node/ptyService.ts Updated PtyService and PersistentTerminalProcess to propagate pixel dimensions through the service layer
src/vs/platform/terminal/node/ptyHostService.ts Modified PtyHostService to forward pixel dimensions to the underlying proxy
src/vs/platform/terminal/common/terminal.ts Extended IPtyService, IPtyServiceContribution, and ITerminalChildProcess interfaces with pixel dimension parameters

@anthonykim1
Anthony Kim (anthonykim1) merged commit 92cc50d into main Feb 17, 2026
18 checks passed
@anthonykim1
Anthony Kim (anthonykim1) deleted the anthonykim1/passPixelThroughTerminalResize branch February 17, 2026 21:29
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt resize with pixel

3 participants