feat: replace help overlay with config viewer - #10
Merged
Merged
Conversation
Add ConfigSource and ConfigSources structs to preserve individual config sources (global, local, env) alongside the merged config. Refactor load_global_config/load_local_config to return file paths. Add load_config_with_sources() as the primary config loading entry point.
Replace the Help overlay (which duplicated footer keybindings) with a Configuration viewer that shows global, local, and effective settings with source indicators (← global, ← local, ← env, (default)). - Rename AppMode::Help to AppMode::Config - Add scrollable config dialog with ↑↓/C-p/C-n navigation - Clamp scroll position to content bounds - Update footer hint from "?: help" to "?: config"
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.
Summary
?キー)をフッターのキーバインド表示と重複していたため、設定確認ダイアログに置き換えChanges
src/config/loader.rs,src/config/mod.rsConfigSource,ConfigSources構造体を追加し、設定ファイルのパスと個別設定を保持load_config_with_sources()を追加。既存のload_global_config/load_local_configはパスも返すように変更src/app.rsAppMode::Help→AppMode::Configにリネームconfig_sources,config_scroll,config_scroll_maxフィールドを追加src/ui.rsdraw_help_dialog→draw_config_dialogに置き換えresolve_source_str,resolve_source_bool,resolve_source_opt_str)を追加?: help→?: configに変更src/input.rshandle_help_mode→handle_config_modeにリネームsrc/main.rsload_config_with_sources()を使用するように変更Test plan
cargo build— ビルド成功cargo clippy -- -D warnings— 警告なしcargo fmt --all --check— フォーマット準拠cargo test— 282 テスト全パス(新規 19 テスト追加)cargo run→?キーで Config ダイアログが表示されること