Skip to content

feat: wire captured samples into panels (8 languages) and add NO_COLOR - #9

Open
tsilenzio wants to merge 4 commits into
mainfrom
feat/sample-panels
Open

feat: wire captured samples into panels (8 languages) and add NO_COLOR#9
tsilenzio wants to merge 4 commits into
mainfrom
feat/sample-panels

Conversation

@tsilenzio

Copy link
Copy Markdown
Owner

Summary

First increment of the real-ANSI-sample work.

  • Commit the captured ANSI samples (samples/*.ansi) and scripts/generate-samples, and drop samples/ from the crate exclude so include_bytes! works under cargo install
  • Embed the three cleanly-renderable captures (C/C++, Ruby, Lua) as (real) panels via ansi-to-tui, alongside the hand-built ones for comparison
  • Add --no-color and honor the NO_COLOR env var: after rendering, reset every cell's fg/bg to terminal default while keeping bold/dim/etc.
  • Reorder Node before Python in the grid
  • Refresh TODO.md for shipped work and the live/scriptable-pane direction

Deferred 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-tui directly, 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) green
  • cargo package --list shows samples/ included, scripts/ excluded
  • Verified real panels render (C/C++ preview) and NO_COLOR strips color while keeping bold/dim (screenshots)
  • CI green

- 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).
@tsilenzio tsilenzio changed the title feat: wire clean captured samples into panels and add NO_COLOR feat: wire captured samples into panels (8 languages) and add NO_COLOR Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant