microsoft / microsoft/terminal

A windowing mode that allows the Terminal to grow in size as text is output

Open
#12,929 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-TerminalControl Area-Windowing Issue-Feature Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

_The latest from the "I just had a four hour roadtrip so I was brainstorming idly" foundry of showerthougts_

What if there was a way to indicate that we wanted the control to start at 1 line tall, and resize as text was output, till it reached `initialRows` (at which point it would start scrolling). This I think was offhand mentioned by a PM as like, a powertoys run-like UI, and I finally wrapped my head around the idea.

We'd either need to:
* inform the `Terminal` that it's actual viewport size is `initialRows`x`initialCols`, and that it's in this virtual size mode, and it should grow in size to the `initialSize`. `SCREEN_INFO` already does something weird with `virtualBottom`, this might end up being similar. The `Terminal` layer would just keep reporting new buffer sizes until it hit the originally requested size.
* Allow the `TermControl` to fake this out on it's own as it's scrolling? So like, when the `Terminal` says that the scroll position changed, `TermControl` says "mhm sure" and actually just increases it's own height. This implementation was less brainstormed so might not work as well.
* The App layer needs to be able to listen to the size of the TermControl and resize the window to allow it to fit

I'm imagining you combine this with center on launch and with Focus Mode, and a global hotkey, now you've got a PowerToys Run-like box that appears in the center of the monitor, you run some command, and then you {do something to dismiss it. `closeOnFocusLost`?}

Refer also to:
* #5094
* Much more discussion here of "what do we do if a cmdline app wants a resize?". This is similar in the regards that " has asked the `TermControl` to be a different size, how should the `App` & `Window` respond to that"?
* #10660
* But more aggressive. Close on focus lost.
* #9992
* For the sense of a `globalSummon` action to run `wt -w _run` that's got `{focus mode, launch centered, default profile, }` all enabled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the discussion in #5094, #10660, and #9992, then trace how Terminal, TermControl, App, and Window currently communicate viewport and size changes. Compare the proposed SCREEN_INFO approach with the TermControl approach. Done requires an agreed design for growth, scrolling, focus dismissal, and window resizing before implementation can be scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.