Skip to content

[URGENT] Windows: CLI verbose logging still leaks into TUI alt-screen after PR #1776 (second commit was not merged) #1909

@aboimpinto

Description

@aboimpinto

Summary

PR #1776 ("fix: stop RUST_LOG from leaking tracing messages into TUI alt-screen on Windows") was submitted with two commits:

  1. MERGED1874359a fix: stop RUST_LOG from leaking tracing messages into TUI alt-screen on Windows (changes logging.rs)
  2. NOT MERGEDfix: suppress verbose CLI logging on Windows alt-screen to prevent TUI leak (changes crates/tui/src/tui/ui.rs)

The maintainer merged the first commit but closed PR #1776 without merging the second, critical commit.

Why this is urgent

On Windows, stderr cannot be redirected to the log file via dup2 (no Unix-style fd redirection). Even after the RUST_LOG fix, eprintln! calls from crate::logging still leak into the TUI alt-screen buffer when --verbose or DEEPSEEK_LOG_LEVEL=debug is used, because the verbose flag is never suppressed on alt-screen entry.

What the missing commit does

The missing commit (submitted in PR #1910) calls crate::logging::set_verbose(false) at two points:

  1. In run_tui() � right after EnterAlternateScreen, so verbose logging is suppressed for the entire TUI session.
  2. In resume_terminal() � right after re-entering alt-screen during terminal recovery, so the suppression holds across suspend/resume cycles.

This ensures that on Windows, where stderr redirection is unavailable, verbose CLI output does not corrupt the alt-screen display.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    In progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions