Skip to content

Fix/run#13

Merged
JeffreyUrban merged 16 commits intomainfrom
fix/run
Dec 21, 2025
Merged

Fix/run#13
JeffreyUrban merged 16 commits intomainfrom
fix/run

Conversation

@JeffreyUrban
Copy link
Copy Markdown
Owner

This pull request introduces a major update to the tui-delta CLI and documentation, replacing the run command with a new into command that writes processed TUI output directly to a specified file or named pipe. The documentation has been thoroughly revised to reflect this change, clarify usage patterns, and add advanced debugging and post-processing workflows. Additionally, the CLI reference now documents a new decode-escapes command for interpreting terminal escape sequences in logs. Several patterns for capturing, filtering, and analyzing session logs are now demonstrated using named pipes for real-time post-processing.

The most important changes are:

CLI Command Redesign and Enhancements

  • Replaced the run command with into throughout the codebase and documentation. The new into command writes processed deltas to a file or named pipe, enabling more robust logging and post-processing workflows. The CLI help and argument structure were updated accordingly (src/tui_delta/cli.py, all documentation). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]
  • Added a new decode-escapes command to the CLI, allowing users to convert raw escape sequences in output logs to human-readable markers for easier debugging and analysis. Comprehensive documentation and usage examples were added.

Documentation Overhaul and Usage Patterns

  • Updated all quick start, use-case, and custom profiles documentation to use into instead of run, with examples for logging, post-processing via named pipes, and advanced workflows such as real-time filtering and searching. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  • Added sections and examples for debugging pipeline stages using the --stage-outputs option, showing how to inspect intermediate files and decode escape sequences for troubleshooting and custom profile development. [1] [2] [3]

Improved Log and Output Handling

  • Provided new patterns for capturing clean logs (removing ANSI codes) using named pipes and filters (sed, ansifilter), and for real-time log analysis with tools like less, grep, and logger without interfering with TUI display. [1] [2] [3] [4] [5]

Testing and Maintenance

  • Updated transient file patterns in test cleanup to include new log file types and stage output files, ensuring test artifacts are properly managed. (docs/conftest.py)
  • Increased the maximum allowed file size for pre-commit's check-added-large-files to 10MB. (.pre-commit-config.yaml)

This update modernizes tui-delta's workflow, making it more flexible for advanced logging, debugging, and integration with external tools.

JeffreyUrban and others added 16 commits December 20, 2025 19:46
…ample to help. Added new claude output pattern.
- Add activity_spinner_unknown for unknown activity states
- Add task_todos_unknown for unknown task states
- Place catch-all patterns LAST in profile for lowest priority
- Known states match specific patterns, unknown states caught gracefully
- Future Claude Code changes will show as [*-unknown:...] in output

This follows the pattern structure:
  [prefix](esc to interrupt[INTERMEDIATE])[suffix]

Where intermediate content varies but prefix/suffix are fixed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add -u flag to all Python commands for unbuffered I/O
- Set PYTHONUNBUFFERED=1 environment variable for all pipeline processes
- Ensures output file is updated in real-time during session
- Prevents data being buffered until TUI closes

Python uses full buffering when stdout is a pipe, causing output to be
delayed until buffer fills or process exits. Using -u flag and
PYTHONUNBUFFERED env var forces unbuffered/line-buffered I/O for
immediate output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update tests for 'run' → 'into' command rename and new output_file parameter:

- test_cli.py: Update all command invocations to use 'into' with output files
- test_coverage_gaps.py: Add output_file parameter to build_script_command tests
- test_oracle.py: Add output_file parameter to run_tui_with_pipeline tests
- test_integration.py: Fix command_line parameter and add output_file

Tests now pass: 277/282 (5 remaining failures are doc line length issues)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Validate profile against available profiles before running
- Show clear error message with available profiles
- Exit immediately with code 1 on invalid profile
- Fixes test_cli.py::test_run_command_invalid_profile

Error message example:
  Error: Profile 'nonexistent' not found.
  Available profiles: claude_code, generic, minimal
  Use 'tui-delta list-profiles' to see descriptions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Shorten example commands to fit within 80 character limit:
- quick-start.md: Use shorter example (echo instead of printf)
- ai-assistants.md: Simplify date format in timestamped filename
- custom-profiles.md: Use shorter file and profile names
- cli.md: Use shorter output filename

All 282 tests now pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add --stage-outputs option documentation to CLI reference
- Document decode-escapes command with usage examples
- Add debugging section to quick start guide
- Add stage outputs debugging guide to custom profiles
- Explain stage naming convention and use cases

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 84.30493% with 35 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tui_delta/escape_decoder.py 85.07% 10 Missing and 10 partials ⚠️
src/tui_delta/run.py 83.58% 10 Missing and 1 partial ⚠️
src/tui_delta/cli.py 80.00% 3 Missing ⚠️
src/tui_delta/consolidate_clears.py 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@JeffreyUrban JeffreyUrban merged commit d8b0a72 into main Dec 21, 2025
9 checks passed
@JeffreyUrban JeffreyUrban deleted the fix/run branch December 21, 2025 23:57
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