Repository navigation
Conversation
Options such as -d, -t, --no-color, -H, --no-auto-update and -s changed the live config, and the next save (closing Setup, changing a column, picking a theme) wrote them to config.json. One `htop --no-color` run could leave every later session monochrome. Saving now writes the file's value for any setting that still holds its command-line value; a setting changed in-app is saved as before. Reset All Settings drops the overrides. The benchmark refresh rate moves into the same override path. -s now accepts every column header (case-insensitive, e.g. io_rate, gpu%, time+) plus the old aliases, and an unknown name fails during argument parsing instead of after the terminal switches to the alternate screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGrdiiacNPhARasAaxgfPa
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Mike · project thread
Problem
apply_config_overrideswrites command-line options straight into the liveConfig, and every save path (closing Setup, toggling or moving a column, picking a theme or GPU) writes the whole config toconfig.json. So one run of:htop --no-color→ every later session is Monochromehtop -d 100→ refresh rate stays 100 mshtop -t/-H 5/--no-auto-update→ tree default, highlight, and auto-update are changed for goodhtop -s pid→ the Main tab's saved sort is replaced…as soon as the user opens and closes Setup.
--readonlywas already made runtime-only for the same reason; the other options were not.Fix
config::CliOverridesremembers the config as loaded and as launched. On save, any setting that still holds its command-line value is written with the file's value; a setting the user changed in-app is saved normally (and the baseline updates after each successful write). The-ssort is tracked per tab the same way.--benchmark10 ms refresh rate moves intoapply_config_overrides, so it goes through the same path.-s/--sortThe README advertises 27 sortable columns but
-saccepted 8. It now accepts every column header case-insensitively (io_rate,gpu%,time+,npu-mem, …) plus the old aliases (cpu,mem/memory,time,cmd,threads). An unknown name now fails during argument parsing, before the terminal enters the alternate screen. Sorting by the column the tab already uses keeps its direction; a different column sorts descending, as when it's picked in-app.Testing
cargo clippy --all-targets --target x86_64-pc-windows-gnu -- -D warnings: clean.cli_overrides_are_not_saved_until_changed_in_app,cli_sort_is_not_saved_until_changed_in_app,cli_sort_applies_to_the_active_tab_without_being_saved,reset_settings_drops_cli_overrides,sort_accepts_every_column_header_and_aliases,benchmark_refresh_rate_yields_to_an_explicit_delay.retained_render,visual_test,installed_versionandinstaller_serialization, under Wine on Linux; all passed. Tests that need real process enumeration, D3DKMT or console handles can't run under Wine, so Windows CI is the full gate.Generated by Claude Code