refactor: unify TUI theme system, improve CLI structure and test coverage#202
Merged
Sunrisepeak merged 14 commits intomainfrom Mar 9, 2026
Merged
Conversation
… coverage - Add theme module (core/ui/theme.cppm) with cyberpunk-minimalist color palette - Add banner module (core/ui/banner.cppm) for styled help text and tips - Add info_panel module (core/ui/info_panel.cppm) for package/config display - Update progress, table, selector components to use theme colors and ROUNDED borders - Restructure CLI: move --lang/--mirror/--add-xpkg to config subcommand, add --index-repo - Add -g/--global flag to install for forcing global scope in project context - Detect unknown commands early with TUI error + styled help output - Intercept subcommand -h/--help for consistent TUI-styled help across all commands - Replace self update git-pull with update-index + install-latest + use-latest flow - Enrich self config and top-level config with TUI info panel display - Enrich info command with installation details (active version, paths, bindings, subos refs) - Fix profile gc: switch from broken generation-based to workspace-based xpkg references - Add "latest" version support in xvm cmd_use (resolves to highest installed version) - TUI-ify xvm version listing with info panel, styled version display - Replace all raw print_line/fprintf in xself with log::* calls - Fix GCC 15 std::format width-specifier crash in profile.cppm - Add unit tests: profile generation CRUD, xvm latest/namespaced version match, log level filtering Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dows - Change TUI config labels from "home/data/subos" to "XLINGS_HOME/XLINGS_DATA/XLINGS_SUBOS" to match release script grep checks - Make LogTest.LevelFiltering robust: unique temp file, GTEST_SKIP on open failure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The TUI info panel inserts ANSI codes between labels and values, so exact format grep like "XLINGS_HOME: /path" no longer matches. Split into separate checks for label and path presence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FTXUI Dimension::Full() defaults to 80 columns when no terminal is attached (CI pipes). Long paths in config output were being truncated. Now computes minimum width from field content to ensure no truncation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split combined grep patterns into separate checks for package name and install status, since TUI output places them on different lines with ANSI escape codes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…led" When d2x is already installed via s1, the s2 install output says "all packages already installed" without mentioning "d2x" by name. Remove the d2x name check for s2 and only verify install status. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The atexit handler was printing \033[?25h unconditionally, polluting captured output in CI tests (e.g. node --version via shim). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add strip_ansi() helper to project_test_lib.sh so assert_contains works with TUI output containing ANSI escape codes - Guard cursor-show escape in main.cpp with isatty() check to prevent polluting captured shim output in CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use portable perl-based ANSI stripping in assert_contains - Split exact label:value assertions into separate label and value checks - Relax install plan assertions to match TUI format - Handle "installed" status on separate lines from package names Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The XLINGS_RES mirror rewrite test needs to see the download URL in output to verify correct resource server resolution. Changed from log::debug to log::info. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert log::info back to log::debug for download URLs - the debug level is correct by design. Update XLINGS_RES test to verify install success via result checking instead of grepping for URLs in output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test uses a dummy URL (example.com) that always fails to download. On main, the install summary incorrectly reported success regardless of individual failures. Now that failure reporting is correct, adapt the test to verify package resolution instead of install success. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
theme.cppm,banner.cppm,info_panel.cppmmodules with cyberpunk-minimalist color palette (cyan accent, magenta highlights, ROUNDED borders)--lang/--mirror/--add-xpkgtoconfigsubcommand, add--index-repooption, add-g/--globaltoinstall, detect unknown commands with TUI error-h/--helpoutputs use styled FTXUI rendering;self config,config,xvm use/listall use TUI info panelsgit pullwithxlings update+xlings install xlings@latest -y+xlings use xlings latestxlings use <pkg> latestnow resolves to highest installed versionstd::format("{:03d}", ...)withsnprintfto avoid width-specifier crash in C++23 modulesTest plan
xmake build— compiles cleanlyxmake build xlings_tests && xmake run xlings_tests— all 116 tests passxlings subo -h— unknown command shows TUI error + styled helpxlings self -h— TUI styled subcommand helpxlings self config— TUI info panel with all config fieldsxlings config— TUI info panel (no options)xlings use d2x latest— resolves to highest version (0.1.4)xlings use d2x— TUI info panel with version listxlings self updateend-to-end (requires published xlings package)🤖 Generated with Claude Code