• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jzombie / term-wm / 20770181342

07 Jan 2026 04:02AM UTC coverage: 36.037% (+2.5%) from 33.582%
20770181342

Pull #3

github

web-flow
Merge 4d97c195c into ab0b82880
Pull Request #3: General UI improvements

454 of 2495 new or added lines in 26 files covered. (18.2%)

17 existing lines in 7 files now uncovered.

2515 of 6979 relevant lines covered (36.04%)

2.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/src/components/mod.rs
1
use crossterm::event::Event;
2
use ratatui::layout::Rect;
3

4
use crate::ui::UiFrame;
5

6
pub mod ascii_image;
7
pub mod confirm_overlay;
8
pub mod debug_log;
9
pub mod dialog_overlay;
10
pub mod list;
11
pub mod scroll_view;
12
pub mod status_bar;
13
pub mod terminal;
14
pub mod toggle_list;
15

16
pub use ascii_image::AsciiImage;
17
pub use confirm_overlay::{ConfirmAction, ConfirmOverlay};
18
pub use debug_log::{
19
    DebugLogComponent, DebugLogHandle, DebugLogWriter, global_debug_log, install_panic_hook,
20
    log_line, set_global_debug_log, take_panic_pending,
21
};
22
pub use dialog_overlay::DialogOverlay;
23
pub use list::ListComponent;
24
pub use scroll_view::ScrollView;
25
pub use status_bar::StatusBar;
26
pub use terminal::{TerminalComponent, default_shell, default_shell_command};
27
pub use toggle_list::{ToggleItem, ToggleListComponent};
28

29
pub trait Component {
30
    fn resize(&mut self, _area: Rect) {}
×
31

32
    fn render(&mut self, frame: &mut UiFrame<'_>, area: Rect, focused: bool);
33

34
    fn handle_event(&mut self, _event: &Event) -> bool {
1✔
35
        false
1✔
36
    }
1✔
37
}
38

39
#[cfg(test)]
40
mod tests {
41
    use super::*;
42
    use crate::ui::UiFrame;
43
    use crossterm::event::Event;
44
    use ratatui::prelude::Rect;
45

46
    struct DummyComp;
47
    impl Component for DummyComp {
NEW
48
        fn render(&mut self, _frame: &mut UiFrame<'_>, _area: Rect, _focused: bool) {}
×
49
    }
50

51
    #[test]
52
    fn default_handle_event_returns_false() {
1✔
53
        let mut d = DummyComp;
1✔
54
        assert!(!d.handle_event(&Event::Key(crossterm::event::KeyEvent::new(
1✔
55
            crossterm::event::KeyCode::Char('a'),
1✔
56
            crossterm::event::KeyModifiers::NONE
1✔
57
        ))));
1✔
58
    }
1✔
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc