9cd0a25906
v1.37 audit found 2 new bugs + recommended 5 v1.38 htop/btop-parity features. This release fixes both bugs and ships all 5 features. v1.37-0 (HIGH): set_tab() clears last_clicked_cpu The v1.37 re-click-to-expand feature set last_clicked_cpu on click but never reset it on tab switch. A user who clicked Per-CPU row 5, switched tabs, and came back would unexpectedly toggle expand. Fix: add App::set_tab(TabId) helper that resets both last_clicked_cpu and expanded_cpu, and route all 9 tab keys (1-9) + T through it. v1.37-1 (MEDIUM): mouse click respects filter The Process tab mouse click set process_cursor from the raw screen row, ignoring the active filter. With a filter active, the cursor highlight wouldn't align with the click, and right-click opened the wrong PID detail. Fix: new App::process_cursor_at_y(y, first_data_y) that walks the post-filter visible list and clamps to the last visible row. Wired into both left-click and right-click in handle_mouse. v1.38-2: SortDir + i key for direction toggle htop parity for the 'i' key. New App.sort_ascending: bool. The SortMode enum gets a new sort_ascending(procs, true) method (the existing sort() now delegates to sort_ascending(procs, false) for backward compat). On each refresh, if sort_ascending is true, the processes are re-sorted after the default descending pass. Press 'i' to flip; the status flash includes the current direction. v1.38-3: cmdline + io_priority in PID detail htop parity. New PidDetail.cmdline reads /proc/[pid]/cmdline, replaces NUL with space, strips trailing NULs. Rendered in the PID detail popup (truncated to 120 chars). New PidDetail.io_priority reads /proc/[pid]/stat field 47. Both are tolerant of missing files. v1.38-4: per-disk I/O throughput sparkline btop parity. New App.disk_history: BTreeMap<String, VecDeque<u8>> keyed by disk name. Mirrors the io_history pattern: each storage refresh collects raw kbps samples, normalizes per-disk against its own max, writes u8 to the public history. Rendered in the Storage tab as a 12-char sparkline next to each disk name. Reaps disks that have disappeared. Test count 140 -> 149 (+9): - set_tab_clears_last_clicked_cpu_and_expanded_cpu - process_cursor_at_y_respects_filter - process_cursor_at_y_clamps_to_last_visible - sort_ascending_flips_rss_order - read_cmdline_replaces_nul_with_space - read_cmdline_handles_missing_pid - read_io_priority_handles_self - read_io_priority_handles_missing_pid - update_disk_history_reaps_exited_disks Redox stripped binary: 4,348,776 bytes (+106 KiB from v1.37). Compile warnings: 56 (unchanged; all pre-existing).