Skip to content

fix(tui): route tracing to log file in TUI modes - #68

Closed
dnacenta wants to merge 1 commit into
mainfrom
fix/tui-tracing-to-file
Closed

fix(tui): route tracing to log file in TUI modes#68
dnacenta wants to merge 1 commit into
mainfrom
fix/tui-tracing-to-file

Conversation

@dnacenta

@dnacenta dnacenta commented May 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stdout tracing was bleeding onto the ratatui alternate screen, corrupting renders in chat and interactive up.
  • Splits tracing init into init_stdout_tracing (default CLI) and init_file_tracing (TUI). TUI logs land in <root>/logs/pulse-null.log.
  • main detects TUI commands (Chat, Up { headless: false }) and skips stdout init; the TUI handlers initialize the file writer themselves once they know their entity root.

Test plan

  • cargo fmt --check
  • cargo clippy -- -D warnings -A dead_code (matches CI)
  • cargo build (default features)
  • CI: cargo test + cargo build --release
  • Manual: pulse-null chat — render is clean, logs accumulate in <root>/logs/pulse-null.log
  • Manual: pulse-null up (interactive) — same
  • Manual: pulse-null up --headless — logs still go to stdout (server mode unchanged)

Stdout tracing on the TUI alternate screen corrupts ratatui's render.
Defer tracing init for Chat and non-headless Up to a file-backed writer
at <root>/logs/pulse-null.log. Other commands continue to use stdout.

- New init_stdout_tracing / init_file_tracing helpers in cli::mod.
- main detects TUI commands and calls init_stdout_tracing only when not.
- chat::run and up::run_single_entity / run_multi_entity init the file
  writer from the entity root or entity-home dir.
@dnacenta dnacenta self-assigned this Jun 11, 2026
@dnacenta

Copy link
Copy Markdown
Owner Author

Closing: 3 months stale (41 commits behind), CI red, and main has since touched the same files. Will redo file-based TUI tracing fresh if still needed.

@dnacenta dnacenta closed this Aug 10, 2026
@dnacenta
dnacenta deleted the fix/tui-tracing-to-file branch August 10, 2026 09:09
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