microsoft / microsoft/terminal

Tab bar flickers to a large size momentarily when hitting "enter" with zsh

Open
#3,313 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment

Windows 10.0.18362.0

Steps to reproduce

  1. Launch WSL zsh shell
  2. Hit enter

Expected behavior

Tab size remains consistent

Actual behavior

Tab size flickers in response to input in shell.

In other shells, the tab resizes frequently in response to a change in the title text to adapt to the size of it. It seems like zsh has some way to detect a maximum size and truncates it, but not before WSL has rendered the update.

Even in other shells that don't flicker, the "adaptive" behavior seems very strange; e.g. when I change directories it resizes the tab, causing frequent visual distraction as the UX is reorganized each time the shell title changes.

I am not sure if this behavior is intentional, but I think having a fixed, consistent tab size is a much better user experience then trying to adapt to the title as it changes. For example the way Chrome works is pretty sensible; use a larger size until there are too many tabs then shrink them all, but each tab should probably always be the same size -- or at least not change while someone's actively using the shell, as would be common when someone has a title that reflects the current directory which changes often.

windows-terminal-flicker

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 reproducing the flicker in a WSL zsh shell on Windows 10, then trace the tab-sizing update triggered by shell input and title changes. Done means the tab no longer momentarily grows when pressing Enter and its size remains consistent while the shell title changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
zsh
Domain
cli, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.