64325790de
Borrowed from bottom v0.11.2 comparison assessment (17 implementation passes):
New modules:
- src/graph.rs: BrailleGraph widget (Canvas + Marker::Braille) for
time-series rendering; RingHistory buffer with display_max() for
stable y-axis scaling (nice rounding: 1,2,5,10,20,50,100...)
- src/kill.rs: process kill dialog with signal selection,
Cell<usize> interior mutability pattern, 2s auto-close timer
- src/event.rs: typed Event enum (Key, Mouse, Tick, Resize, Terminate)
New features:
- Braille graphs: 5 widgets across 4 tabs (CPU%, Temp°C, PkgW,
Net KiB/s, Disk KiB/s) with y-axis labels and reserved margin
- Theme system: dark/light/high-contrast presets, --theme CLI flag
with validation, wired into panel_border(), BrailleGraph,
header governor, cursor highlight
- Widget expansion (e key): full-screen tab toggle with hint bar
- Data freeze (f key): pause data updates with [FROZEN] indicator
- Process kill dialog (k key): SIGTERM/SIGKILL/SIGINT/SIGHUP
- --once mode: now renders 3 braille graphs + all text panels
- Double-refresh at startup for ≥2 graph data points
- Startup diagnostic to stderr (cores, governor, MSR, DMI name)
Stability fixes:
- MSR per-CPU failure cache (Mutex<Vec<bool>>) — avoids repeated
doomed /dev/cpu/*/msr opens; auto-clears every ~30s (60 refreshes)
- skip_refresh guard: if refresh >200ms, skip next cycle to
prevent refresh pile-up on slow MSR reads
- collector.rs: removed Barrier — threads start work immediately
instead of waiting for all threads to spawn
- panic hook: restores terminal on panic
- IsTerminal check: clear error message before entering raw mode
Bug fixes:
- 4 key shadowing bugs found and fixed:
'g' (governor vs. move-to-top) — removed unreachable arm
'T' (tab-cycle vs. tree-toggle) — changed tree to 'y'
'f' (freeze vs. process-filter) — changed filter to 'F'
- Key::Esc ordering: kill dialog → PID detail → quit
- process panel header updated ('y' for tree, 'F' for filter)
Build:
- Cargo.toml: [profile.release] lto=true, opt-level=3, codegen-units=1
→ 4.1 MB binary (was 6.1 MB, -33%)
- libc 0.2 dep for Linux kill() in kill dialog
- cargo fmt applied project-wide
Tests: 217 passed (was 198, +19 new)
- graph: 5 tests (RingHistory, display_max, 3 render smoke tests)
- kill: 6 tests (dialog lifecycle, selection wrap, auto-close, render)
- app: 8 integration tests (CPU detection, graph population, governor,
temp source, expand toggle, freeze, skip-refresh)
Docs:
- local/docs/RATATUI-APP-PATTERNS.md updated to v1.44+ status:
§13.14 current feature table, §15 braille graph pattern,
§16 modal dialog pattern, §17 key audit pattern,
§14 line counts updated (13,091 LoC, 27 modules, 217 tests),
summary expanded to 13 rules