feat: wire captured samples into panels (8 languages) and add NO_COLOR - #9
Open
tsilenzio wants to merge 4 commits into
Open
feat: wire captured samples into panels (8 languages) and add NO_COLOR#9tsilenzio wants to merge 4 commits into
tsilenzio wants to merge 4 commits into
Conversation
- add the captured ANSI samples and generate-samples script to the repo, and include samples/ in the published crate (needed for include_bytes!) - embed the clean cpp/ruby/lua captures as real panels via ansi-to-tui - add --no-color and honor the NO_COLOR env var: strip all color after render while keeping bold/dim/etc. - reorder node before python in the grid - refresh TODO to reflect shipped work and the live/scriptable-pane direction
The captures are only the tool's output, so sample panels jumped straight into it. Prepend the detected prompt and the command line so the real panels match the hand-built ones.
- add a Lua project to the scaffold so the Lua panels get a real captured prompt instead of the bare $ fallback - add a prompt_with_command helper that appends the command to the prompt's input line (e.g. '> busted ...') instead of a separate $ line, matching how a real shell shows it; use it in the sample panels
- flatten the animated captures (pytest, vitest, cargo, gradle, zig) through a tmux replay so their cursor-movement/CR progress collapses to the final frame, which ansi-to-tui can then render - wire Python/Node/Rust/Java/Zig real panels alongside the existing C++/Ruby/Lua ones (8 languages total) - skip C# (dotnet output flattens to ~900 lines) and Go (no color) for now The captures still carry machine-specific paths; sanitizing or replacing the hand-built panels is left as a follow-up (see TODO).
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
First increment of the real-ANSI-sample work.
samples/*.ansi) andscripts/generate-samples, and dropsamples/from the crateexcludesoinclude_bytes!works undercargo install(real)panels viaansi-to-tui, alongside the hand-built ones for comparison--no-colorand honor theNO_COLORenv var: after rendering, reset every cell's fg/bg to terminal default while keeping bold/dim/etc.TODO.mdfor shipped work and the live/scriptable-pane directionDeferred to a follow-up (noted in TODO): flattening the 6 animated captures (pytest, vitest, cargo, etc.) that use cursor-movement/CR and can't be rendered by
ansi-to-tuidirectly, plus per-panel word wrap. The Python demo-alignment fix rides on that flattening work.Test plan
task check(fmt, clippy -D warnings, 7 tests incl. updated count) greencargo package --listshowssamples/included,scripts/excluded