tui-cs/Terminal.Gui
53.8
Adequate · 12 November 2026
148k
lines of production code
C#
primary language
6
measurements over time
What this system is
Features
Add Kitty graphics protocol support alongside Sixel
Terminal.Gui now supports the Kitty graphics protocol for rendering images in compatible terminals (Kitty and Ghostty), running in parallel with the existing Sixel support. This change introduces a new detection mechanism that identifies support via environment variables (KITTY\_WINDOW\_ID, TERM\_PROGRAM) and calculates pixel-per-cell resolution, as well as an encoder that transmits images using Kitty's APC escape sequences. Users gain access to flash-free panning and zooming capabilities by leveraging Kitty's placement-based image updates, which replace full re-transmissions with lightweight placement crops.
Terminal.Gui/Drawing/Kitty · high confidence
Add OutputView script for generating static view documentation
A new \OutputView\ script has been added to the \docfx/scripts\ directory to facilitate the generation of documentation assets for Terminal.Gui views. This tool allows users to capture the visual output of specific views as static text or ANSI HTML, supporting options to control screen dimensions, enable live mode, and query demo key strokes. It integrates with the new ANSI driver and configuration system to ensure consistent rendering for documentation purposes.
docfx/scripts/OutputView · high confidence
Add collection search matcher
Introduces a new CollectionNavigation component that enables users to navigate lists, tables, and trees by typing characters to filter and select items. This feature adds a \CollectionNavigator\ and associated interfaces (\ICollectionNavigator\, \ICollectionNavigatorMatcher\) that build a search string from keystrokes to find matching items in a collection, with a default matcher that performs case-insensitive prefix matching on object strings.
Terminal.Gui/Views/CollectionNavigation · high confidence
Added code cleanup automation scripts for C\# source files
New command-line tools have been added to the Scripts directory to automate C\# code formatting and structure. The BackingFieldReorderer script uses Roslyn to analyze C\# files and move backing fields (fields starting with '\_') to immediately precede their corresponding properties, improving code readability. The PartialSplitter script analyzes class members using naming pattern heuristics (e.g., Mouse, Keyboard, Drawing) and splits large classes into multiple partial files based on semantic grouping and a minimum line-count threshold, helping to manage file size and organization.
Scripts/BackingFieldReorderer, Scripts/PartialSplitter · high confidence
Added config migration tool for pre-MEC settings
A new standalone \migrate-tui-config\ utility has been added to the \Tools/MigrateConfig\ directory to help users convert legacy flat-key \config.json\ files into the new nested MEC-native schema. This tool transforms dotted keys (e.g., \Button.DefaultShadow\) into nested objects and converts \Themes\/\Schemes\ arrays of single-key objects into dictionaries, ensuring compatibility with the \TuiConfigurationBuilder\. It is a one-time migration aid and is not included in the shipping library.
Tools · high confidence
Added documentation and verification scripts for the \`tuirec\` terminal recording tool
This change introduces the \Scripts/tuirec\ directory, providing a comprehensive guide for recording Terminal.Gui applications as GIFs using the \tuirec\ Go CLI, along with Python scripts to automatically verify the behavior of the Inline Transcript scenario. The new \verify-inline-output.py\ script checks message ordering and mouse reporting, while \verify-inline-resize.py\ and \verify-inline-resize-tmux.py\ validate that inline live regions and transcript history are preserved correctly during terminal resizes on Windows (ConPTY) and Linux/macOS (tmux) respectively.
Scripts/tuirec · high confidence
Adds AI agent configuration files and v1-to-v2 migration guidance
Introduces \.aider.md\, \.cursorrules\, \.windsurfrules\, \AGENTS.md\, and \CLAUDE.md\ to provide structured guidance for AI coding agents. These files establish a critical 'Discard v1 Training Data' protocol, warning that pre-2025 knowledge is incorrect for the v2 rewrite. They document the new instance-based application lifecycle (\Application.Create().Init().Run\<T\>().Dispose()\), replace legacy patterns (e.g., \Application.Top\, \Toplevel\, \Clicked\ events) with modern equivalents (\Runnable\, \Viewport\, \Accepted\ events), and enforce specific C\# 14 coding conventions such as target-typed \new ()\, collection expressions, and Allman brace style.
(repo-wide) · high confidence
Adds localization resources and a ResourceManager fallback wrapper
The Terminal.Gui library now includes a comprehensive set of localized string resources for the FileDialog, Wizard, and other UI components in English, French (fr-FR), Japanese (ja-JP), Portuguese (pt-PT), and Simplified Chinese (zh-Hans). To ensure these strings are always available, a new \ResourceManagerWrapper\ class has been introduced to handle resource lookups with a fallback to the invariant culture when a specific translation is missing. This change provides the localization infrastructure for the UI, while the actual configuration schema and key bindings are managed in other parts of the codebase.
Terminal.Gui/Resources · high confidence
Automated documentation build and AI agent source indexing
The documentation build process now includes a new PowerShell script that generates a Vercel-style file path index of all Terminal.Gui source files and documentation, injecting this index into AGENTS.md to support AI agent retrieval-led reasoning. The build script also automates the generation of the views documentation by running an OutputView tool to extract API details and using tuirec to record GIF demonstrations for each view, ensuring the docs stay synchronized with the codebase.
docfx/scripts · high confidence
Images scenario now supports raster graphics with protocol selection and color palette algorithms
The Images scenario has been updated to demonstrate raster image rendering alongside cell-based rendering. Users can now toggle raster mode, select between Kitty and Sixel protocols, and enable true-color or async rendering. The scenario includes a new Doom Fire animation, a test card for visual verification, and configurable color distance (CIE76) and palette building (Median Cut, Const) algorithms to control image quality and color reduction.
Examples/UICatalog/Scenarios/Images · high confidence
Introduce CharMap view for browsing Unicode codepoints
Added a new CharMap view that displays a scrollable grid of Unicode characters, including support for non-BMP ranges and integration with the ucdapi.org API for fetching character metadata. The view provides keyboard and mouse navigation for selecting and accepting codepoints, with fixed row and column headers.
Terminal.Gui/Views/CharMap · high confidence
Introduce DotNetDriver as the modern .NET console input/output implementation
The DotNetDriver location now provides a complete, modernized driver stack for .NET console applications. This includes NetInput for reading console events with support for mouse reporting and bracketed paste, NetOutput for UTF-8 aware rendering and cursor management, and supporting components like NetComponentFactory, NetInputProcessor, and NetKeyConverter. The driver gracefully handles scenarios where no terminal is attached (e.g., unit tests or redirected I/O) by degrading to no-op output and default sizes, ensuring stability in non-interactive environments.
Terminal.Gui/Drivers/DotNetDriver · high confidence
Introduce IRunnable interface and session management architecture
The framework introduces a new \IRunnable\ interface and associated \SessionToken\ classes to manage application sessions. This change replaces the previous \Toplevel\-centric model with a stack-based session system (\IApplication.SessionStack\) that supports nested, modal, and cancellable work patterns. Users can now run self-contained blocking sessions with their own lifecycle, event loop iteration, and focus management, allowing for more complex application structures where multiple views can be stacked and managed dynamically.
Terminal.Gui/App/Runnable · high confidence
Introduce inline rendering mode and modern instance-based application model
Terminal.Gui now supports an 'Inline' application model, allowing applications to render within the primary terminal scrollback buffer instead of occupying the full alternate screen buffer. This is configured via the new \AppModel\ enum and \Application.AppModel\ property. Additionally, the library introduces a modern, instance-based application lifecycle via \Application.Create()\ and \IApplication\, replacing the legacy static \Application.Init()\ pattern. This new model provides thread-local events for parallel test isolation, awaitable UI dispatch with \InvokeAsync\, and session-aware state management.
Terminal.Gui/App · high confidence
Introduce pure ANSI driver for cross-platform terminal I/O
A new ANSI driver has been added to Terminal.Gui, providing a unified, cross-platform implementation for terminal input and output. This driver replaces platform-specific legacy drivers with a single codebase that uses Virtual Terminal (VT) sequences on Windows and raw Unix I/O on macOS/Linux. It supports both Full Screen and Inline application modes, handles terminal size detection via native OS queries or ANSI escape sequences, and includes robust fallback to degraded mode when no terminal is attached (e.g., in CI/CD environments). The implementation also introduces support for the Kitty Keyboard Protocol, bracketed paste, and SGR mouse events, ensuring consistent behavior across all supported platforms.
Terminal.Gui/Drivers/AnsiDriver · high confidence
Introduce read-only Markdown view with syntax highlighting and theme-aware styling
Adds a new read-only Markdown rendering component that supports CommonMark and GitHub Flavored Markdown, including fenced code blocks with syntax highlighting via TextMateSharp. The implementation introduces a pluggable \ISyntaxHighlighter\ interface and a default \TextMateSyntaxHighlighter\ that maps VS Code themes to terminal colors, ensuring code block backgrounds and token colors adapt to the active theme. It also adds semantic styling roles (headings, emphasis, links, tables, task lists) and helper classes to resolve visual attributes consistently across the view.
Terminal.Gui/Drawing/Markdown · high confidence
Introduces ANSI escape sequence request tracking infrastructure
Adds new utility classes (\EscSeqReqStatus\, \EscSeqRequests\) to the ANSI handling layer to manage the lifecycle of terminal requests. This infrastructure allows the terminal driver to track outstanding requests (such as cursor position queries) by their escape sequence terminators, ensuring that responses are correctly matched and processed, which resolves issues with inline mode cursor positioning and other request-based interactions.
Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils · high confidence
Introduces Cancellable Work Pattern (CWP) helper classes and event arguments
Adds a new \Terminal.Gui.App.CWP\ namespace containing helper classes (\CWPEventHelper\, \CWPPropertyHelper\, \CWPWorkflowHelper\) and event argument types (\CancelEventArgs\, \EventArgs\, \ResultEventArgs\, \ValueChangedEventArgs\, \ValueChangingEventArgs\). These components provide a standardized framework for executing event-driven workflows that support cancellation, result production, and property change modification, allowing developers to implement consistent pre- and post-change logic across the library.
Terminal.Gui/App/CWP · high confidence
Introduces LineCanvas for automatic box-drawing and line-art composition
Adds a new \LineCanvas\ class in \Terminal.Gui.Drawing\ that automatically resolves intersections between horizontal and vertical lines to produce correct Unicode junction glyphs (T-junctions, crosses, corners, etc.). The component includes supporting types such as \StraightLine\, \LineStyle\ (supporting single, double, heavy, dashed, dotted, and rounded variants), and \IntersectionType\ to define line geometry and intersection semantics. It provides features for merging canvases across view boundaries, excluding specific cells from output, and reserving positions for multi-canvas compositing, enabling seamless border and frame layouts without manual glyph calculation.
Terminal.Gui/Drawing/LineCanvas · high confidence
Introduces configurable color palette building with similarity thresholds
Terminal.Gui now includes a new quantization subsystem in the Drawing namespace that allows for more accurate color palette generation. This change adds interfaces for palette building (IPaletteBuilder, IStaticPaletteBuilder) and a concrete implementation, PopularityPaletteWithThreshold, which groups similar colors based on a configurable distance threshold. This prevents underrepresented colors from being missed during palette reduction, improving the visual fidelity of images processed by the library.
Terminal.Gui/Drawing/Quant · high confidence
Introduces generic FlagSelector and OptionSelector views
Adds new \FlagSelector\ and \OptionSelector\ components (including generic \TEnum\ variants) to the Terminal.Gui library, replacing the legacy \RadioGroup\ and providing type-safe interfaces for selecting single options or multiple flags via checkboxes. These views implement specific keyboard behaviors—such as using Enter to accept without toggling for flags—and manage their internal checkbox state through a new \SelectorBase\ class.
Terminal.Gui/Views/Selectors · high confidence
Introduces new ScrollBar, ScrollButton, and ScrollSlider views
Adds a new set of terminal GUI components for scrollable content: \ScrollBar\, \ScrollButton\, and \ScrollSlider\. The \ScrollBar\ acts as a container for two directional \ScrollButton\s and a draggable \ScrollSlider\, supporting both vertical and horizontal orientations via the \IOrientation\ interface. The \ScrollButton\ handles mouse hold-repeat for continuous scrolling and automatically updates its arrow glyph based on orientation and direction. The \ScrollSlider\ represents the proportion of visible content to the viewport and can be dragged to control scroll position. These views are designed to be used with the \ViewportSettings\ flags to enable built-in scrollbars on \View\ instances.
Terminal.Gui/Views/ScrollBar · high confidence
Introduces new Terminal.Gui view controls and modernizes existing ones
This release adds several new view controls to the library, including Bar (a container for Shortcut items used by menus and status bars), Code (a read-only syntax-highlighted code viewer), and DropDownList (a combo-box combining a text field with a popover list). It also introduces CheckState as a dedicated enum for CheckBox state management and adds a new CodeRoleLegendHighlighter for visual role demonstration. Existing controls have been modernized: Button now uses Dim.Auto for sizing and supports mouse hold-repeat; CheckBox uses the new CheckState enum and Dim.Auto; DatePicker uses Dim.Auto and supports culture-specific formatting; Dialog and Dialog\<TResult\> use Dim.Auto sizing, are centered by default, and support custom result types via the Runnable interface.
Terminal.Gui/Views · high confidence
Modernized Adornment architecture with lazy rendering and view arrangement
The Adornment system (Margin, Border, Padding) has been refactored to use a lightweight settings layer (\AdornmentImpl\) that defers the creation of the full rendering view (\AdornmentView\) until it is actually needed. This lazy initialization reduces overhead for views that do not use adornments. Additionally, the \Border\ adornment now supports a new 'Arrange Mode', allowing users to move and resize views via mouse drag or keyboard commands, with visual arrangement buttons appearing on the border during interaction.
Terminal.Gui/ViewBase/Adornment · high confidence
Modernized View base class with CWP-compliant events, command system, and transparency support
The View base class has been refactored to support a new Cancellable Work Pattern (CWP) for property changes and events, introducing new event argument types like DrawAdornmentsEventArgs, DrawEventArgs, and AdvanceFocusEventArgs. A new command system (View.Command.cs) allows views to register and invoke commands with context, supporting features like activation, acceptance, and paste. Transparency support is enhanced via DrawContext, which tracks drawn regions to allow underlying views to show through. Orientation support is added via IOrientation and OrientationHelper. Content size can now be set independently for width and height, enabling virtual scrolling. Adornments (Margin, Border, Padding) are now fully integrated with the new layout and redraw system.
Terminal.Gui/ViewBase · high confidence
New ANSI input handling subsystem for keyboard and mouse events
The Terminal.Gui ANSI driver now includes a dedicated subsystem for parsing and encoding ANSI escape sequences for keyboard and mouse input. This adds new components to handle keyboard parsing (including Kitty Keyboard Protocol support), mouse event parsing (SGR 1006 format), and request scheduling for terminal responses. The system provides robust handling of ANSI escape sequences with bounds checking to prevent memory issues, supports bracketed paste, and enables proper encoding of key events back to ANSI sequences for test input injection.
Terminal.Gui/Drivers/AnsiHandling · high confidence
New AnimationScenario demonstrates animated GIF rendering with Braille output
The UICatalog application now includes a new AnimationScenario that demonstrates how to render animated images using threading. The scenario loads a spinning globe GIF, decodes its frames, and renders them as Unicode Braille characters in the terminal. It also includes a link to the original image source with a tooltip showing the URL.
Examples/UICatalog/Scenarios/AnimationScenario · high confidence
New Character Map scenario for Unicode exploration
Adds a new Character Map scenario that demonstrates building a custom control for viewing and selecting Unicode characters. This scenario illustrates infinite scrolling, custom table styling with header color getters, and keyboard navigation, serving as a reference for implementing complex UI layouts and Unicode rendering in Terminal.Gui applications.
Examples/UICatalog/Scenarios/CharacterMap · high confidence
New FileServices library for file dialogs
Terminal.Gui introduces a new FileServices library that provides the core infrastructure for the FileDialog, including file system tree building, search matching, and visual customization. This adds new components such as FileSystemTreeBuilder for safe directory traversal, DefaultSearchMatcher for case-insensitive file filtering, FileSystemColorProvider and FileSystemIconProvider for styling files and folders, and IFileOperations to handle file management actions like delete, rename, and create new items.
Terminal.Gui/FileServices · high confidence
New GraphView component for terminal charts
Adds a new GraphView control that enables rendering bar, scatter, and line graphs directly in the terminal. The implementation includes configurable X and Y axes with customizable labels, tick increments, and titles, as well as support for scrolling via keyboard commands. Users can add data series (BarSeries, ScatterSeries) and overlay annotations such as legends, text labels, and connecting paths to enhance data visualization.
Terminal.Gui/Views/GraphView · high confidence
New JSON serialization infrastructure for configuration
Terminal.Gui/Configuration now includes a comprehensive set of JSON converters and a source-generation context to support robust configuration loading and AOT compatibility. This change introduces converters for core types such as Color, Attribute, Scheme, Key, KeyCode, Rune, and TraceCategory, enabling them to be serialized and deserialized from JSON configuration files. It also adds converters for complex structures like Dictionary and ConcurrentDictionary, as well as arrays of Key and MouseFlags. The new TuiSerializerContext and SourceGenerationContext leverage System.Text.Json source generation to avoid runtime reflection, ensuring compatibility with NativeAOT and self-contained deployments while providing a consistent, case-insensitive, and comment-tolerant JSON parsing experience for the application's configuration system.
Terminal.Gui/Configuration · high confidence
New LinearRange view family with single, multi, and span selection modes
The Terminal.Gui library introduces a new family of linear range views in the Terminal.Gui/Views/LinearRange directory, replacing the legacy Slider. This includes LinearSelector for single-option selection, LinearMultiSelector for multiple independent selections, and LinearRange for contiguous range selection (spanning from a start to an end point, or bounded on one or both sides). These views are strongly typed via generics (with non-generic convenience wrappers for string options) and implement IValue\<T\> for consistent value change notifications. The implementation supports horizontal and vertical orientations, configurable key bindings, and designer preview support via EnableForDesign().
Terminal.Gui/Views/LinearRange · high confidence
New Markdown view with rich rendering, selection, and headless output
A new read-only Markdown view has been added to Terminal.Gui, supporting CommonMark and GitHub Flavored Markdown with styled headings, lists, links, code syntax highlighting, and box-drawing tables. Users can select and copy text via keyboard shortcuts (Ctrl+A, Ctrl+C) or mouse drag, and right-clicking a link provides a 'Copy Link' context menu option. The view also includes a new RenderToAnsi() API for generating ANSI escape sequences for headless rendering, and supports Sixel image rendering within the terminal.
Terminal.Gui/Views/Markdown · high confidence
New Popover and Tooltip infrastructure
This change introduces a new popover system in Terminal.Gui, adding the \IPopover\ and \IPopoverView\ interfaces, the \PopoverImpl\ base class, and the generic \Popover\<TView, TResult\>\ class for hosting views with result extraction. It also adds \ToolTipHost\ for displaying tooltips and \ToolTipProvider\ for flexible tooltip content generation. These components allow applications to display transient UI elements like menus, tooltips, or dialogs that are automatically managed by the application lifecycle, handle positioning relative to anchors, and support keyboard and mouse interactions.
Terminal.Gui/App/Popovers · high confidence
New Runnable view infrastructure for blocking sessions
Adds the \Runnable\, \Runnable\<TResult\>\, and \RunnableWrapper\<TView, TResult\>\ classes to the \Terminal.Gui.Views\ namespace, providing a standardized way to run views as blocking sessions. \Runnable\ implements the \IRunnable\ interface for views that do not return a result, while \Runnable\<TResult\>\ handles typed results and supports cancellation detection via nullable types. \RunnableWrapper\ allows any existing view to be run as a modal session with automatic result extraction, enabling inline or full-screen execution patterns without requiring custom dialog button logic.
Terminal.Gui/Views/Runnable · high confidence
New ScenarioRunner tool for running and benchmarking Terminal.Gui scenarios
A new command-line tool, ScenarioRunner, has been added to the Examples directory. It allows users to list, run, and benchmark Terminal.Gui scenarios via commands like 'list', 'run', and 'benchmark'. The tool supports configuring the terminal driver, forcing 16-color mode, disabling configuration management, setting benchmark timeouts, and saving benchmark results to a file. It also includes logging capabilities via Serilog.
Examples/ScenarioRunner · high confidence
New SpectreView component and style bridge for rendering Spectre.Console content
Added a new \SpectreView\ control and \SpectreMarkupBridge\ utility within the \Terminal.Gui.Interop.Spectre\ namespace. \SpectreView\ allows users to display any \Spectre.Console\ \IRenderable\ object directly in a Terminal.Gui window, handling layout via an \AutoSize\ property and rendering segments with correct styling. The \SpectreMarkupBridge\ provides bidirectional conversion between Spectre \Style\ objects and Terminal.Gui \Attribute\ objects, ensuring that colors and text decorations (bold, italic, underline, etc.) are preserved when rendering Spectre content.
Terminal.Gui.Interop.Spectre · high confidence
New Terminal.Gui.Drawing namespace with modern styling and rendering primitives
The Terminal.Gui/Drawing area introduces a new set of core types for visual rendering. Attribute is a new immutable record struct that bundles foreground/background colors and text styles, replacing older styling mechanisms. Cell is now a record struct representing a single grid cell with grapheme validation and dirty tracking. Scheme replaces the legacy ColorScheme, providing a semantic, role-based theming system (Normal, Focus, Disabled, etc.) with inheritance rules. Glyphs is a new centralized class for standard UI symbols (checkboxes, arrows, lines) backed by settings. Region is a new class for geometric set operations (union, intersect, difference) on rectangular areas. Gradient and GradientFill add support for multi-color linear, radial, and diagonal fills. GraphemeHelper provides Unicode grapheme cluster enumeration. These changes collectively modernize the drawing infrastructure, improving performance, type safety, and theming flexibility.
Terminal.Gui/Drawing · high confidence
New TextValidateField-based DateEditor and TimeEditor controls
Terminal.Gui now includes DateEditor and TimeEditor controls for structured date and time input. These new views extend the newly introduced TextValidateField, which provides a pluggable provider architecture (ITextValidateProvider) for input validation and formatting. The DateEditor and TimeEditor support culture-aware formatting (e.g., en-US vs. en-GB date patterns), automatic cursor navigation that skips separator characters, and dynamic width adjustment based on the selected format. This replaces the older TimeField and DateField implementations with a more flexible and consistent text validation model.
Terminal.Gui/Views/TextInput · high confidence
New UICatalog scenario for interactive View editing and inspection
The UICatalog application now includes a new 'EditorsAndHelpers' scenario that provides a comprehensive suite of UI editors for inspecting and modifying View properties in real-time. This scenario introduces specialized editors for layout (position and dimension), adornments (margin, border, padding, and general adornments), view arrangement, and navigation settings. It also features an 'AllViewsView' that dynamically instantiates and displays all available View types for testing, an 'AttributeViewer' for inspecting color and style attributes, and an 'EventLog' that tracks command-related events like activation and value changes. Additionally, it includes helper components like an 'ExpanderButton' for collapsing views and an 'EditorBase' class to standardize the editing experience.
Examples/UICatalog/Scenarios/EditorsAndHelpers · high confidence
New Unix helper library for terminal management and clipboard access
This change introduces a new set of helper classes in the UnixHelpers directory to manage terminal state and clipboard operations on Unix-like systems. SuspendHelper handles process suspension by sending platform-specific signals (e.g., SIGTSTP) to the process group. UnixRawModeHelper manages terminal raw mode, ensuring safe restoration of terminal settings even if the process crashes or exits unexpectedly. UnixTerminalHelper coordinates saving and restoring terminal states during suspend/resume cycles. UnixClipboard provides clipboard support via xclip on Linux, native Objective-C APIs on macOS, and PowerShell interop on WSL. UnixIOHelper centralizes P/Invoke declarations for common Unix I/O syscalls like poll, read, write, and ioctl.
Terminal.Gui/Drivers/UnixHelpers · high confidence
New Windows Virtual Terminal helpers for input and output
Added new helper classes in the WindowsHelpers directory to manage Windows Console Virtual Terminal Sequences (VTS). NetWinVTConsole initializes and restores console modes for both input and output. WindowsVTInputHelper enables VTS input mode, handles UTF-8 code page configuration, and reads ANSI escape sequences for keyboard and mouse events. WindowsVTOutputHelper enables VTS output mode and writes UTF-8 data to the console. WindowsConsoleHelper provides a utility to detect if standard input and output are attached to a real console device. These components replace or augment previous platform detection and I/O handling logic for Windows.
Terminal.Gui/Drivers/WindowsHelpers · high confidence
New Wizard and WizardStep views for multi-step dialogs
Adds a new \Wizard\ view and \WizardStep\ component to \Terminal.Gui.Views\, enabling the creation of multi-step dialogs that collect related data across sequential steps. The \Wizard\ class automatically manages Back/Next/Finish navigation buttons, handles step sizing to accommodate the largest step, and raises \Accepting\ events upon completion. Each \WizardStep\ can host arbitrary views and display markdown-formatted help text in a right-side padding area, which is hidden if no help text is provided.
Terminal.Gui/Views/Wizard · high confidence
New color selection views: ColorPicker, AttributePicker, and ColorBar components
This change introduces a new set of views in the Terminal.Gui/Views/Color directory to enhance color selection capabilities. The ColorPicker view allows users to select colors using RGB, HSV, or HSL models via sliders (ColorBar) and optional text fields, with support for legacy 16 ANSI colors via ColorPicker16. The AttributePicker view enables selection of foreground/background colors and text styles, providing a live sample preview. These components are built on a new ColorBar abstraction and ColorModelStrategy, allowing for flexible color model support and interactive value adjustment through mouse and keyboard bindings.
Terminal.Gui/Views/Color · high confidence
New declarative layout system for Terminal.Gui views
Terminal.Gui introduces a new responsive layout engine in the \ViewBase/Layout\ namespace, replacing the previous positioning model. Users can now define view dimensions and positions using the \Dim\ and \Pos\ types, which support absolute values, percentages, auto-sizing based on content, and relative anchoring to other views. The system includes new alignment capabilities via the \Aligner\ class and \AlignmentModes\ flags, allowing for flexible arrangement of items within containers. This change enables more dynamic and responsive terminal user interfaces that automatically adjust to available space and content changes.
Terminal.Gui/ViewBase/Layout · high confidence
New development-time PowerShell modules and scripts
The Scripts directory now includes a structured set of PowerShell modules (Terminal.Gui.PowerShell.Core, Git, and Build) and standalone utility scripts. The Core module provides environment setup and Visual Studio solution management (Open-Solution, Close-Solution), the Git module offers branch creation helpers (New-GitBranch), and the Build module exposes build configuration functions. Additionally, new scripts have been added to support development workflows: CleanupAgent.ps1 automates code cleanup using ReSharper and partial file splitting, Run-LocalCoverage.ps1 orchestrates local test runs and coverage reporting, delist-nuget.ps1 manages NuGet package listings, and lint-agent-docs.ps1 validates AI agent instruction files for consistency. These tools are designed for use with PowerShell 7.4+ and the Terminal.slnx solution file.
Scripts · high confidence
New doc snippet compiler validates AI agent documentation against Terminal.Gui
A new \DocSnippetValidator\ tool has been added to the \Scripts\ directory to compile fenced C\# code blocks from AI agent documentation against the built \Terminal.Gui.dll\. This ensures that code examples in files like \ai-v2-primer.md\ and \.claude/cookbook/common-patterns.md\ remain valid and do not contain rot from deprecated or obsolete APIs (such as the legacy \Application.Init\). The validator treats obsolete API usage as a compilation failure, automatically skips anti-pattern examples marked with \// WRONG\ or \❌\, and allows explicit opt-outs via \\<!-- snippet: ignore --\>\. A negative-test fixture is included to ensure the tool correctly rejects obsolete code.
Scripts/DocSnippetValidator · high confidence
New inline and popup autocomplete for TextField
Terminal.Gui now includes a new autocomplete system for TextField controls, offering two distinct modes: AppendAutocomplete, which renders suggestions as an inline overlay within the text box (selectable via Tab), and PopupAutocomplete, which displays suggestions in a separate floating menu. The feature includes a SingleWordSuggestionGenerator for matching text against a provided list of candidates and a FilepathSuggestionGenerator for completing file paths within FileDialog. Users can customize selection and closing keys, styling, and maximum dimensions, while the system handles mouse interactions and cursor positioning automatically.
Terminal.Gui/Views/Autocomplete · high confidence
New keyboard input model with platform-specific key bindings
The Terminal.Gui.Input.Keyboard namespace now provides a modernized keyboard input system. This includes a new \Key\ class for representing keyboard events with modifier support, a \KeyBinding\ record struct to associate keys with commands, and a \KeyBindings\ collection for managing these associations. A key addition is \PlatformKeyBinding\, which allows developers to define key bindings that vary by operating system (Windows, Linux, macOS) via the new \Bind\ factory class, ensuring correct shortcuts across different platforms.
Terminal.Gui/Input/Keyboard · high confidence
New mouse hold-repeat mechanism and configurable mouse bindings
Terminal.Gui introduces a new \IMouseHoldRepeater\ interface and \MouseHoldRepeaterImpl\ class to handle periodic events while a mouse button is held down, enabling behaviors like auto-scrolling or button repeat with an accelerating timeout pattern. The \View\ class now exposes \MouseBindings\ and \DefaultMouseBindings\ (static), allowing users to configure which mouse flags trigger specific commands, with platform-specific defaults for activation, context menus, and selection. A new \MouseState\ enum tracks mouse interaction states (None, In, Pressed, PressedOutside), and \View.MouseHighlightStates\ can be used to apply visual effects based on these states. Disabled views are now excluded from hit testing and mouse events.
Terminal.Gui/ViewBase/Mouse · high confidence
New per-view and application settings POCOs with atomic theme switching
Terminal.Gui now exposes dedicated settings POCOs for application-level configuration (ApplicationSettings, DriverSettings, FileDialogSettings, KeySettings, ThemeSettings, TraceSettings) and immutable, theme-scoped defaults for individual views (ButtonSettings, CharMapSettings, CheckBoxSettings, DialogSettings, FrameViewSettings, GlyphSettings, HexViewSettings, LinearRangeSettings, MenuBarSettings, MenuSettings, MessageBoxSettings, NerdFontsSettings, PopoverMenuSettings, SelectorBaseSettings, StatusBarSettings, TextFieldSettings, TextViewSettings). These settings are managed via a new MEC-based configuration system that supports deep JSON merging, flat-key binding, and atomic updates to view defaults during theme switches. A new IThemeManager/ISchemeManager abstraction and MecThemeManager implementation allow switching themes at runtime, which automatically updates all ThemeScope settings and triggers redraws. Key bindings can now be configured via nested JSON overlays that revert cleanly on reload. The configuration builder (TuiConfigurationBuilder) provides a standardized entry point for app developers to bind custom settings and apply them to static facades.
Terminal.Gui/Configuration/Settings · high confidence
New text formatting and rendering infrastructure
This change introduces the core text formatting engine for the terminal UI, adding the TextFormatter class which handles horizontal and vertical alignment, text direction (including vertical layouts), word wrapping, and hotkey support. It includes new extension methods for string and rune manipulation (RuneExtensions, StringExtensions) to handle grapheme clusters, column width calculation via wcwidth, and surrogate pairs, alongside a NerdFonts helper to map file extensions to Unicode icons. The implementation also adds a TextDirection enumeration to control text orientation and uses ArrayPool to reduce memory allocations during rendering.
Terminal.Gui/Text · high confidence
New unified tracing system for debugging and testing
Terminal.Gui now includes a new tracing subsystem in the App/Tracing namespace that allows developers to capture and inspect internal events for debugging and testing purposes. The system supports independent enable/disable of trace categories (Lifecycle, Command, Mouse, Keyboard, Navigation, Configuration, Draw) via the Trace.EnabledCategories property. It provides a pluggable backend interface (ITraceBackend) with built-in implementations: NullBackend (default, no-op), LoggingBackend (forwards to Logging.Trace with category-specific formatting), and ListBackend (captures entries to a list for test inspection). Tracing is thread-safe using AsyncLocal storage, ensuring isolation across async flows and parallel tests. All trace methods are marked with \[Conditional("DEBUG")\], meaning they have zero overhead in Release builds. The Trace.PushScope method enables scoped tracing that automatically restores previous state when disposed, making it safe for use in test scenarios.
Terminal.Gui/App/Tracing · high confidence
Redesigned FileDialog with tree view, file operations, and type filtering
The FileDialog has been completely rewritten to provide a richer file-selection experience. It now features a collapsible directory tree on the left and a sortable, colorable file table on the right. Users can perform file operations (New, Rename, Delete) directly from the dialog via a context menu, with built-in validation for path traversal and invalid characters. The dialog supports filtering by file type using the new AllowedTypes API, preserves the filename when navigating directories, and handles unreadable entries gracefully without hiding the entire directory.
Terminal.Gui/Views/FileDialogs · high confidence
Refactored output drivers with new IOutput/IOutputBuffer interfaces and Kitty graphics support
The output rendering subsystem has been refactored to use new \IOutput\ and \IOutputBuffer\ interfaces, introducing a dedicated \OutputBufferImpl\ for managing screen state and a high-performance \Utf8Buffer\ to replace \StringBuilder\ in the output hot path. This change adds support for the Kitty graphics protocol alongside existing Sixel rendering, enabling efficient pan/zoom and source-crop operations for raster images. It also improves OSC 8 hyperlink handling by tracking URL state per cell and cleaning up stale hyperlink metadata, while adding robust error recovery to restore dirty flags and raster state if a terminal write fails.
Terminal.Gui/Drivers/Output · high confidence
Sixel image rendering support added to Terminal.Gui
Terminal.Gui now supports rendering images in terminals that support the Sixel graphics protocol. This change introduces a new Sixel encoder to convert bitmaps into the Sixel format, a support detector to identify terminal capabilities (such as resolution and transparency support), and the necessary data structures to manage dirty-state updates for optimized rendering. Users can now display images in compatible terminal environments.
Terminal.Gui/Drawing/Sixel · high confidence
SpinnerView gains style-based theming and terminal progress synchronization
SpinnerView now supports customizable animation styles via the new SpinnerStyle class, allowing users to select from predefined sequences (such as Dots, Line, and various Dots variants) or define custom ones, with properties to control bounce behavior and animation delay. Additionally, the view can now sync its spinning state with the terminal's native progress indicator via the new SyncWithTerminal property, providing visual feedback in terminals that support OSC 9;4 progress indicators.
Terminal.Gui/Views/SpinnerView · high confidence
TableView receives a comprehensive API overhaul with new styling, selection, and data source models
The TableView control has been refactored to replace legacy data source and styling mechanisms with a modern, extensible architecture. Users can now bind data using new interfaces like ITableSource and IEnumerableTableSource, with concrete implementations such as DataTableSource, EnumerableTableSource, and ListTableSource. Rendering is controlled via TableStyle and ColumnStyle, which expose granular options for column visibility, width constraints, text justification, and custom color getters for rows, columns, and headers. Selection state is now managed through a dedicated TableSelection model that tracks the cursor and extended selection regions. Additionally, the control supports interactive checkboxes via CheckBoxTableSourceWrapper, allowing users to add toggleable columns to their tables.
Terminal.Gui/Views/TableView · high confidence
TextView refactored into modular partial classes with configurable key bindings and modern scrolling
The \TextView\ implementation has been restructured into separate partial classes (Commands, Drawing, Files, Find, History, Keyboard, Mouse, Movement, Scrolling, Selection, Text) to improve maintainability. This change introduces a configurable key binding system via \DefaultKeyBindings\ and \ApplyKeyBindings\, allowing users to customize commands like navigation, editing, and selection. It also upgrades the view to use the modern \Viewport\ and \ScrollBar\ system, fixing issues with scrollbar positioning and typing synchronization. Additional features include bracketed paste support, unified undo/redo/paste/delete key bindings, and improved mouse selection behavior.
Terminal.Gui/Views/TextInput/TextView · high confidence
TreeView control modernized with new architecture and features
The Terminal.Gui TreeView has been completely rewritten to support modern terminal features and improve usability. Users can now leverage built-in scrolling, multi-select navigation, and checkbox modes with parent-child state propagation. The control introduces a new \ITreeBuilder\ interface for lazy-loading data, a \DrawLine\ event for custom cell rendering, and text-based filtering via \ITreeViewFilter\. Additionally, the API has been standardized with new event args (\CheckedChangedEventArgs\, \SelectionChangedEventArgs\) and styling options in \TreeStyle\ for branch lines and expand symbols.
Terminal.Gui/Views/TreeView · high confidence
UICatalog restructured with new scenario runner and benchmarking support
The UICatalog example application has been reorganized into the Examples directory and rewritten to use an instance-based app model (Runnable) instead of the legacy Toplevel. This update introduces a new Scenario base class and metadata attributes for defining demo scenarios, a Runner component to execute scenarios and collect benchmark metrics (duration, iteration count, draw/refresh stats), and an in-memory log capture system for debugging. It also adds a Dockerfile for containerized builds and a Logo view for the splash screen.
Examples/UICatalog · high confidence
UICatalog scenarios modernized with instance-based application model and new demo scenarios
The UICatalog scenarios have been updated to use the new instance-based application model (Application.Create) and the Runnable top-level container, replacing the legacy Application.Top singleton. This change is accompanied by the addition of several new demonstration scenarios: Adornments (demonstrating Margin, Border, and Padding), Arrangement (testing movable/resizable/overlapped views), Bracketed Paste (logging paste events), and AnsiEscapeSequenceRequests (testing terminal request/response handling). Existing scenarios have also been refactored to align with these new architectural patterns.
Examples/UICatalog/Scenarios · high confidence
Unified color system with named enums and transparency support
The Terminal.Gui color API has been refactored to unify named color handling under the new \StandardColor\ and \ColorName16\ enums, replacing previous layered resolvers. This change introduces a robust \Color\ struct that supports 24-bit ARGB values, explicit transparency via an alpha channel (where alpha=0 indicates 'no color' to let the terminal background show through), and comprehensive formatting options (hex, decimal, and named strings). It also adds a \ColorQuantizer\ for image palette generation and improves error reporting with a detailed \ColorParseException\.
Terminal.Gui/Drawing/Color · high confidence
Architecture
Decoupled keyboard input handling for improved testability
The keyboard input and key binding logic has been extracted from the static Application class into a new, decoupled IKeyboard interface and ApplicationKeyboard implementation. This change allows keyboard state to be managed independently, enabling parallelizable unit tests and better overall testability without altering the external behavior of key handling for end users.
Terminal.Gui/App/Keyboard · high confidence
Modernized driver architecture with centralized registry and improved terminal detection
The driver subsystem has been refactored to use a new component-based architecture. A central DriverRegistry now manages built-in drivers (Windows, .NET, and ANSI) with type-safe discovery, replacing legacy reflection-based loading. Terminal device detection is centralized in TerminalDevice, which robustly handles redirected standard streams by falling back to the controlling terminal (/dev/tty or CONIN$/CONOUT$), ensuring TUIs work correctly in shell pipelines. The system also introduces a new Cursor record and CursorStyle enum for precise ANSI/VT cursor control, and adds configurable terminal size detection (Polling vs. ANSI Query) via the Driver.SizeDetection property.
Terminal.Gui/Drivers · high confidence
Replaces legacy MainLoop with a new modular ApplicationMainLoop and MainLoopCoordinator
The internal application loop has been completely rewritten to decouple UI rendering, event processing, and input handling. A new \ApplicationMainLoop\ class now manages the core iteration cycle, handling input queue draining, timed events, layout/draw cycles, and throttling via \MaximumIterationsPerSecond\. A \MainLoopCoordinator\ manages the lifecycle, starting a separate asynchronous thread for console input while initializing the main UI loop on the application thread. The new architecture introduces an \AnsiRequestScheduler\ to handle ANSI escape sequences and a \MainLoopSyncContext\ to correctly support \async/await\ patterns by posting work to the main loop or falling back to the thread pool if the loop is not pumping. This change removes the legacy MainLoop infrastructure and provides a more robust foundation for inline mode support and ANSI terminal capabilities.
Terminal.Gui/App/MainLoop · high confidence
Behavioural changes
5 commits (1 fix) modifying docfx/images/views
A change to existing behaviour in docfx/images/views — 5 commits (1 fix), 60 files: “Fixes \#5517. DropDownList dropped list uses Menu scheme for distinct background (\#5545)”; “Add tuirec recording guide and hero-gif docs (\#5396)”; “Regenerate view GIF assets via CI/CD workflow dispatch (\#5423)”; and 2 more (refs \#5517, \#5545, \#5396, \#5423, \#5419).
docfx/images/views · medium confidence · unverified
Automated versioning and configuration initialization
Terminal.Gui now uses GitVersion to automatically compute version numbers based on the GitFlow branching strategy, removing the need for manual version management. Additionally, a new module initializer automatically applies configuration settings when the library loads, ensuring static facades are correctly set up before the application's main entry point runs.
Terminal.Gui · high confidence
Clipboard API refactored to use IApplication.Clipboard
The static \Terminal.Gui.App.Clipboard\ class is now obsolete and users should migrate to \IApplication.Clipboard\. This change introduces a new \IClipboard\ interface and a \ClipboardBase\ abstract class to standardize clipboard interactions across different drivers, while adding \ClipboardProcessRunner\ to handle shell command execution for Unix-based systems. The new architecture ensures consistent behavior for copy and paste operations on Windows, Linux, and macOS, including specific support for WSL interop.
Terminal.Gui/App/Clipboard · high confidence
Immediate mouse click event emission replaces deferred processing
The mouse driver layer now processes raw input events through a new \MouseInterpreter\ and \MouseButtonClickTracker\ architecture that emits single, double, and triple click events immediately upon button release. This change eliminates the previous 500ms delay associated with deferred single-click detection, providing instant user feedback while still correctly identifying multi-click sequences based on timing and position thresholds.
Terminal.Gui/Drivers/Mouse · high confidence
ListView re-architected with custom rendering, multi-marking, and configurable key bindings
The ListView control has been refactored to support custom data rendering via a new IListDataSource interface, allowing developers to fully control how list items are drawn. It now features a robust marking system with ShowMarks and MarkMultiple properties, enabling both single (radio-button) and multi-select (checkbox) modes with visual indicators. Navigation and selection behavior have been enhanced with configurable key bindings, support for extending selections with Shift+arrows, and improved mouse interaction for clicking and marking items.
Terminal.Gui/Views/ListView · high confidence
New high-resolution timeout management system
The application now uses a new \ITimedEvents\ interface and \TimedEvents\ implementation to manage scheduled callbacks, replacing the previous timer mechanism. This change introduces microsecond-level precision using \Stopwatch\ (or an injectable \ITimeProvider\ for testing), ensuring timeouts are not lost due to resolution issues. The new system supports repeating timeouts via callback return values, allows cancellation of specific timeout instances, and provides new \LogarithmicTimeout\ and \SmoothAcceleratingTimeout\ classes for variable-delay scenarios. Users benefit from more reliable timer execution and the ability to inspect or cancel scheduled events programmatically.
Terminal.Gui/App/Timeout · high confidence
New keyboard input abstraction layer in Terminal.Gui
The Terminal.Gui keyboard driver now includes a new set of core types to standardize input handling: the \KeyCode\ enum provides a consistent, layout-agnostic representation of keys and modifiers (Shift, Alt, Control); the \VK\ enum exposes Windows virtual-key codes for platform-specific mapping; the \IKeyConverter\<T\>\ interface defines how native console input records are translated into Terminal.Gui's \Key\ class; and helper classes like \ConsoleKeyMapping\ and \ConsoleKeyInfoExtensions\ manage conversions between \KeyCode\ and \ConsoleKeyInfo\ and provide debug-friendly string representations. This refactoring establishes a cleaner separation between driver-specific input formats and the framework's internal key model.
Terminal.Gui/Drivers/Keyboard · high confidence
Performance optimization for enum flag checks via source generator
The Terminal.Gui.Analyzers.Internal package now includes a source generator that produces high-performance extension methods for public enums, specifically targeting the top HasFlag hot paths. This generator creates AsInt32, AsUInt32, and FastHasFlags methods for public enums backed by int or uint types, replacing slower reflection-based or standard library implementations with direct bitwise operations to improve runtime performance.
Terminal.Gui.Analyzers.Internal · high confidence
Refactored mouse input handling with platform-specific bindings and grab cancellation
The mouse input system in Terminal.Gui has been restructured to support platform-specific mouse bindings and cancellable mouse grabs. Users can now define mouse bindings that vary by operating system (Windows, Linux, macOS) using the new \PlatformMouseBinding\ and \BindMouse\ helpers, allowing for consistent or differentiated behavior across platforms. Additionally, the new \GrabMouseEventArgs\ class introduces a Cancellable Work Pattern for mouse grab events, enabling views to prevent grab theft during drag operations or block premature release of the mouse grab, thereby improving the reliability of complex mouse interactions.
Terminal.Gui/Input/Mouse · high confidence
Replaces legacy key/mouse bindings with a unified, typed Command system
The input subsystem in Terminal.Gui/Input has been completely rewritten to use a new, strongly-typed Command enum and a dedicated binding infrastructure. This change introduces explicit, frozen integer values for every command to guarantee ABI stability for external packages, and replaces the previous ad-hoc event-based handling with a structured pipeline featuring CommandContext, CommandRouting, and CommandBridge. Users benefit from a more robust and predictable input model that supports complex scenarios like command bubbling, bridging across non-containment boundaries (e.g., popovers), and unified bracketed-paste handling, while eliminating the ambiguity and fragility of the old binding system.
Terminal.Gui/Input · high confidence
Replaces legacy menu system with new Bar-based Menu, MenuBar, and PopoverMenu components
The menu views in Terminal.Gui/Views/Menu have been completely rewritten to use a modern architecture based on the \Bar\ and \Shortcut\ base classes. \MenuBar\ now manages horizontal navigation and activates \PopoverMenu\ instances (modal overlays) or inline \SubMenu\s (non-modal) for each \MenuBarItem\. \Menu\ handles vertical item lists and selection tracking, while \MenuItem\ supports cascading hierarchies via \CommandBridge\ connections. This change introduces a unified command routing system (\Command.Activate\, \Command.Accept\) and key binding handling, replacing the previous implementation to fix issues with key binding pollution, focus confusion, and incorrect positioning.
Terminal.Gui/Views/Menu · high confidence
TextField rewritten with unified command bindings, history, and autocomplete
The TextField control has been refactored into a modular, partial-class architecture (Commands, Drawing, History, Keyboard, Mouse, Selection, Text) to unify and standardize its behavior. Users now benefit from a consistent command-based key binding system that aligns TextField with the broader framework's Command pipeline, including unified Undo/Redo, Paste, and DeleteAll operations. The control now features a built-in history system for robust undo/redo support, a new autocomplete overlay system, and improved mouse handling for precise cursor positioning and selection. Additionally, text selection behavior has been refined with an anchor-based model, and the drawing logic has been updated to correctly render captions, readonly states, and secret (masked) text.
Terminal.Gui/Views/TextInput/TextField · high confidence
Updated docfx modern template with new layout and class documentation views
The docfx modern template has been updated to include new layout and class documentation views. The layout template now includes a new header with a navbar, search, and table of contents. The class documentation view now includes a new header with a title, namespace, assembly, and summary. The class member page view now includes a new header with a title, namespace, assembly, and summary. The class view now includes a new header with a title, namespace, assembly, and summary. The collection view now includes a new header with a title, namespace, assembly, and summary. The custom MREF content view now includes a new header with a title, namespace, assembly, and summary. The enum view now includes a new header with a title, namespace, assembly, and summary. The item view now includes a new header with a title, namespace, assembly, and summary. The namespace view now includes a new header with a title, namespace, assembly, and summary. The block diagram view now includes a new header with a title, namespace, assembly, and summary.
_docfx/\_exported\templates · high confidence
Fixes
Added nuget.config to resolve Terminal.Gui dependencies from nuget.org
A new nuget.config file has been added to the EditorRef directory to configure NuGet package sources. This configuration clears existing mappings and explicitly adds nuget.org as a source, allowing the EditorRef project to resolve the Terminal.Gui.Editor package and its transitive dependencies from the public NuGet feed rather than being restricted to locally-built packages in the repository root.
docfx/EditorRef · high confidence
ImageView rendering refactored with Kitty graphics support and improved zoom/pan behavior
The ImageView component has been refactored to support the Kitty graphics protocol alongside Sixel, preferring Kitty when available and falling back to Sixel or cell-based rendering. This update fixes flash-free pan/zoom by using Kitty's source-crop placement, ensures raster graphics are released when the view is no longer rendered, and updates zoom keybindings to +/=/- and 0 for Mac compatibility. Additionally, shadows now correctly overlay raster images, and resize border artifacts are resolved.
Terminal.Gui/Views/ImageView · high confidence
Refactored input driver architecture with ANSI support and input injection
The input handling system has been refactored to replace the legacy Unix driver with a modern ANSI driver, introducing a new thread-safe input pipeline. This change adds support for configurable terminal size detection, bracketed paste, and the Kitty Keyboard Protocol. For users, this means improved compatibility with modern terminal features and more reliable input processing. Additionally, a new input injection mechanism has been added, allowing test frameworks to programmatically inject keyboard and mouse events for more robust unit testing.
Terminal.Gui/Drivers/Input · high confidence
Refactored mouse event handling for improved stability and testability
Mouse event processing has been moved from the static App class into a dedicated ApplicationMouse component, decoupling mouse state from the global application singleton. This change fixes several issues where mouse events, particularly Clicked events, would incorrectly leak to views beneath a popover that had just been dismissed, and ensures that inline application coordinates are correctly adjusted without double-subtraction bugs. The new architecture also introduces a WeakReference-based mouse grab mechanism to prevent memory leaks when views are disposed during drag operations, and enables better parallel test execution by removing static state dependencies.
Terminal.Gui/App/Mouse · high confidence
Windows driver refactored with new input, output, and clipboard implementations
The Windows driver has been completely rewritten to improve stability and modernize the codebase. This change introduces dedicated implementations for clipboard operations (ClipboardImpl.cs), cursor visibility settings (CursorVisibility.cs), and a new component factory (WindowsComponentFactory.cs) to manage driver instances. Input handling is now split into WindowsInput.cs for raw console event reading and WindowsInputProcessor.cs for converting those events into Terminal.Gui mouse and key events, supported by WindowsKeyConverter.cs and WindowsKeyHelper.cs for accurate keyboard layout and IME (IME/emoji) support. Output rendering is handled by the new WindowsOutput.cs, which manages screen buffers and UTF-8/UTF-16 conversions. These files collectively replace the legacy Windows driver logic, fixing issues with rendering, input injection, and clipboard access on Windows.
Terminal.Gui/Drivers/WindowsDriver · high confidence
Test coverage
2 commits adding/updating tests in Tests/IntegrationTests/FluentTests/\_\snapshots\\_; Added Native AOT smoke tests for Terminal.Gui; Added benchmark for Button draw performance; Added benchmarks for CSI escape sequence utility methods; Added benchmarks for EnumExtensions performance; Added benchmarks for OutputBuffer and console driver output performance; Added benchmarks for Text and TextFormatter performance optimizations; Added comprehensive unit tests for Application lifecycle and behavior; Added comprehensive unit tests for application timeout mechanisms; Added comprehensive unit tests for layout system changes; Added comprehensive unit tests for the ANSI driver implementation; Added comprehensive unit tests for the Color class and color name resolution; Added configuration and scheme benchmarks; Added integration tests for view disposal, fan-out behavior, and scenario stability; Added legacy test infrastructure and helpers; Added nullability tests for the Images scenario; Added parallelizable unit tests for LineCanvas and StraightLine; Added parallelizable unit tests for Text components; Added parallelizable unit tests for the Drawing subsystem; Added performance benchmarks and memory profiling tools; Added performance smoke tests for ListView and TableView rendering; Added regression tests for viewport scrollbar positioning and transparent mouse handling; Added scrolling performance benchmarks for core views; Added source generator and helper for xUnit assertion context chaining; Added stress tests for Application.Invoke and UI Catalog scenarios; Added test assets for ConfigPropertyTypeLoad scenarios; Added tests for AppTestHelper shutdown and path handling; Added tests for source-generated enum extension methods; Added unit tests for ANSI driver input handling; Added unit tests for ANSI, .NET, and Windows driver components; Added unit tests for Adornment lazy creation, layout, and transparency; Added unit tests for Application Popover, ToolTip, and Menu components; Added unit tests for Application keyboard bindings and input injection; Added unit tests for Application lifecycle, model fencing, keyboard, and coordinator behavior; Added unit tests for Application mouse handling and input injection; Added unit tests for FileServices components; Added unit tests for Kitty graphics protocol support; Added unit tests for LinearRange view components; Added unit tests for Markdown view rendering and parsing; Added unit tests for Region geometric operations; Added unit tests for ResultEventArgs; Added unit tests for Sixel image encoding and support detection; Added unit tests for SpectreView interop and style conversion; Added unit tests for TabView layout, scrolling, and diagnostics; Added unit tests for View drawing, clipping, and redraw logic; Added unit tests for View keyboard and key binding behavior; Added unit tests for View mouse interaction behavior; Added unit tests for View navigation and focus management; Added unit tests for ViewBase arrangement, focus, and command systems; Added unit tests for ViewBase arrangement, focus, and command systems; Added unit tests for Windows driver input processing and key conversion; Added unit tests for driver output rendering and concurrency; Added unit tests for keyboard input and key binding infrastructure; Added unit tests for mouse click tracking and interpretation logic; Added unit tests for mouse input binding and injection logic; Added unit tests for the ANSI driver and its components; Added unit tests for the Command enum contract and input injection system; Added unit tests for the Runnable application lifecycle; Centralized test environment setup and Native AOT smoke test; Expanded integration test coverage for core UI components and test infrastructure; Expanded parallelizable test coverage for Views and AppTestHelpers; New AppTestHelper test infrastructure for Terminal.Gui integration tests; New input injection API for testing; New parallelizable test suite for isolated unit tests.
Dependencies
Migrate to .NET 10 and adopt central package version management
The project has upgraded its target framework to .NET 10.0 and C\# 14, enabling modern language features and runtime capabilities. To streamline dependency management, the solution now uses Central Package Management (via Directory.Packages.props), which unifies version definitions for all NuGet packages across the 27 affected project files. This change also introduces a new Terminal.Gui.Interop.Spectre bridge package for rendering Spectre.Console widgets, updates the test infrastructure to xunit v3, and removes the legacy Terminal.csproj file.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 56 → 54 (-2.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.
Lenses
- Code Health 45 → 44 (-0.2)
- Architecture 96 → 72 (-24.4)
- Maturity 74 → 82 (+7.9)
- Readiness 69 → 63 (-5.7)
- Security 59 → 54 (-5.5)
- Performance 72 → 77 (+5.5)
Resolved (50)
- Assertions commented out: WithTextField_UpdatesText (Tests/IntegrationTests/FluentTests/TestContextKeyEventTests.cs)
- Coverage not measured — no coverage collector is wired up
- Disclosure policy routes reports to a public channel
- Documentation: no contributor guidance (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no project overview (README.md)
- Duplicated block (13 lines × 2) (Terminal.Gui/Views/CharMap/CharMap.cs)
- Duplicated block (18–21 lines × 2) (Examples/UICatalog/Scenarios/LineDrawing.cs)
- Duplicated block (20 lines × 2) (Examples/UICatalog/Scenarios/ComputedLayout.cs)
- Duplicated block (20 lines × 2) (Examples/UICatalog/Scenarios/LineDrawing.cs)
- Duplicated block (53 lines × 2) (Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs)
- Duplicated block (8–9 lines × 3) (Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs)
- Hotspot: Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs (Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs)
- IL efficiency: 171 authored method(s) exceed the IL budget (Terminal.Gui/Text/NerdFonts.cs)
- Low cohesion: MenuItem (LCOM4 4) (Terminal.Gui/Views/Menu/MenuItem.cs)
- MarkdownTable.DrawWrappedRow (cognitive 52) (Terminal.Gui/Views/Markdown/MarkdownTable.cs)
- MarkdownTable.DrawWrappedRow (cyclomatic 22) (Terminal.Gui/Views/Markdown/MarkdownTable.cs)
- MarkdownTable.HitTestLinkRegion (cognitive 26) (Terminal.Gui/Views/Markdown/MarkdownTable.cs)
- MarkdownTable.HitTestLinkRegion (cyclomatic 21) (Terminal.Gui/Views/Markdown/MarkdownTable.cs)
- MarkdownTable.ReduceEvenly (cognitive 18) (Terminal.Gui/Views/Markdown/MarkdownTable.cs)
- …and 30 more
New (346)
- ClassTooLong: NerdFonts (Terminal.Gui/Text/NerdFonts.cs)
- Disclosure policy routes reports to a public channel (SECURITY.md)
- Duplicated block (40–43 lines × 2) (Examples/UICatalog/Scenarios/LineDrawing.cs)
- Edited copies of one member (3 members, 14+ corresponding lines) (Terminal.Gui/Views/TextInput/TextView/TextView.Find.cs)
- Edited copies of one member (3 members, 18+ corresponding lines) (Examples/UICatalog/Scenarios/CsvEditor.cs)
- Edited copies of one member (3 members, 21+ corresponding lines) (Terminal.Gui/Views/TextInput/DateTextProvider.cs)
- Edited copies of one member (3 members, 24+ corresponding lines) (Terminal.Gui/Views/Color/ColorPicker.16.cs)
- Edited copies of one member (3 members, 43+ corresponding lines) (Terminal.Gui/Views/TableView/TableView.Drawing.cs)
- Edited copies of one member (3 members, 6+ corresponding lines) (Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs)
- Edited copies of one member (4 members, 13+ corresponding lines) (Examples/UICatalog/Scenarios/Selectors.cs)
- Edited copies of one member (4 members, 14+ corresponding lines) (Examples/UICatalog/Scenarios/LineDrawing.cs)
- Edited copies of one member (4 members, 31+ corresponding lines) (Terminal.Gui/ViewBase/Adornment/Arranger.cs)
- Edited copies of one member (5 members, 29+ corresponding lines) (Terminal.Gui/Views/CheckBox.cs)
- Edited copy of a member (10 corresponding lines) (Terminal.Gui/Views/TextInput/DateEditor.cs)
- Edited copy of a member (11 corresponding lines) (Examples/UICatalog/Scenarios/AllViewsTester.cs)
- Edited copy of a member (11 corresponding lines) (Examples/UICatalog/Scenarios/Bars.cs)
- Edited copy of a member (11 corresponding lines) (Terminal.Gui/Views/Color/ColorPicker.16.cs)
- Edited copy of a member (11 corresponding lines) (Terminal.Gui/Views/Color/LightnessBar.cs)
- Edited copy of a member (11 corresponding lines) (Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs)
- Edited copy of a member (12 corresponding lines) (Terminal.Gui/App/Popovers/Popover.cs)
- …and 326 more
Changes since last survey
- 17 commits — 4 feature/other, 13 fixes
By area
- Tests/UnitTestsParallelizable — 5 commits
- Terminal.Gui/ViewBase — 4 commits
- Terminal.Gui/Views — 4 commits
- (repo) — 1 commit
- Terminal.Gui/Configuration — 1 commit
- Terminal.Gui/Drivers — 1 commit
- docfx/docs — 1 commit
Notable commits
- fix: Fix MenuItem.SubMenu null leaving submenu arrow on KeyView (#5754)
- fix: Fixes #5201. Wrap Up/Down focus within submenus in PopoverMenu (#5735)
- fix: Fixes #5680. Begin() without Run() leaves MainLoopSyncContext installed, and Post() then queues continuations nothing drains (#5722)
- fix: Fixes #5726. Allow custom FileDialog icon providers (#5727)
- fix: Fixes #5728. Fixes flickering tab borders during mouse movement and focus changes (#5777)
- fix: Fixes #5742-Ability to open a menu at a given item (#5746)
- fix: Fixes #5744. ListView: SelectedItem and viewport not reset when Source is cleared or replaced with a shorter list (#5745)
- fix: Fixes #5757-MenuItem.Key with BindKeyToApplication does not fire Action while PopoverMenu is closed (#5758)
- fix: Fixes #5760. Reassign automatic hotkeys when a view title changes (#5761)
- fix: Fixes #5766. Exit Arrange Mode when the Arrange key is pressed again (#5767)
- fix: Fixes #5768. Exit Arrange Mode when Esc is pressed instead of closing the Dialog (#5769)
- fix: Fixes #5774. Cache theme lookups and overlay bindings to fix ThemeSwitch benchmark (#5776)
- fix: Fixes #5779. Stop the nested Run timeout test losing to an unthrottled main loop. (#5780)
- change: Add draft issue for Windows CI allocation test failure (#5771)
- change: Enhance PopoverMenu behavior with SubMenu hotkey support and add corresponding tests (#5763)
- change: Merge pull request #5739 from harder/codex/5738-markdown-table-layout
- change: Skip UpdateCursor writes when the cursor is unchanged (#5773)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
tui-cs/Terminal.Gui was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 12 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 4454927e4c1672eb296f5c9eda5840e328cc79c5 — the exact code this score is about.
- Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.42+preprod-6bc2a431cb25.