Skip to content

refactor: Prune dead config options, add CLI flags mirroring config#97

Merged
delianides merged 6 commits into
mainfrom
drew/collapse-config
May 30, 2026
Merged

refactor: Prune dead config options, add CLI flags mirroring config#97
delianides merged 6 commits into
mainfrom
drew/collapse-config

Conversation

@delianides
Copy link
Copy Markdown
Collaborator

Summary

  • Remove dead config options that were parsed but never consumed: the entire [keys] section (keybindings are hardcoded), display.context_lines, pr.show_labels, and the deprecated pr.layout. Existing config files using these still load — the keys are silently ignored.
  • Add CLI flags mirroring every live config setting with uniform precedence CLI flag > config file > built-in default: --no-pr, --view <MODE>, --no-flash, --flash-duration <MS>, --scroll-padding <N>, --edit-command <CMD>. The existing -d/--debounce and --base now also override config (debounce default 500 now sourced from config/built-in defaults, not the flag).
  • Derive clap::ValueEnum on ViewMode so --view parses.
  • Simplify App::new to take just the merged config (drop the separate debounce_ms/base_override params); the startup watcher now reads config.debounce_ms, fixing a prior inconsistency where startup used a CLI default but repo-switch used config. Collapse the git worker's base_override/config_base params into a single base.
  • Update README, CLAUDE.md, and CHANGELOG; correct the stale README debounce default (200500).
  • Update CLI about text to "Tracking Real-Time Git Changes During Agentic Workflows".

Test Plan

  • cargo test — full suite green (349 unit + integration, 0 failures), incl. new merge-precedence, ViewMode parse, and old-config-loads-gracefully tests
  • cargo clippy --all-targets -- -D warnings clean
  • cargo build clean
  • perch --help shows all flags and the new about text; perch --view bogus exits with a parse error

@delianides delianides changed the title Prune dead config options, add CLI flags mirroring config refactor: Prune dead config options, add CLI flags mirroring config May 30, 2026
delianides and others added 6 commits May 29, 2026 23:45
…ls, pr.layout)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add --no-pr/--view/--no-flash/--flash-duration/--scroll-padding/--edit-command
flags that override config (precedence: flag > config > default), via
merge_cli_overrides in main. Simplify App::new to take just the merged config
(drop debounce_ms/base_override params; startup watcher now reads
config.debounce_ms, fixing a startup/repo-switch inconsistency). Collapse the
git worker's base_override/config_base params into a single base.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g Agentic Workflows"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add view_mode_cli_and_config_spellings_agree test guarding that the
  serde (config) and clap::ValueEnum (--view) derives stay in sync.
- Derive Default on Cli so bare_cli() uses struct-update syntax.
- Build absent_flags_keep_config_values via struct-update, dropping the
  clippy::field_reassign_with_default allow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@delianides delianides force-pushed the drew/collapse-config branch from 65cc0d6 to ee02fd1 Compare May 30, 2026 03:47
@delianides delianides merged commit beb8540 into main May 30, 2026
9 checks passed
@delianides delianides deleted the drew/collapse-config branch May 30, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant