End-to-end smoke test of dist/tlc-1.0.0/INSTALL.sh --user into a
temp HOME uncovered two bugs:
1. Duplicate 'mkdir -p' block before/after the script_dir
resolution. Removed the redundant second block.
2. 'cp -r config/* locales/* mc-skins/*' failed when run with
--user into ~/.local because the locale/skin subdirs were
not created first (only the parent datadir was). Now creates
all four target subdirs in the same mkdir block.
Smoke test result after fix: install into a fresh $HOME succeeds;
'~/.local/bin/{tlc,tlcedit,tlcview}' are on PATH; each binary
responds to --version / help. Same applies to system-wide install
prefix=/usr/local.
.deb package tested separately: 'dpkg-deb -x' into a temp prefix
also works; binaries verified responsive.
Activates the v1.27-deferred fold/expand feature. The tree
view from v1.27 is now interactive: pressing Space on a
parent row toggles whether its descendants are visible.
- New App.folded: BTreeSet<u32> (PIDs whose subtrees are
collapsed; stable iteration order for future debug dumps)
- New App.process_cursor: usize (Process-tab cursor; distinct
from table_state which tracks the Per-CPU tab)
- New process::apply_fold(processes, folded) -> Vec<ProcessInfo>
Hides descendants of any PID in . The fold target
itself stays visible. Roots are never hidden. Cycles
tolerated (sort_tree's visited set prevents infinite loops).
- Fold indicator in tree_prefix: \u25b6 for folded, \u25bc for
expanded, no marker for leaf rows
- Space keypress (in tree mode only) toggles fold on the
cursor's selected PID; flashes 'folded PID N' or
'unfolded PID N' (or 'has no children to fold' for leaves)
- sort_tree kept pure; apply_fold is a separate post-step
applied in app.rs after sort_tree
Test count 107 -> 111 (+4):
- apply_fold_empty_set_is_identity
- apply_fold_hides_descendants_of_folded_root (folds root)
- apply_fold_hides_subtree_of_folded_child (folds middle;
sibling of folded node stays visible)
- apply_fold_unfold_restores (toggle off)
Redox stripped binary: 4,180,840 bytes (-8 KiB from v1.28;
linker dedup'd some shared code).
Compile warnings: 55 (unchanged).
Notes:
- No cursor navigation yet (j/k, down/up). Default cursor
is row 0, so user can fold the first process but cannot
yet move down. Defer to v1.30.
- No persist of fold state across redbear-power restarts.
Would require a config file. Defer.
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA753
Closes the v1.23-deferred 'vsize_kb' future-use. Adds SortMode::VSize
that sorts by virtual size, and swaps the Process panel's MEM
column to show VSZ (instead of RSS) when that sort is active.
The column-swap pattern (the column being sorted IS the column
being shown) keeps the panel at 10 columns instead of growing
to 11. htop uses the same pattern: when you sort by a field,
that field's column expands to show the data. No new column
means no terminal-width pressure at 1280x720 framebuffer.
The 'ppid' field's #[allow(dead_code)] is also removed (now
actively read by sort_tree + tree_prefix from v1.27). Both
fields now have proper doc comments explaining their use
(vs the v1.23 'reserved for future use' placeholder).
VSZ is a virtual address-space metric (mmap'd libraries, heap,
stack, reserved-but-uncommitted) and is often much larger than
RSS. Useful for 'who is using the most address space' but NOT
for 'who is using the most physical memory' (use RSS for that).
This caveat is now documented in the field's doc comment to
prevent operator confusion.
Test count 105 -> 107 (+2):
- sort_by_vsize_descending (basic)
- sort_by_vsize_uses_vsize_not_rss (contract test: huge VSZ +
tiny RSS sorts above tiny VSZ + huge RSS; catches any
'optimization' that uses the larger of the two fields)
- sort_cycle and io_name_is_io updated for VSize
Redox stripped binary: 4,189,032 bytes (+4 KiB from v1.27).
Compile warnings: 55 (no net change; the 2 removed
#[allow(dead_code)] annotations cancel against 2 new
warnings that did not exist before because the fields were
only accessed from the parse path).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA752
Adds dist/ packaging skeleton for the host Linux build:
dist/tlc-1.0.0/INSTALL.sh — generic tarball installer (system or --user)
dist/tlc-1.0.0/man/tlc.1 — man page for the file manager
dist/tlc-1.0.0/man/tlcedit.1 — man page for the standalone editor
dist/tlc-1.0.0/man/tlcview.1 — man page for the standalone viewer
dist/PKGBUILD — Arch Linux build recipe
dist/build_deb.sh — Debian/Ubuntu .deb builder
dist/deb/DEBIAN/control — Debian control file (binary-arch template)
dist/.gitignore — excludes built binaries + config (rebuilt at packaging)
Build outputs (NOT in git, produced locally on demand):
tlc-1.0.0-linux-x86_64.tar.gz 5.5 MB generic tarball
tlc_1.0.0-1_amd64.deb 2.3 MB Debian package
PLAN.md §17.8 added documenting that §17.4 P1-P4 are now complete
(commit 6c30edaf3e already landed). The §17.6 acceptance criterion
is met: grep for raw 'frame.render_widget(Clear' returns exactly 4
sites (terminal/popup.rs itself, filemanager/tree.rs full-screen,
and the two F9 top menu bars — all intentional). widget/dialog.rs
no longer appears.
P5 (SaveBeforeClose Y/N/Esc legend), P6 (viewer/editor SaveBeforeClose
unification), P7 (~15 decorative key-legend hints) remain deferred —
see §17.4 for rationale.
Header status line bumped to reflect P1-P4 completion + P5-P7 deferral.
Activates the v1.23-deferred 'ppid' future-use: parents render
above their children with ASCII tree connectors. The default
view is flat (no behavior change); the 'T' hotkey toggles
tree mode and flashes the status line.
Algorithm (in process::sort_tree):
1. Build pid -> index map
2. Group children by ppid (ppid -> Vec<index>)
3. Roots = ppid==0 or ppid not in pid set
4. Sort each sibling group by current SortMode (so e.g. RSS
sort still shows top-RSS child first within a parent)
5. DFS from each root, emitting parent + descendants pre-order
6. Defensive: append unvisited procs at end (cycle fallback)
Cycle protection: visited set; revisiting a PID stops recursion
(its children are still emitted once).
Render: tree_prefix(pid, ppid, all) returns
'' (root)
' \u2514\u2500 ' (last child)
' \u251c\u2500 ' (non-last child)
Walks ppid chain to compute depth (max 64 hops).
Status line: 'view: tree' shown when on; help text mentions 'T'.
Test count 101 -> 105 (+4):
- sort_tree_emits_parents_before_children (4-proc tree)
- sort_tree_handles_orphans (ppid not in list)
- sort_tree_handles_cycles (1->2->1 cycle)
- sort_tree_empty_input
Redox stripped binary: 4,184,936 bytes (+16 KiB from v1.26).
Compile warnings: 55 (unchanged).
Notes:
- vsize_kb still has #[allow(dead_code)]; will be activated in
a future memory-detail panel release.
- Tree is static (no fold/expand); defer to a v1.28 if needed.
- ppid's #[allow(dead_code)] can be removed in a follow-up
(now actively read by sort_tree and tree_prefix).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA751
Executes the four high-priority items from PLAN §17.4 backlog,
bringing all 4 of the remaining bespoke dialog surfaces onto the
unified render_popup / render_button_row path.
P1 (HIGH) widget/dialog.rs — Dialog::render now delegates the
shell to terminal::popup::render_popup instead of building
its own raw Clear + Block. This closes the only shadow
regression in the unified stack: Dialog::info / confirm /
confirm_all now inherit MC-matching rounded borders +
drop shadow + Clear + skin-driven palette, identical to
every other migrated dialog. New test
render_draws_drop_shadow_at_bottom_right_corner asserts the
shadow bg is painted at the popup's bottom-right cell.
P2 (HIGH) overwrite_dialog.rs — Y/N/All/Skip/Abort legend replaced
by 5-element render_button_row (Yes=Default, No=All,
SkipAll, Abort=Normal). Was 40 lines of hand-rolled Span
with hand-picked theme.executable / theme.error /
theme.title_bg / theme.warning colors. New test
render_uses_mc_bracket_button_shapes asserts Default uses
'[<' / '>]' brackets and Normal uses '[ ' / ' ]'.
P3 (MED) confirm_dialog.rs — '[ Save ] [ Cancel ]' Paragraph
replaced by 2-element render_button_row (Save=Default,
Cancel=Normal). New test asserts the same MC bracket shapes.
P4 (MED) editor/menubar.rs — F9 dropdown migrated to render_popup,
matching the already-migrated filemanager/menubar.rs
dropdown (committed in c032c9a787). Top menu bar (full-width
by design) intentionally untouched.
Acceptance criterion from §17.6 is met: grep for raw Clear returns
exactly 4 sites, all defensible:
- terminal/popup.rs (the renderer itself)
- filemanager/tree.rs (full-screen, intentional)
- filemanager/menubar.rs top bar (intentional full-width)
- editor/menubar.rs top bar (intentional full-width)
widget/dialog.rs no longer contains a raw Clear.
Tests: 1184 passing, 0 failing (was 1180; +4 new). Both release
builds (default + --features sftp) clean.
Completes the v1.22 audit W2 cleanup. v1.23 deferred this for a
CHANGELOG note; this release documents the breaking change.
REMOVED (no callers anywhere in the source tree):
- ProcInfo::read_with_cpu_pct(prev, dt_secs, num_cpus)
Was a 1-line wrapper around read_with_cpu_pct_sorted(..., Rss)
that no caller actually used. Migration: call
read_with_cpu_pct_sorted(prev, dt, ncpu, SortMode::default())
inline (or just use ProcInfo::read() if RSS is fine).
- ProcInfo::available() -> bool
Was a pre-flight check ('is /proc mounted?') that no caller
used. read() already returns ProcInfo::default() when /proc
is absent, so the empty result is the same signal. Migration:
check !proc.is_empty() after a read, or call read() and
handle the empty case.
OTHER CHANGES:
- Removed unused 'use std::path::Path;' (was only used by the
removed ProcInfo::available).
- Updated read_with_cpu_pct_sorted doc comment to mention
'CPU% and IO rates' (reflects the v1.25 addition).
BREAKING: any external consumer of redbear-power's process module
that called either of these methods will fail to compile. The
recipe's own source (the only known consumer) is updated.
Test count: 101 (unchanged; removed methods were untested).
Compile warnings: 55 -> 54 (the unused Path import is gone).
Redox stripped binary: 4,168,552 bytes (unchanged; the removed
code was tiny and the linker dedup'd the wrapper body).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA750
Per-process IO is now also a throughput metric (KiB/s), not just
cumulative. Cumulative bytes favor long-lived processes regardless
of activity; rate is what operators actually want for 'what is
hammering the disk right now'.
- New fields on ProcessInfo: io_read_rate_kbs, io_write_rate_kbs
(Option<f64>; None when prev missing, current None, or dt<=0)
- New method: io_total_rate_kbs() (sum; same None semantics)
- New helper: compute_rate_kbs(prev, now, dt) -> Option<f64>
uses saturating_sub for clock-reset safety
- read_with_cpu_pct_sorted now also computes the two rate fields
(negligible cost: 2 subs + 2 divs per process per refresh)
- New SortMode variants: IoRate, IoReadRate, IoWriteRate
inserted in cycle after IoWrite
- name() returns 'IO/s', 'R/s', 'W/s' for status line
- New sort_by_io_rate_field() helper (Option<f64> partial_cmp)
- New format_rate_kbs() on ProcessInfo (KiB/s, MiB/s, GiB/s, TiB/s;
saturates negative to 0)
- New RATE column in the Process panel between IO and RSS
Test count 87 -> 101 (+14):
- 6 compute_rate_kbs edge cases (basic, None prev/now, dt<=0,
saturating underflow, idle = zero)
- 2 io_total_rate_kbs (sum, None)
- 2 sort-by-rate (total, read-pushes-missing)
- 4 format_rate_kbs (sub-KiB, 1 MiB, 1 GiB, negative)
- sort_cycle and io_name_is_io updated for new variants
Redox stripped binary: 4,168,552 bytes (+49 KiB from v1.24;
14 new tests + 2 sort modes + 2 fields + render column + 3 helpers).
Compile warnings: 55 (unchanged).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA749
Comprehensive audit of every dialog in tlc — render path, button
source, shadow source, hotkey consistency. Verifies the Phase 16-18
work brought 44/46 dialog surfaces onto the unified render_popup
path (33 filemanager + 5 editor/render + 1 ops/progress), with MC
rounded borders + drop shadow + skin-driven palette inherited
automatically.
Identifies the remaining 7% (the four high-priority items in §17.4):
P1 (HIGH) widget/dialog.rs:194 — Dialog::render uses raw Clear +
own Block instead of render_popup, so Dialog::info / confirm /
confirm_all render flat-border popups with NO drop shadow.
Only shadow regression in the unified stack. ~5-10 LOC.
P2 (HIGH) filemanager/overwrite_dialog.rs:138-181 — hand-rolled
Y/N/All/Skip/Abort colored Span legend. Single most visually
inconsistent button strip in the codebase. Migrate to
render_button_row of 5 ButtonSpec. ~25-40 LOC.
P3 (MED) filemanager/confirm_dialog.rs:186-191 — '[ Save ] [ Cancel ]'
Paragraph with theme.hidden. Migrate to 2-button row. ~8-15 LOC.
P4 (MED) editor/menubar.rs:520 — F9 dropdown still uses hand-rolled
Block + Clear instead of render_popup. Filemanager menubar
dropdown was migrated (c032c9a787); editor was not. ~5-10 LOC.
Plus lower-priority items:
P5 editor SaveBeforeClose Y/N/Esc legend migration
P6 viewer/editor SaveBeforeClose unification
P7 (optional) ~15 decorative key-legend hints migrated to
ButtonKind::Narrow rows
§17.3 documents the intentional non-targets (full-screen TreeDialog,
F9 menu-bar top rows, viewer render_prompt_overlay) so future
auditors know not to migrate them.
§17.5 codifies the three hotkey patterns (Action OK/Cancel,
Yes/No confirm, Yes/No/All/Skip confirm) and the locale keys
that drive them.
§17.6 sets the acceptance criteria: after P1-P4, grep for raw
Clear should return 5 sites, all defensible. Zero shadow
regressions. Zero hand-rolled button strips that look like
real buttons.
Tests: 1180 passing, 0 failing (no code changes, audit only).
htop has had separate read/write sort modes since 2.0; v1.22
conflated them via io_total_kb(). v1.24 splits SortMode::Io
into three variants so operators can find read-heavy (DB
servers) vs write-heavy (log shippers) processes.
- New variants: SortMode::IoRead, SortMode::IoWrite
- Cycle updated: Rss -> Cpu -> Io -> IoRead -> IoWrite -> Pid
-> Name -> Rss
- name() returns 'IO', 'IO-R', 'IO-W' for disambiguation
(shown in status flash on 'o' keypress)
- Extracted sort_by_io_field() helper: shared 4-arm comparator
for (Some, Some) descending, (Some, None) Less,
(None, Some) Greater, (None, None) Equal. Eliminates the
DRY violation of repeating the 4-arm match in three places.
- Sentinel semantics preserved: None still sorts below Some;
column still renders em-dash for unreadable /proc/[pid]/io
- Column header unchanged: 'IO' column shows per-process
total; sort direction is in the status line. Minimal change;
adding separate R/W columns would push the panel past 100
chars and lose comm truncation.
Test count 83 -> 87:
- sort_by_io_read_ignores_writes
- sort_by_io_write_ignores_reads
- sort_by_io_read_pushes_missing_to_bottom
- sort_by_io_write_pushes_missing_to_bottom
- io_name_is_io now also locks IO-R and IO-W strings
- sort_cycle and sort_cycle_includes_io updated for new cycle
Redox stripped binary: 4,119,400 bytes (-8 KiB from v1.23;
the helper dedup actually shrunk the binary).
Compile warnings: 55 (unchanged; all new variants are used).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA748
- Add --address=unix:path=/run/dbus/system_bus_socket to dbus-daemon args
- Add before = ["13_redbear-sessiond.service"] for strict ordering
- Fixes redbear-sessiond "failed to read from socket" errors
The v1.22 audit + htop cross-reference surfaced a real defect:
on Redox, daemons whose /proc/[pid]/io is not exposed (permission
denied, proc scheme gap) silently clustered at 0 B in the IO
column, indistinguishable from genuinely idle processes. This
made SortMode::Io unreliable for finding the real IO hogs.
This release promotes the IO column to a proper sentinel model:
- io_read_kb / io_write_kb change from u64 to Option<u64>
- io_total_kb() returns Option<u64>; None when either field is None
- SortMode::Io uses 4-arm match on (a_total, b_total):
* both Some -> descending by total
* Some/None -> known sorts above unknown
* None/None -> stable tie (input order)
- Render layer shows em-dash (\u2014) when total is None
- Single-pass /proc/[pid]/io parse replaces two-helper double-read
(read_io_file returns Option<(u64, u64)> in bytes; caller /1024s
to KiB so the None sentinel propagates end-to-end)
- #[allow(dead_code)] on ppid, vsize_kb with documented future use
(process tree view, memory detail panel) per project warning policy
Test count 80 -> 83:
- Replaced misleading 'io_total_saturates_on_underflow' (tested
normal sum) with 'io_total_saturates_at_u64_max' (genuine edge)
- Added 'io_total_returns_none_when_fields_missing'
- Added 'sort_by_io_pushes_missing_to_bottom'
- Added 'io_name_is_io' to lock the SortMode::Io.name() string
Compile warnings 56 -> 55 (the ppid/vsize_kb dead_code warning
is now suppressed; remaining 55 are pre-existing in other modules).
Redox stripped binary: 4,127,592 bytes (+4 KiB from v1.22).
Linux smoke test confirms em-dash renders for kscreenlocker_g,
kwin_wayland, tailscaled, polkit-kde-auth (all owned-UID procs
that the kernel hides /proc/[pid]/io from on this dev host).
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA747
- Add fallback to copy from sysroot/usr/include/KHR/ if available
- Generate minimal khrplatform.h stub if neither exists
- Fixes build failure where Qt's qopengl.h cannot find KHR/khrplatform.h
tlcview now supports in-place byte-level editing in Hex view:
F4 (Text -> Hex), F2 (Hex -> HexEdit) toggles between read-only
hex view and an editable overlay. HexEdit mode draws an extra-
bright cursor over the *active nibble* (H or L) so the user
always knows which digit the next keystroke will replace.
Nibble pipeline (mirror of MC's mcedit hex cursor):
- type 'a'..'f' or '0'..'9': stash the high nibble and advance
to the low nibble; the byte is NOT yet written
- second nibble: combine with stashed high, write the byte,
advance the cursor by 1, reset to high nibble
- arrow keys: H/L toggle (Right/Left), row navigation (Up/Down),
page jump (PgUp/PgDn)
- F10/Esc/Ctrl-Q on a dirty buffer opens the
'Save before quit? (Y/N/Esc)' prompt; Y saves, N discards,
Esc cancels and stays in HexEdit
Byte storage:
- Inline and Compressed sources (the default for files < 1 MiB
and all .gz/.bz2) are mutated in place via the new
FileSource::write_byte(offset, value) helper.
- FileSource::save_to(path) persists the buffer byte-exact.
- Chunked sources (≥ 1 MiB plain files) refuse to enter
HexEdit — caller gets a silent no-op. The new
SourceError::NotMutable variant carries the diagnostic.
Header / footer:
- mode label changes from 'Hex' to 'HexEdit' in the header
- footer shows 'Nibble H' or 'Nibble L' (which digit is next)
- '[+]' marker appears after the mode label when the buffer
has unsaved edits
8 new tests cover: F2 enter, nibble commit + cursor advance,
dirty F10 opens prompt, clean F10 closes, Y/N/Esc prompt
resolution, Chunked refusal, arrow-key nibble toggling.
Total: 1172 tests passing, 0 failing.
Root cause: PciDevice::open_io_ports never called acquire_iopl(),
so the first outl to 0xCF8 triggered #GP(0) when redox-drm tried
to scan virtio-gpu PCI capabilities.
- Add ensure_iopl_acquired() helper (thread-local Once)
- Call it in PciDevice::open_io_ports before any I/O
- Add P1-pci-open-io-ports-iopl.patch to recipe
- Mirror patch to local/patches/ for durability
Replaces the AcceptAnyKey stub with KnownHostsHandler that pins
server keys against ~/.config/tlc/known_hosts (or
$XDG_CONFIG_HOME/tlc/known_hosts).
Storage model: each entry stores the SHA-256 fingerprint of the host
key (64-char lowercase hex), not the raw base64 key bytes. This
sidesteps the absence of a PublicKey::key_data() round-trip in
russh 0.44 and keeps the file format self-describing — fingerprints
are what the user sees in 'ssh-keygen -lf', so a quick visual
diff is enough to spot a MITM.
Three matching outcomes:
Match — host + fingerprint in store, accept connection
Mismatch — host in store, fingerprint changed → SshHandlerError::KeyMismatch
Unknown — host not in store → TOFU: append + save + accept
A mismatch returns Err, which surfaces to the caller as
VfsError::Connection("ssh: ...") with the presented and stored
fingerprints in the message — the user sees a hard reject, never
a silent re-trust. Save failures during TOFU are non-fatal (the
in-memory append is enough for the current session); the user will
see the TOFU prompt again next connect.
Tests: 9 known_hosts + 2 SFTP error-display = 11 new tests.
Total: 1172 passing, 0 failing.
Process tab gains a new IO column sourced from /proc/[pid]/io
read_bytes and write_bytes, summing them as a single sortable value.
- New fields on ProcessInfo: io_read_kb, io_write_kb
- New method: ProcessInfo::io_total_kb()
- New helpers: read_io_bytes, write_io_bytes (silent on failure;
/proc/[pid]/io may require CAP_SYS_PTRACE for owned UID)
- New SortMode::Io variant inserted into the cycle
(Rss -> Cpu -> Io -> Pid -> Name)
- Updated render header: VIRT replaced by IO (RSS preserved)
- 4 new unit tests; total 80 pass
- Redox stripped binary: 4123496 bytes
- Linux smoke test confirms opencode dominates IO, kscreenlocker_g shows 0.0 KiB
Docs: local/docs/redbear-power-improvement-plan.md \xC2\xA746
Wires the v1.20 SMART data module into the Storage tab UI.
Each disk now shows a health badge (✓ PASSED / ✗ FAILED / error).
Implementation:
- App.smart: SmartInfo field + 11-tick refresh (paired with Storage)
- Conditional refresh (if self.smart.available guard — avoids
re-running smartctl if we already know it's missing)
- render_storage_panel: 4 SMART badge states
1. !available → '(SMART: install smartmontools)'
2. health.passed → ' ✓ PASSED'
3. !health.passed → ' ✗ FAILED'
4. health.error → ' (SMART: <error>)'
Linux host smoke test (this dev host without smartctl):
- Each disk shows '(SMART: install smartmontools)' hint
- No panic, graceful degradation
- Storage tab still works (no regression)
Performance: smartctl subprocess ~5-50ms per disk, 3 disks = 15-150ms
per 11-tick refresh (5.5 sec), well within budget.
76/76 tests pass (no new tests — UI integration only).
Cross-compile SHA256: ed804710fa834f4453a236aa034d50668b948b391ec1d2ccea294d438016d855.
Docs: improvement plan §45, CONSOLE-TO-KDE §3.3.2 v1.21,
RATATUI-APP-PATTERNS §13.14 + §14 (6400 LoC, 21 modules, 76 tests).
Adds the smart.rs module for disk health monitoring. Since
smartctl is not installed on most systems (this dev host has it
absent), v1.20 implements the module with three-tier graceful
degradation per the zero-stub policy.
New module smart.rs (222 lines, 7 unit tests):
- SmartInfo struct with available + per-disk health records
- SmartHealth struct with passed + attributes + error
- SmartAttribute struct with id + name + value + worst + threshold + raw
- SmartInfo::smartctl_available() — checks smartctl --version
- SmartInfo::read(disks) — orchestrates per-disk smartctl -A -H
- parse_smartctl_output(text) — extracts passed/failed + attrs
- parse_attribute_line(line) — single 10-field SMART attribute
- parse_smart_value(s) — handles both hex (0x33) and decimal
- health_for(disk_name) — convenience accessor
Three-tier graceful degradation:
1. smartctl missing → available=false, disks=[]
2. smartctl errors per disk → error captured in SmartHealth
3. NVMe permission issues → error message, no fabrication
Updated main.rs: mod smart declaration.
76/76 tests pass (5 bench + 12 sensor + 13 network + 12 storage +
20 process + 7 pid_detail + 7 smart).
Linux host smoke test (this dev host without smartctl):
- available=false (graceful, no panic)
- Storage tab still works (no regression)
Cross-compile SHA256 unchanged from v1.19 (smart.rs is dead code
on Redox — compiles but never called).
Docs: improvement plan §44, CONSOLE-TO-KDE §3.3.2 v1.20,
RATATUI-APP-PATTERNS §13.14 + §14 (6360 LoC, 21 modules, 76 tests).
Format-paragraph was already implemented (Editor::format_paragraph
in src/editor/mod.rs + Alt-P keybind wired in handlers.rs at
0x70 within the Alt-modifier match arm). The function uses
editor::format::reformat_paragraph_at which walks contiguous
non-blank lines and re-flows them at DEFAULT_WRAP_WIDTH (72).
Undoable via begin_undo_group / end_undo_group pair.
This phase adds an end-to-end handler test that exercises the
keybinding path: insert a long paragraph, press Alt-P, verify
the buffer is marked modified. Pre-existing format.rs unit tests
cover the formatting details (wrap widths, blank-line
boundaries, undo); this test verifies the integration.
PLAN.md §15d row 32 marked Done.
Tests: 1154 passed (was 1153, +1). Release binaries build clean.
Closes the v1.13 §37.6 forward-work item (the last one). Process
tab now supports case-insensitive substring filtering on the
process name (comm).
Implementation summary:
- New App.process_filter: String field
- Hotkey 'f' opens text-input mode (pattern reused from refresh-
interval input):
- chars → push to filter buffer
- Backspace → pop
- Enter → commit filter, flash match count
- Esc → discard buffer + clear filter
- Filter applied in render_process_panel:
- For each process, skip if non-empty filter doesn't match
(case-insensitive substring on comm)
- Header line shows filter indicator + hint
- Helper proc_filter_match_count(app) for status message
- 4 new unit tests (case insensitive + substring + no match + empty)
- 62/62 tests pass
Build: clean
Cross-compile SHA256: 12913dedc9b0ea58ed3e7418527da34c903f70be703b8676e4273042c73ac875
Docs: improvement plan §42, CONSOLE-TO-KDE §3.3.2 v1.18,
RATATUI-APP-PATTERNS §13.14 + §14 (5840 LoC, 62 tests).
Mirrors MC's edit_sort_cmd flow (CK_Sort / M-F8 →
src/editor/editcmd.c::edit_sort_cmd):
1. Require a marked block; surface error message if no
selection is active.
2. Stash the active selection to a unique temp file under
/tlc-sort-<nanos>/in.txt (per-call unique dir to
avoid races between concurrent sort runs).
3. Run via 'sh -c sort <opts> <in> > <out>' so user-supplied
options pass through verbatim (matches MC g_strconcat).
Empty options means default lexical sort.
4. On non-zero exit: surface exit code + first stderr line.
5. On success: delete the original selection, insert the
sorted output at the cursor, mark buffer modified, and
surface a status line ('Sort: ok (N bytes, M lines)').
Components:
src/editor/mode.rs — new PromptKind::Sort variant.
src/editor/handlers.rs — Alt-F8 keybind (errors if no
selection, otherwise opens the sort prompt); commit_prompt
routes PromptKind::Sort to Editor::sort_block(options).
src/editor/render.rs — title ('Run sort') + label ('sort
options (empty for default)') + mode tag (' [Sort]') for
the prompt.
src/editor/mod.rs — Editor::sort_block(options).
Tests: 1153 passed (was 1150, +3):
- sort_block_sorts_active_selection (apple/banana/cherry)
- sort_block_with_no_selection_reports_error
- sort_block_with_reverse_flag (-r → c/b/a)
Release binaries build clean.
PLAN.md §15d row 32a marked Done.
Mirrors Midnight Commander's
MC src/viewer/actions_cmd.c::mcview_load_next_prev (CK_FileNext
/ CK_FilePrev).
Components:
src/viewer/siblings.rs (new) — pure helper next_or_prev_sibling:
reads current file's parent directory, filters out hidden
files (dot-prefixed), sorts case-insensitive, locates current
by file_name, returns next (direction=+1) or prev (direction=-1)
entry. Returns None at directory boundaries or on I/O error.
6 unit tests cover next/prev/last/first/hidden/no-parent.
src/viewer/mod.rs — Viewer::open_next / Viewer::open_prev
public methods that look up the sibling and reload viewer
state via a private reload_at helper (mirrors MC's
mcview_init/mcview_done pair around mcview_load). Source
errors are converted to std::io::Error so the Result type
matches the existing open() signature.
src/viewer/mod.rs — Ctrl-F / Ctrl-B keybinds in handle_key.
Each delegates to open_next / open_prev.
PLAN.md §15d row 29 marked Done; status bumped to Phase 23.
Tests: 1150 passed (was 1141, +9: 6 siblings module tests +
3 viewer integration tests covering open_next, open_prev,
Ctrl-F/Ctrl-B keybinds). Release binaries build clean.
Replaces the Phase 21 TODO stub with the full MC
edit_user_menu flow:
src/editor/mod.rs — Editor::run_user_menu_command(raw_command):
1. Expand percent variables via PercentCtx::for_file
(MC: expand_format).
2. Stash active selection to clipfile (MC: edit_save_block).
Block file path exposed via %b for downstream expansion.
3. Run via 'sh -c <expanded>' so user can use pipes,
redirections, globs (matches MC user_menu_cmd shell-out).
4. On non-empty stdout: delete any selection, then
insert_str at cursor position (MC: edit_insert_file).
Buffer cursor is synced to editor cursor after
delete_selection so the insert lands at the right spot.
5. Status line: 'Menu: ok (N bytes inserted)' on success,
'Menu: exit N, stderr: ...' on failure.
src/editor/handlers.rs — replaces TODO with call to
self.run_user_menu_command(command).
Tests: 1141 passed (was 1137, +4):
- inserts stdout at cursor
- replaces active selection (cursor sync verified)
- reports non-zero exit status
- expands %f to current file path via cat %f
Release binaries build clean.
Mirrors Midnight Commander's editor user-menu flow (MC
src/editor/edit.c::edit_user_menu + CK_UserMenu).
Architecture reuses the existing filemanager usermenu infra:
filemanager::usermenu::UserMenuDialog is constructed with
condition='edit' so the same ~/.config/tlc/menu file works
in both filemanager (condition='view') and editor contexts.
Components:
src/editor/usermenu.rs (new) — EditorUserMenu wrapper that
owns the dialog + cursor snapshot + selection flag +
clipfile path. Plus reuses
PercentCtx::for_file; default_block_file() resolves
/tlc/editor.block or ~/.config/tlc/editor.block.
src/editor/menubar.rs — adds EditorCmd::UserMenu and
EditorCmd::EditUserMenu variants (cross-referenced MC
CK_UserMenu + CK_EditUserMenu).
src/editor/mod.rs — new usermenu_session: Option<EditorUserMenu>
field, init None in both constructors, Editor::open_user_menu
method, dispatch_editor_cmd wires UserMenu/EditUserMenu
variants (EditUserMenu surfaces path via status message —
full Open wiring deferred to follow-up).
src/editor/handlers.rs — F11 keybind opens user menu (F11 is
MC's editor UserMenu binding per misc/mc.default.keymap;
F2 in the editor is reserved for Save). Routing at top of
handle_key intercepts Running/Cancel/Execute outcomes;
Execute surfaces the command in the status line — full
selection-stash + stdout-capture is deferred TODO.
Tests: 1137 passed (was 1132, +5: 4 editor::usermenu module
tests covering expand, default_block_file, EditorUserMenu
construction, key routing; 1 handler test for F11 open + Esc close).
Closes the v1.13 §37.6 forward-work item. Process tab now shows
real-time CPU usage per process, computed from the delta of
total CPU ticks between successive 13th-tick refreshes.
Source code already landed (process.rs + app.rs + render.rs).
This commit captures full v1.14 docs:
- Improvement plan §38 (CPU% in Process Tab)
- CONSOLE-TO-KDE §3.3.2 v1.14
- RATATUI-APP-PATTERNS §13.14 (audit table +14) + §14 (19 modules, 47 tests)
Implementation summary:
- New cpu_pct: f64 field on ProcessInfo
- New ProcInfo::read_with_cpu_pct(prev, dt_secs, num_cpus)
- Wall-clock dt (SystemTime) — accurate even when TUI pauses
- saturating_sub on ticks prevents underflow if now < prev
- num_cpus from self.cpus.len() (Per-CPU detection result)
- 4 new unit tests (formula + zero + underflow + dt=0)
- 47/47 total tests pass
Math sanity check (verified by unit test):
utime=100→200, stime=50→80, dt=2sec, num_cpus=4
delta = 280-150 = 130 ticks / 2 sec = 65 ticks/sec
CPU% = 65 / 4 cpus * 100 = 1625.0%
Cross-compile SHA256: d46cd66b8e158e2327839ef502879951877a5500d4a40807d3dbc72ed7397231.
Phase 20 ships the editor's F9 menu bar as a self-contained,
testable widget. Mirrors Midnight Commander's
src/editor/editmenu.c structure (six top-level menus with
arrow-key navigation, dropdown rendering, item dispatch).
Components:
src/editor/menubar.rs — EditorMenuBar + EditorCmd + render()
src/editor/mod.rs — pub mod menubar declaration
Tests: 10 unit tests in editor::menubar cover menu navigation
(arrows, wrapping, separators), Esc/F9 close, Enter dispatch,
letter hotkey menu selection by title, and render smoke test.
Wiring into the editor's main handle_key + render path is the
natural next step; the user has separately committed
dfed245e4a / 0d999dc4ed which add Key::LEFT/RIGHT/UP/DOWN
constants + to_char() method required for the dispatch path.
PLAN.md header bumped to Phase 20 complete.