Skip to content

feat: add log rotation, non-blocking writes, and CLI log flags

785ba22
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat: add log rotation, non-blocking writes, and CLI log flags #398

feat: add log rotation, non-blocking writes, and CLI log flags
785ba22
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 7, 2026 in 2s

clippy

77 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 77
Note 0
Help 0

Versions

  • rustc 1.95.0-beta.7 (cc969f3c4 2026-04-03)
  • cargo 1.95.0-beta.7 (f2d3ce0bd 2026-03-21)
  • clippy 0.1.95 (cc969f3c45 2026-04-03)

Annotations

Check warning on line 182 in crates/tui/src/ui/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the variable `char_pos` is used as a loop counter

warning: the variable `char_pos` is used as a loop counter
   --> crates/tui/src/ui/mod.rs:182:5
    |
182 |     for (ci, ch) in path_str.char_indices() {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_pos, (ci, ch)) in path_str.char_indices().enumerate()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_counter_loop
    = note: `#[warn(clippy::explicit_counter_loop)]` on by default

Check warning on line 110 in crates/tui/src/ui/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
   --> crates/tui/src/ui/mod.rs:103:5
    |
103 | /     if let Some(sb) = sidebar_area {
104 | |         if app.mode == AppMode::NoSession
105 | |             && app.focus == Focus::CallStack
106 | |             && !app.file_browser_results.is_empty()
...   |
110 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
    |
103 ~     if let Some(sb) = sidebar_area
104 ~         && app.mode == AppMode::NoSession
105 |             && app.focus == Focus::CallStack
...
108 |             render_file_browser_overflow(app, frame, sb);
109 ~         }
    |

Check warning on line 47 in crates/tui/src/ui/variables.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/variables.rs:35:21
   |
35 | /                     if ref_id > 0 {
36 | |                         if let Some(children) = app.variables_cache.get(&ref_id) {
37 | |                             for child in children {
38 | |                                 flat_items.push(make_variable_item(
...  |
47 | |                     }
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
35 ~                     if ref_id > 0
36 ~                         && let Some(children) = app.variables_cache.get(&ref_id) {
37 |                             for child in children {
...
45 |                             }
46 ~                         }
   |

Check warning on line 48 in crates/tui/src/ui/variables.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/variables.rs:34:17
   |
34 | /                 if let Some(ref_id) = var.variables_reference {
35 | |                     if ref_id > 0 {
36 | |                         if let Some(children) = app.variables_cache.get(&ref_id) {
37 | |                             for child in children {
...  |
48 | |                 }
   | |_________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
34 ~                 if let Some(ref_id) = var.variables_reference
35 ~                     && ref_id > 0 {
36 |                         if let Some(children) = app.variables_cache.get(&ref_id) {
...
46 |                         }
47 ~                     }
   |

Check warning on line 77 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:77:22
   |
77 |         binding_line(&kb_step_out, "Step Out", key_style, desc_style),
   |                      ^^^^^^^^^^^^ help: change this to: `kb_step_out`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 76 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:76:22
   |
76 |         binding_line(&kb_step_into, "Step In", key_style, desc_style),
   |                      ^^^^^^^^^^^^^ help: change this to: `kb_step_into`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 75 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:75:22
   |
75 |         binding_line(&kb_step_over, "Step Over", key_style, desc_style),
   |                      ^^^^^^^^^^^^^ help: change this to: `kb_step_over`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 74 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:74:22
   |
74 |         binding_line(&kb_restart, "Restart session", key_style, desc_style),
   |                      ^^^^^^^^^^^ help: change this to: `kb_restart`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 73 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:73:22
   |
73 |         binding_line(&kb_stop, "Terminate / Shutdown", key_style, desc_style),
   |                      ^^^^^^^^ help: change this to: `kb_stop`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 68 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:68:13
   |
68 |             &kb_continue,
   |             ^^^^^^^^^^^^ help: change this to: `kb_continue`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 14 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/help.rs:14:24
   |
14 |     let popup_height = ((area.height as f32 * 0.85) as u16).min(45).max(12);
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.height as f32 * 0.85) as u16).clamp(12, 45)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 13 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/help.rs:13:23
   |
13 |     let popup_width = ((area.width as f32 * 0.7) as u16).min(70).max(40);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.7) as u16).clamp(40, 70)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 16 in crates/tui/src/ui/file_picker.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/file_picker.rs:16:23
   |
16 |     let popup_width = ((area.width as f32 * 0.6) as u16).min(80).max(30);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.6) as u16).clamp(30, 80)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 15 in crates/tui/src/ui/evaluate_popup.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/evaluate_popup.rs:15:23
   |
15 |     let popup_width = ((area.width as f32 * 0.5) as u16).min(60).max(30);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.5) as u16).clamp(30, 60)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp
   = note: `#[warn(clippy::manual_clamp)]` on by default

Check warning on line 92 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`)
  --> crates/tui/src/ui/code_view.rs:92:41
   |
92 | ...                   return Some((frame.line as usize).saturating_sub(1));
   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: try: `frame.line`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_cast

Check warning on line 94 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/code_view.rs:90:21
   |
90 | /                     if let Some(source) = &frame.source {
91 | |                         if source.path.as_ref() == Some(path) {
92 | |                             return Some((frame.line as usize).saturating_sub(1));
93 | |                         }
94 | |                     }
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
90 ~                     if let Some(source) = &frame.source
91 ~                         && source.path.as_ref() == Some(path) {
92 |                             return Some((frame.line as usize).saturating_sub(1));
93 ~                         }
   |

Check warning on line 19 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

initializer for `thread_local` value can be made `const`

warning: initializer for `thread_local` value can be made `const`
  --> crates/tui/src/ui/code_view.rs:19:72
   |
19 |     static LAST_FILE: std::cell::RefCell<Option<std::path::PathBuf>> = std::cell::RefCell::new(None);
   |                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { std::cell::RefCell::new(None) }`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#missing_const_for_thread_local
   = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default

Check warning on line 217 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` has identical blocks

warning: this `if` has identical blocks
   --> crates/tui/src/syntax.rs:215:58
    |
215 |                   let gutter_marker = if is_exec && has_bp {
    |  __________________________________________________________^
216 | |                     "\u{25b6}" // ▶ (exec takes precedence, but on a bp line)
217 | |                 } else if is_exec {
    | |_________________^
    |
note: same as this
   --> crates/tui/src/syntax.rs:217:35
    |
217 |                   } else if is_exec {
    |  ___________________________________^
218 | |                     "\u{25b6}" // ▶
219 | |                 } else if has_bp {
    | |_________________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#if_same_then_else
    = note: `#[warn(clippy::if_same_then_else)]` on by default

Check warning on line 200 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `map_or` can be simplified

warning: this `map_or` can be simplified
   --> crates/tui/src/syntax.rs:199:35
    |
199 |                   let is_selected = selection_range
    |  ___________________________________^
200 | |                     .map_or(false, |(start, end)| line_idx >= start && line_idx <= end);
    | |_______________________________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use `is_some_and` instead
    |
200 -                     .map_or(false, |(start, end)| line_idx >= start && line_idx <= end);
200 +                     .is_some_and(|(start, end)| line_idx >= start && line_idx <= end);
    |

Check warning on line 184 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (10/7)

warning: this function has too many arguments (10/7)
   --> crates/tui/src/syntax.rs:173:5
    |
173 | /     pub fn build_lines(
174 | |         highlighted: &[Vec<StyledSegment>],
175 | |         start_line: usize,
176 | |         gutter_width: usize,
...   |
183 | |         inline_evals: &std::collections::HashMap<usize, String>,
184 | |     ) -> Vec<Line<'static>> {
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments

Check warning on line 116 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the loop variable `line_idx` is used to index `lines`

warning: the loop variable `line_idx` is used to index `lines`
   --> crates/tui/src/syntax.rs:116:25
    |
116 |         for line_idx in start_line..end_line.min(lines.len()) {
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_range_loop
    = note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
    |
116 -         for line_idx in start_line..end_line.min(lines.len()) {
116 +         for (line_idx, <item>) in lines.iter().enumerate().take(end_line.min(lines.len())).skip(start_line) {
    |

Check warning on line 710 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for an equality check. Consider using `if`

warning: you seem to be trying to use `match` for an equality check. Consider using `if`
   --> crates/tui/src/input.rs:703:5
    |
703 | /     match action {
704 | |         LineEditorAction::Submitted => {
705 | |             if is_paused {
706 | |                 app.evaluate_repl();
...   |
709 | |         _ => {}
710 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#single_match
help: try
    |
703 ~     if action == LineEditorAction::Submitted {
704 +         if is_paused {
705 +             app.evaluate_repl();
706 +         }
707 +     }
    |

Check warning on line 707 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` can be collapsed into the outer `match`

warning: this `if` can be collapsed into the outer `match`
   --> crates/tui/src/input.rs:705:13
    |
705 | /             if is_paused {
706 | |                 app.evaluate_repl();
707 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_match
help: collapse nested if block
    |
704 ~         LineEditorAction::Submitted
705 ~             if is_paused => {
706 |                 app.evaluate_repl();
707 ~             }
    |

Check warning on line 682 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` can be collapsed into the outer `match`

warning: this `if` can be collapsed into the outer `match`
   --> crates/tui/src/input.rs:680:13
    |
680 | /             if !app.output_auto_scroll {
681 | |                 app.output_scroll_offset = app.output_scroll_offset.saturating_sub(1);
682 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_match
help: collapse nested if block
    |
679 ~         KeyCode::Char('k') | KeyCode::Up
680 ~             if !app.output_auto_scroll => {
681 |                 app.output_scroll_offset = app.output_scroll_offset.saturating_sub(1);
682 ~             }
    |

Check warning on line 677 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` can be collapsed into the outer `match`

warning: this `if` can be collapsed into the outer `match`
   --> crates/tui/src/input.rs:675:13
    |
675 | /             if !app.output_auto_scroll {
676 | |                 app.output_scroll_offset = app.output_scroll_offset.saturating_add(1);
677 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_match
help: collapse nested if block
    |
674 ~         KeyCode::Char('j') | KeyCode::Down
675 ~             if !app.output_auto_scroll => {
676 |                 app.output_scroll_offset = app.output_scroll_offset.saturating_add(1);
677 ~             }
    |