Textualize/textual
69.7
Adequate · 26 September 2026
77.7k
lines of production code
Python
primary language
4
measurements over time
What this system is
This release introduces a modular layout system with Grid, Horizontal, Vertical, and Stream options, alongside significant improvements to the CSS error messaging and terminal driver architecture. Key features include read-only access to TreeNode children, wrapped document support for the TextArea, and syntax highlighting for 15 new languages. The update also brings a comprehensive suite of unit and snapshot tests for core widgets, renderables, and the command palette, ensuring robustness across the framework.
Features
Add new example applications and documentation
The examples directory now includes a README.md with usage instructions, alongside new example applications: a responsive breakpoint demo (breakpoints.py), a macOS-style calculator (calculator.py with calculator.tcss), a clock (clock.py), a code browser (code\_browser.py with code\_browser.tcss), a color command palette demo (color\_command.py), a dictionary lookup app (dictionary.py with dictionary.tcss), a 5x5 puzzle game (five\_by\_five.py with five\_by\_five.tcss and five\_by\_five.md), a JSON tree viewer (json\_tree.py), a markdown viewer (markdown.py), a Merlin-style switch puzzle (merlin.py), an LLM chat interface (mother.py), a pride flag display (pride.py), an animated sidebar (sidebar.py), a gradient splash screen (splash.py), and a theme sandbox (theme\_sandbox.py). Supporting assets include demo markdown files (demo.md, example.md, five\_by\_five.md) and sample data (food.json).
examples · high confidence
Add read-only access to the children of a TreeNode
Developers can now access the children of a TreeNode via a new read-only property, allowing for easier traversal and inspection of the tree structure without exposing the internal list of child nodes.
(repo-wide) · high confidence
Add syntax highlighting for Bash, CSS, Go, HTML, Java, JavaScript, JSON, Markdown, Python, Regex, Rust, SQL, TOML, XML, and YAML
New syntax highlighting support has been added for 15 additional programming and markup languages, including Bash, CSS, Go, HTML, Java, JavaScript, JSON, Markdown, Python, Regex, Rust, SQL, TOML, XML, and YAML. Users will now see color-coded syntax highlighting for these file types in the Textual editor, improving code readability and navigation for these languages.
src/textual/tree-sitter · high confidence
Added helper tools for generating test data and widget documentation
Two new scripts have been added to the tools directory to support development workflows. The TypeScript script gen\_easings\_tests.ts generates test data for easing functions, while the Python script widget\_documentation.py iterates through all widgets to print scaffolding tables for BINDINGS and COMPONENT\_CLASSES, aiding in the generation of widget documentation.
tools · high confidence
Added reference documentation for developers
A new README file has been added to the reference directory, serving as an index for private developer documentation.
reference · high confidence
Introduce wrapped document support and cursor navigation
The document module is refactored to support text wrapping and wrapping-aware cursor navigation. A new \WrappedDocument\ class manages the mapping between raw document lines and their wrapped visual sections, while a \DocumentNavigator\ class handles cursor movement logic that accounts for wrapping. The \Document\ class is split into an abstract \DocumentBase\ and concrete implementations like \SyntaxAwareDocument\ and \Edit\/\EditHistory\ for undo/redo support. This enables the \TextArea\ widget to correctly handle cursor movement, selection, and rendering when text is wrapped.
src/textual/document · high confidence
New demo application with navigation, maximize support, and project showcase
The demo application has been restructured into a multi-screen app with a home, widgets, projects, and game screens. Users can navigate between these sections using the header bar or keyboard shortcuts (h, g, p, w). The app now supports maximizing individual widgets (e.g., the DataTable or Markdown) for a full-screen view, accessible via Ctrl+A or the maximize button. The Projects screen displays a curated list of Textual-based projects with their GitHub star counts, which are fetched from the GitHub API. The demo also includes a sliding tile puzzle game and a widgets showcase page. The home screen provides an overview of Textual's features, including a command palette and a star count widget.
src/textual/demo · high confidence
New layout system with Grid, Horizontal, Vertical, and Stream layouts
The layout engine has been refactored into a modular system located in \src/textual/layouts/\. A new \Layout\ factory in \factory.py\ registers and retrieves layout implementations by name. Four distinct layout algorithms are now available: \GridLayout\ for arranging widgets in a grid with configurable columns, rows, and gaps; \HorizontalLayout\ for left-to-right horizontal arrangement; \VerticalLayout\ for top-to-bottom vertical arrangement; and \StreamLayout\, a high-performance, simplified vertical layout optimized for long lists of widgets. This change introduces a new API for defining layout behavior via the \layout\ CSS property and associated style rules.
src/textual/layouts · high confidence
New renderable components for visual effects
The \src/textual/renderables\ module now includes new renderable components: \Bar\ for horizontal progress bars, \Blank\ for solid background colors, \Digits\ for a 3x3 unicode font, \Gradient\ for vertical and linear color gradients, \Sparkline\ for compact data visualization, \Styled\ for applying pre/post styles, \TextOpacity\ for blending text into backgrounds, \Tint\ for overlaying colors, and \\_blend\_colors\ for color interpolation. These additions expand the library's capabilities for rendering complex visual elements directly in the terminal.
src/textual/renderables · high confidence
Behavioural changes
Fixes for scrolling, layout, and focus behavior
This update resolves numerous issues affecting the user experience, including fixes for scroll glitches, layout calculation errors, and focus management. Users will see improved scrolling behavior in containers and screens, with corrections to how focus is handled when widgets are removed or screens change. Additionally, layout calculations for containers and scrollable areas have been corrected to prevent visual artifacts and ensure proper sizing.
src/textual · medium confidence
Improved CSS error messaging and help text
The CSS error reporting system has been refactored to provide more helpful, contextual error messages. A new \HelpText\ renderable and supporting classes (\Bullet\, \Example\) are used to display structured help text for style-related errors. This includes specific guidance for invalid values, wrong numbers of values for spacing properties, and suggestions for misspelled property names. The \StylesBuilder\ now raises \DeclarationError\ with these rich error messages, improving the developer experience when debugging CSS or inline style issues.
src/textual/css · high confidence
Refactor Input widget cursor and selection handling
The Input widget's cursor movement and editing logic has been refactored to handle selection state in a manner consistent with VSCode and modern browsers. This change improves the behavior of cursor navigation and text selection within the Input widget, ensuring that actions like backspace or delete respect the current selection. Additionally, the implementation now supports macOS and Emacs-style Home/End keybindings for the Input widget.
src/textual/widgets · high confidence
Refactored terminal driver architecture with platform-specific input readers and a background writer thread
The terminal drivers have been refactored to separate concerns: a new \InputReader\ abstraction provides platform-specific stdin reading (\\_input\_reader\_linux.py\ and \\_input\_reader\_windows.py\), while a \WriterThread\ handles output asynchronously. This change simplifies the driver implementations (\linux\_driver.py\, \windows\_driver.py\, etc.) by offloading I/O to dedicated threads and helper classes (\\_byte\_stream.py\ for packet parsing), resulting in cleaner, more maintainable code for all terminal-based applications.
src/textual/drivers · high confidence
Test coverage
Add comprehensive tests for the command palette; Added comprehensive test coverage for CSS parsing, inheritance, and screen styling; Added comprehensive tests for Document and WrappedDocument; Added comprehensive tests for Select widget behavior; Added comprehensive tests for the TextArea widget; Added comprehensive unit tests for the OptionList widget; Added regression tests for ListView behavior; Added test utility for rendering and normalizing output; Added tests for DirectoryTree path changes and show\_root property; Added tests for Footer key binding behavior; Added tests for animation behavior across components; Added tests for layout behavior and dimensions; Added tests for renderable components; Added tests for the input auto-completion and suggestion system; Added tests for the worker system; Added unit tests for SelectionList widget; Added unit tests for the Tree widget; Added unit tests for the notification system; Added unit tests for toggle widgets; Comprehensive unit tests for the Input widget; Expanded snapshot test coverage for widgets and layout components; Expanded test coverage for core widgets and utilities; New snapshot test infrastructure and initial test suite.
Dependencies
Update development dependencies and lockfile
The project's development dependencies have been updated, including adding httpx as a dev dependency and updating packages such as black, griffe, mkdocs-material, mypy, and pytest. The poetry.lock file has been regenerated to reflect these changes, ensuring consistent and reproducible builds for the development environment.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 47 → 70 (+23.1)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 89 → 85 (-3.3)
- Architecture 94 → 99 (+4.8)
- Maturity 66 → 59 (-6.7)
- Readiness 27 → 80 (+52.9)
- Security 50 → 74 (+23.6)
Resolved (42)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- Duplicated block (11 lines × 2) (src/textual/_styles_cache.py)
- Duplicated block (11 lines × 2) (src/textual/dom.py)
- Duplicated block (11 lines × 2) (src/textual/widgets/_tabs.py)
- Duplicated block (12 lines × 4) (tests/css/test_parse.py)
- Duplicated block (15 lines × 11) (tests/css/test_parse.py)
- Duplicated block (15 lines × 2) (src/textual/css/_styles_builder.py)
- Duplicated block (15 lines × 2) (src/textual/widgets/_data_table.py)
- Duplicated block (16 lines × 3) (src/textual/design.py)
- Duplicated block (16 lines × 3) (src/textual/design.py)
- Duplicated block (16 lines × 5) (tests/css/test_parse.py)
- Duplicated block (17 lines × 2) (src/textual/renderables/text_opacity.py)
- Duplicated block (18 lines × 2) (src/textual/style.py)
- Duplicated block (19 lines × 2) (src/textual/widgets/_button.py)
- Duplicated block (5 lines × 2) (docs/examples/widgets/sparkline_colors.py)
- Duplicated block (6 lines × 2) (examples/calculator.py)
- Duplicated block (7 lines × 2) (docs/examples/styles/outline_all.py)
- Duplicated block (7 lines × 2) (src/textual/css/styles.py)
- Duplicated block (8 lines × 2) (docs/examples/styles/border_all.py)
- …and 22 more
New (356)
- Animator._animate (cognitive 27) (src/textual/_animator.py)
- Animator._animate (cyclomatic 21) (src/textual/_animator.py)
- App.init (cognitive 24) (src/textual/app.py)
- App.init (cyclomatic 19) (src/textual/app.py)
- App._display (cognitive 19) (src/textual/app.py)
- App.on_event (cognitive 56) (src/textual/app.py)
- App.on_event (cyclomatic 27) (src/textual/app.py)
- BackgroundScreen.process_segments (cognitive 24) (src/textual/renderables/background_screen.py)
- Bar.__rich_console__ (cognitive 16) (src/textual/renderables/bar.py)
- Bar.__rich_console__ (cyclomatic 16) (src/textual/renderables/bar.py)
- BindingsMap.apply_keymap (cognitive 58) (src/textual/binding.py)
- BindingsMap.apply_keymap (cyclomatic 16) (src/textual/binding.py)
- ByteStreamParser.feed (cognitive 16) (src/textual/drivers/_byte_stream.py)
- Canvas.render (cognitive 26) (src/textual/canvas.py)
- Change coupling: constants.py ↔ types.py (src/textual/css/constants.py)
- Change coupling: horizontal.py ↔ vertical.py (src/textual/layouts/horizontal.py)
- ChopsUpdate.__rich_console__ (cognitive 42) (src/textual/_compositor.py)
- ChopsUpdate.render_segments (cognitive 16) (src/textual/_compositor.py)
- Color.parse (cyclomatic 17) (src/textual/color.py)
- ColorProperty.set (cognitive 20) (src/textual/css/_style_properties.py)
- …and 336 more
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed
Added bounded contexts (1)
- python
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
Textualize/textual 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 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 06dbeef4bb70fb718236aa418ed658ef4667a126 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d0929f7ac71f.