From 933336180fbb27c3a86949668412df87328191cd Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 20 Jun 2026 19:41:59 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20ratatui=20=C2=A713.14=20+=20=C2=A714=20?= =?UTF-8?q?=E2=80=94=20bump=20to=20v1.11=20(Network=20tab,=2024=20tests)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the ratatui-audit table + cross-reference summary to reflect v1.11: §13.14 audit table: - v1.11 entry: 'No Network tab' → 'Implemented in v1.11' - LoC count: ~4400 → ~5150 across 17 modules, 17 → 24 unit tests - Module count: 15 → 17 §14 cross-reference: - '~4900 LoC across 16 modules, with 17 unit tests' → '~5150 LoC across 17 modules, with 24 unit tests' - 'sysfs/MSR + meminfo + DMI + battery + hwmon' → 'sysfs/MSR + meminfo + DMI + battery + hwmon + net' - 'AMD CPU fallback' → 'AMD CPU + net/sysfs fallback' - '17 unit tests' → '24 unit tests (bench + sensor + network)' Source code (network.rs + main.rs + render.rs) and full §35 + v1.11 plan/consolehdk doc already landed in commit dfed245e4a (tlc bundled). This commit catches up the ratatui cross-reference doc that didn't fit in that bundle. --- local/docs/RATATUI-APP-PATTERNS.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/local/docs/RATATUI-APP-PATTERNS.md b/local/docs/RATATUI-APP-PATTERNS.md index b67f85096b..33b858d8af 100644 --- a/local/docs/RATATUI-APP-PATTERNS.md +++ b/local/docs/RATATUI-APP-PATTERNS.md @@ -1092,8 +1092,8 @@ Use the canonical pattern from §1 (poll + sleep). | Modular crates | Single crate | Split (3-4 crates) | More granular split | ### 13.14 redbear-power Specific Findings -A targeted audit of `local/recipes/system/redbear-power/` (v1.10, 4945 LoC -across 16 modules, 17 unit tests) produced these actionable findings: +A targeted audit of `local/recipes/system/redbear-power/` (v1.11, 5150 LoC +across 17 modules, 24 unit tests) produced these actionable findings: | Severity | Finding | Fix | |----------|---------|-----| @@ -1116,6 +1116,7 @@ across 16 modules, 17 unit tests) produced these actionable findings: | feature | Only prime-sieve benchmark | Implemented in v1.8 (FFT + AES + single-core toggle, 5 unit tests) | | feature | No Sensors tab | Implemented in v1.9 (`sensor.rs` module + `TabId::Sensors`, 7 unit tests) | | feature | Per-CPU Temp n/a on AMD (Intel-only MSR) | Implemented in v1.10 (`SensorInfo::pkg_temp_c` fallback to k10temp/coretemp/zenpower) | +| feature | No Network tab | Implemented in v1.11 (`network.rs` module + `TabId::Network`, 7 unit tests) | Full plan: see `local/docs/redbear-power-improvement-plan.md`. @@ -1376,12 +1377,12 @@ gives a natural unit-of-work (count) that scales with thread count. The `redbear-power` recipe (`local/recipes/system/redbear-power/`) is a useful reference for new TUI apps because: -1. **Small enough to read in one sitting** (~4900 LoC across 16 modules, with 17 unit tests) -2. **Self-contained** — no D-Bus, no external state, just sysfs/MSR + meminfo + DMI + battery + hwmon +1. **Small enough to read in one sitting** (~5150 LoC across 17 modules, with 24 unit tests) +2. **Self-contained** — no D-Bus, no external state, just sysfs/MSR + meminfo + DMI + battery + hwmon + net 3. **Modern ratatui 0.30 patterns** — `TableState`, modular layout, status bars, `Tabs` widget -4. **Cross-platform** — same binary works on Linux + Redox (MSR/scheme + sysfs/proc fallback + hwmon fallback for AMD CPUs) +4. **Cross-platform** — same binary works on Linux + Redox (MSR/scheme + sysfs/proc fallback + hwmon fallback for AMD CPUs + net/sysfs fallback) 5. **Well-documented** — extensive code comments + this doc + improvement plan -6. **Testable** — bench + sensor modules have 17 unit tests covering stress modes + hwmon unit conversions + multi-vendor pkg_temp_c +6. **Testable** — bench + sensor + network modules have 24 unit tests covering stress modes + hwmon unit conversions + multi-vendor pkg_temp_c + binary byte formatting When porting a new Red Bear TUI app, structure it like redbear-power: