phoenix-tui/phoenix
77.4
Strong · 3 August 2026
37.7k
lines of production code
Go
primary language
2
measurements over time
What this system is
This system is a comprehensive terminal user interface (TUI) framework that provides a complete rendering engine for high-performance terminal output. It manages the full lifecycle of terminal state, including raw mode, screen buffers, and external process execution. The framework offers a rich set of capabilities such as cross-platform clipboard support, mouse interaction, theme management, and a collection of interactive components and examples.
Features
Add Confirm dialog component for user confirmation flows
The components area now includes a new Confirm dialog component that provides a Yes/No/Cancel confirmation interface. Users can present confirmation prompts with customizable titles, descriptions, and button labels. The component supports safe defaults (No button focused by default for dangerous actions), keyboard navigation (arrow keys, Tab/Shift+Tab, Enter, Escape), and optional Cancel button support. The implementation includes domain models for state management, infrastructure for keyboard handling, and example applications demonstrating basic and dangerous action patterns.
components · high confidence
Add mouse interaction support with click, drag, and hover detection
The mouse module now provides comprehensive mouse event handling, including parsing raw terminal sequences (SGR, X10, URxvt protocols) and enriching them with semantic actions like single/double/triple click detection, drag tracking with configurable thresholds, and hover state management for UI components. The system introduces new domain models for mouse events and bounding boxes, along with services to process motion, scroll, and menu positioning logic.
mouse · high confidence
Add theme system with presets and runtime switching
The style module now includes a complete theme system, allowing users to apply visual identities across the application. This includes four built-in presets (Default, Dark, Light, and HighContrast) and the ability to create custom themes with specific color palettes, border styles, spacing scales, and typography settings. The system supports runtime switching between themes via a thread-safe ThemeManager, which also allows for partial theme overrides and merging. Additionally, the style module introduces a comprehensive Style model that supports fluent configuration of colors, borders, padding, margin, size constraints, alignment, and text decorations, all of which are applied in a defined pipeline to generate ANSI-styled output.
style · high confidence
Added release and quality-assurance scripts
Added four new shell scripts in the scripts directory to support the release process and code quality checks: bump-versions.sh updates cross-module Go module versions; create-release-tags.sh generates Git tags for all 10 modules plus the root; fix\_godot.sh corrects Go comment formatting; and lint\_all.sh runs golangci-lint across all modules. Additionally, pre-release-check.sh provides a comprehensive pre-release validation including go vet, cross-compilation checks, build verification, and test execution with race detection via WSL2 auto-detection.
scripts · high confidence
Initial release of the Phoenix TUI rendering engine
The Phoenix TUI framework introduces a new rendering subsystem that enables high-performance terminal output. This release adds a \Renderer\ that performs differential rendering by computing diffs between buffer states, optimizing output by only sending changed cells and styles to the terminal. The system includes domain models for \Buffer\ (2D cell arrays), \Cell\ (character, style, and width), and \Color\ (RGB/ANSI 256 conversion). It also provides services for computing diffs (\DiffService\) and optimizing operations (\OptimizeService\) to reduce ANSI sequence redundancy. The \Buffer\ model supports Unicode grapheme cluster handling for accurate width calculation. This foundational layer allows applications to render terminal interfaces with minimal overhead.
render · high confidence
Introduce automated performance tracking and benchmarking infrastructure
The benchmarks directory now includes a complete performance tracking system, including shell scripts to run, compare, and baseline Go benchmarks for render and Unicode string width operations. The change also moves existing correctness and comparison tests from the core domain service into the benchmarks/comparison directory, updating their package and import paths to reflect the new structure.
benchmarks · high confidence
Introduce cross-platform clipboard support with history tracking and rich text capabilities
The Phoenix TUI framework now includes a new \clipboard\ package that provides cross-platform clipboard operations for Windows, macOS, and Linux, with automatic fallback to OSC 52 escape sequences for remote sessions. This release adds support for plain text, HTML, and RTF formats, along with an in-memory clipboard history feature that tracks clipboard operations with configurable size and age limits. The implementation includes a builder API for custom configuration, thread-safe operations, and comprehensive test coverage. Example applications demonstrate history management, image clipboard operations, and rich text formatting.
clipboard · high confidence
New interactive TUI examples for mouse, CLI, and scrolling
Added several new examples to the examples directory: a Cobra + Phoenix CLI/TUI hybrid demonstrating the recommended pattern for production CLI tools; a context-menu example showcasing smart edge-detection for popup menus; a drag-scroll example for the Viewport component; a hover-highlight example demonstrating mouse hover detection and visual feedback; and an umbrella module example showing the convenience API. These examples cover mouse integration, viewport scrolling, and hybrid CLI/TUI patterns.
examples · high confidence
Phoenix TUI Framework v0.2.4 release: InlineRenderer, Windows fixes, and documentation updates
This release introduces the InlineRenderer for non-alt-screen rendering with per-line diffing, ANSI-preserving width truncation, and automatic window size forwarding. It also fixes 6 flaky inputReader tests on Windows by replacing racy checks with a race-free generation counter, and updates all README files to be version-agnostic.
(repo-wide) · high confidence
Behavioural changes
Internalizes core domain and value types
The core domain and value types (such as Terminal, RawMode, Capabilities, and Size) have been moved from the public \core/domain\ and \core/domain/value\ packages into the internal \core/internal\ directory. This change restricts the visibility of these types to the application's internal implementation, ensuring that external consumers cannot depend on these specific internal structures. All existing tests and internal services have been updated to import from the new internal paths.
core/internal · high confidence
Layout package restructured with internal domain models and new example tests
The layout package has been refactored to move internal domain models (Box, FlexContainer, Node) and their associated services into an internal directory, making them private to the package. This change updates all internal imports to use the new internal paths and renames the value types to avoid conflicts. Additionally, example tests have been added to demonstrate the most common use cases, including creating a box with padding, arranging items in a horizontal row, and stacking items in a vertical column.
layout · high confidence
Move examples into core package and update API usage
The basic and unicode example files have been moved from the root examples directory into the core package. The code has been updated to use the new internal package path (github.com/phoenix-tui/phoenix/core) instead of the previous external or service-specific imports. Additionally, the examples now call public API functions directly (e.g., core.StringWidth) rather than using a separate service instance, reflecting the migration to the Relica pattern and internal structure refactoring.
core/examples · high confidence
Refactored core package structure and added Unicode width calculation
The core package has been restructured, moving the main API from core/api/ to core/core.go, and introducing a new core/unicode.go module. This update provides correct Unicode and Emoji width calculation (fixing issues with CJK and emoji rendering), along with updated internal package paths for domain models and services. The public API now includes explicit capability detection and improved terminal size handling.
core · medium confidence
Fixes
Fix terminal state management for external process execution
The \ExecProcess\ method now correctly manages terminal state when running external commands. It ensures the terminal exits raw mode and the alternate screen buffer before execution, and restores them afterward, even if the command fails. Additionally, a new \ExecProcessWithTTY\ API is introduced for Unix and Windows platforms, providing deeper control over terminal settings: on Unix, it uses \ioctl\ calls to manage process groups and foreground status, while on Windows, it manages console modes. This allows child processes to have full terminal control (e.g., for nested shells or job control) while ensuring the TUI state is properly preserved and restored.
tea · high confidence
Test coverage
Add terminal infrastructure and comprehensive test coverage; Added testing package with NullTerminal and MockTerminal helpers.
Dependencies
Update Phoenix TUI framework dependencies to v0.2.4
The Phoenix TUI framework and its submodules (core, components, style, layout, tea, terminal, testing, clipboard, mouse) have been updated to version 0.2.4. This update replaces the internal \uniseg\ dependency with \uniwidth\ v0.2.0, removes several indirect dependencies (including \go-osc52\, \lipgloss\, \runewidth\, and \terminfo\), and updates \golang.org/x/sys\ to v0.40.0 and \golang.org/x/term\ to v0.39.0. Additionally, the \components/list\, \components/modal\, \components/table\, \examples/basic\, and \examples/unicode\ modules have been removed.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 76 → 77 (+1.9)
- Rubric changed (rubric-2026.08.18 → rubric-2026.08.19) — scores are not directly comparable.
Lenses
- Code Health 82 (new)
- Architecture 100 (new)
- Maturity 81 → 81 (+0.0)
- Readiness 68 → 68 (+0.0)
- Security 91 → 91 (+0.0)
- Domain Modelling 100 (new)
- Event-Driven 100 (new)
Resolved (8)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- Low: security finding (details withheld)
- complexity unreadable for .go — churn × complexity hotspots could not be measured
New (97)
- DefaultTextAligner.AlignVertical (cognitive 16) (style/internal/domain/service/text_aligner.go)
- Duplicated block (10 lines × 2) (components/progress/examples/multi_progress/main.go)
- Duplicated block (11 lines × 2) (clipboard/clipboard.go)
- Duplicated block (11 lines × 2) (clipboard/examples/richtext-clipboard/main.go)
- Duplicated block (11 lines × 2) (components/form/internal/domain/model/form.go)
- Duplicated block (11 lines × 3) (components/modal/examples/basic/main.go)
- Duplicated block (12 lines × 2) (components/input/examples/styled/main.go)
- Duplicated block (12 lines × 2) (render/internal/application/renderer.go)
- Duplicated block (13 lines × 2) (mouse/internal/infrastructure/parser/urxvt_parser.go)
- Duplicated block (14 lines × 2) (components/multiselect/internal/domain/model/multiselect.go)
- Duplicated block (14 lines × 2) (components/multiselect/multiselect.go)
- Duplicated block (14 lines × 2) (tea/internal/application/program/program.go)
- Duplicated block (15 lines × 2) (style/internal/domain/model/theme_presets.go)
- Duplicated block (15 lines × 2) (style/internal/domain/service/spacing_calculator.go)
- Duplicated block (15 lines × 4) (components/modal/examples/basic/main.go)
- Duplicated block (16 lines × 2) (components/input/internal/textarea/domain/service/navigation.go)
- Duplicated block (16 lines × 2) (components/multiselect/internal/domain/model/multiselect.go)
- Duplicated block (16 lines × 2) (core/internal/domain/service/unicode_service.go)
- Duplicated block (16 lines × 2) (mouse/internal/infrastructure/parser/sgr_parser.go)
- Duplicated block (16 lines × 2) (tea/internal/application/program/program.go)
- …and 77 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
phoenix-tui/phoenix 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 3 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1b34fceb05746a41fa20a6c0932e35d2fdb818af — the exact code this score is about.
- Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer latest.