Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the CLI menu’s functionality and robustness by adding config-path overrides, CSV export support, stronger config validation, and some refactors that improve testability and menu handling.
Changes:
- Added
--config/-csupport to load/create a config from a user-supplied path, plus a CLI test for missing path handling. - Added CSV export support (with roundtrip test coverage) and improved import flow/cancellation handling.
- Introduced
validate_configfor semantic validation and refactored menu selection parsing (main/edit menus) and command execution (injectable executor for tests).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/assert_cmd.rs | Adds integration coverage for --config requiring a path and returning exit code 2 with a specific stderr message. |
| src/utils.rs | Introduces an injectable CommandExecutor abstraction and a run_command_with entrypoint to improve testability. |
| src/menu_main.rs | Refactors main menu selection handling into parsed choices and improves error reporting when command execution fails. |
| src/menu_edit.rs | Refactors edit menu options into enums, adds CSV export option, and centralizes save/validation flow. |
| src/main.rs | Moves to async main, adds --config/-c parsing, and awaits the async menu. |
| src/csv.rs | Adds CSV export and a write_commands_to_csv helper, improves prompt error handling, and adds sorting of discoverable CSV files. |
| src/config.rs | Adds ensure_config_file_path, atomic-ish config writes via temp+rename, and new validate_config checks with tests. |
| README.md | Documents the newly supported features (CSV export and alternate config path). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Add new features! yay.