refactor!: reorganize reprex config into startup.mode and mode.reprex#27
Merged
refactor!: reorganize reprex config into startup.mode and mode.reprex#27
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors arf’s configuration layout by splitting the former [reprex] section into runtime-toggleable startup mode flags and static per-mode configuration, along with corresponding code, schema, tests, and docs updates.
Changes:
- Split reprex configuration into
[startup.mode](runtime toggle state) and[mode.reprex](static config like comment prefix), updating parsing and all call sites. - Update and expand schema + snapshot coverage to lock in the new default config structure.
- Bump workspace version to
0.2.0-beta.1and refresh docs/README/snapshots accordingly.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/configuration.md | Updates default config + examples and CLI override mappings to the new [startup.mode] / [mode.reprex] layout. |
| crates/arf-console/tests/integration_tests.rs | Adjusts integration test config snippet to use [mode.reprex] for custom comment. |
| crates/arf-console/src/repl/snapshots/arf__repl__banner__tests__banner_vi_mode.snap | Updates banner snapshot for the new version string. |
| crates/arf-console/src/repl/snapshots/arf__repl__banner__tests__banner_reprex_mode.snap | Updates banner snapshot for the new version string. |
| crates/arf-console/src/repl/snapshots/arf__repl__banner__tests__banner_reprex_custom_comment.snap | Updates banner snapshot for the new version string. |
| crates/arf-console/src/repl/snapshots/arf__repl__banner__tests__banner_default_r_not_initialized.snap | Updates banner snapshot for the new version string. |
| crates/arf-console/src/repl/snapshots/arf__repl__banner__tests__banner_default_r_initialized.snap | Updates banner snapshot for the new version string. |
| crates/arf-console/src/repl/mod.rs | Switches reprex/autoformat reads from config.reprex.* to config.startup.mode.* and config.mode.reprex.comment. |
| crates/arf-console/src/repl/banner.rs | Uses new config paths for banner rendering and updates banner unit tests accordingly. |
| crates/arf-console/src/main.rs | Applies CLI overrides and script-mode reprex evaluation using the new config structure. |
| crates/arf-console/src/config/startup.rs | Introduces StartupModeConfig under StartupConfig for initial mode state. |
| crates/arf-console/src/config/snapshots/arf__config__tests__schema_tests__default_config.snap | Adds snapshot of generated default config to detect structure changes. |
| crates/arf-console/src/config/snapshots/arf__config__tests__schema_tests__config_schema.snap | Updates schema snapshot for new mode and startup.mode shapes. |
| crates/arf-console/src/config/reprex.rs | Removes old ReprexConfig module (enabled/comment/autoformat) from config. |
| crates/arf-console/src/config/mode.rs | Adds ModeConfig and static ReprexConfig (comment prefix) under [mode.*]. |
| crates/arf-console/src/config/mod.rs | Replaces top-level reprex with mode, updates parsing tests, and adds default config snapshot test. |
| crates/arf-console/src/cli.rs | Updates CLI docs to reference startup.mode.* config keys. |
| artifacts/arf.schema.json | Updates shipped JSON schema to match the new config structure. |
| README.md | Updates example config to show [startup.mode] and [mode.reprex]. |
| Cargo.toml | Bumps workspace version to 0.2.0-beta.1. |
| Cargo.lock | Updates workspace crate versions to 0.2.0-beta.1. |
| CHANGELOG.md | Adds 0.2.0-beta.1 entry and migration guide for the config split. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BREAKING CHANGE: The `[reprex]` config section has been split into two sections: - `[startup.mode]` for runtime-toggleable settings (reprex, autoformat) - `[mode.reprex]` for static configuration (comment) Migration: - `reprex.enabled` → `startup.mode.reprex` - `reprex.autoformat` → `startup.mode.autoformat` - `reprex.comment` → `mode.reprex.comment` Also: - Bump version to 0.2.0-beta.1 - Add snapshot test for default config file - Update documentation and README Co-Authored-By: Claude Opus 4.5 <[email protected]>
3010bc9 to
276d556
Compare
2 tasks
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.
BREAKING CHANGE: The
[reprex]config section has been split into two sections:[startup.mode]for runtime-toggleable settings (reprex, autoformat)[mode.reprex]for static configuration (comment)Migration:
reprex.enabled→startup.mode.reprexreprex.autoformat→startup.mode.autoformatreprex.comment→mode.reprex.commentAlso: