microsoft / microsoft/terminal

Code health: consider splitting Pane class into leaf and parent classes

Open
#3,248 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Idea: Split Pane class into LeafPane and ParentPane, both inheriting from abstract base Pane.

Currently Pane class has many members that are used only in leaf or only in parent mode. IMHO proposed splitting would make the code much cleaner and safer (e.g. from accidentally accessing a terminal when we're not a leaf). There is a long way ahead of panes so this might be worthwhile.

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

No file or test is named. Start by locating the Pane class and tracing its leaf and parent usages to define the abstract interface and separate responsibilities. Done means the two concrete pane modes are split safely without accidental access to leaf-only or parent-only members.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.