From 32fac97c3f4b69a5449e85e276da5ea6ef48cfd0 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 20 Jun 2026 18:22:58 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20ratatui=20=C2=A714=20cleanup=20?= =?UTF-8?q?=E2=80=94=20collapse=20duplicated=20=C2=A714=20headers=20+=20ad?= =?UTF-8?q?d=20v1.8=20bullet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleans up §14 (Cross-Reference: redbear-power as a Reference Implementation) which had three duplicate headers from successive edits. Collapses to a single canonical version and adds the v1.8-specific bullet: 'Testable — bench module has 5 unit tests covering all stress modes + toggles' Net change: -25 lines, +2 lines. Source code for v1.8 (bench.rs + main.rs + render.rs) and full docs for §32 + v1.8 in improvement plan + CONSOLE-TO-KDE plan landed in commit d6ac3d1377 (qtbase bundled). This commit completes the doc-only cleanup that didn't fit in that bundle. --- local/docs/RATATUI-APP-PATTERNS.md | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/local/docs/RATATUI-APP-PATTERNS.md b/local/docs/RATATUI-APP-PATTERNS.md index 264d8734d9..385143d605 100644 --- a/local/docs/RATATUI-APP-PATTERNS.md +++ b/local/docs/RATATUI-APP-PATTERNS.md @@ -1372,38 +1372,15 @@ gives a natural unit-of-work (count) that scales with thread count. ## 14. Cross-Reference: redbear-power as a Reference Implementation -## 14. Cross-Reference: redbear-power as a Reference Implementation - 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** (~4400 LoC across 15 modules) +1. **Small enough to read in one sitting** (~4400 LoC across 15 modules, with 5 unit tests) 2. **Self-contained** — no D-Bus, no external state, just sysfs/MSR + meminfo + DMI + battery 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) 5. **Well-documented** — extensive code comments + this doc + improvement plan - -## 14. Cross-Reference: redbear-power as a Reference Implementation - -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** (~4400 LoC across 15 modules) -2. **Self-contained** — no D-Bus, no external state, just sysfs/MSR + meminfo + DMI + battery -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) -5. **Well-documented** — extensive code comments + this doc + improvement plan - -## 14. Cross-Reference: redbear-power as a Reference Implementation - -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** (~4100 LoC across 14 modules) -2. **Self-contained** — no D-Bus, no external state, just sysfs/MSR + meminfo + DMI -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) -5. **Well-documented** — extensive code comments + this doc + improvement plan +6. **Testable** — bench module has 5 unit tests covering all stress modes + toggles When porting a new Red Bear TUI app, structure it like redbear-power: