Skip to content

refactor!: reorganize reprex config into startup.mode and mode.reprex#27

Merged
eitsupi merged 1 commit intomainfrom
refactor/config-structure
Feb 1, 2026
Merged

refactor!: reorganize reprex config into startup.mode and mode.reprex#27
eitsupi merged 1 commit intomainfrom
refactor/config-structure

Conversation

@eitsupi
Copy link
Copy Markdown
Owner

@eitsupi eitsupi commented Feb 1, 2026

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.enabledstartup.mode.reprex
  • reprex.autoformatstartup.mode.autoformat
  • reprex.commentmode.reprex.comment

Also:

  • Bump version to 0.2.0-beta.1
  • Add snapshot test for default config file
  • Update documentation and README

@eitsupi eitsupi marked this pull request as ready for review February 1, 2026 07:58
Copilot AI review requested due to automatic review settings February 1, 2026 07:58
@eitsupi eitsupi added this to the 0.2.0 milestone Feb 1, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.1 and 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]>
@eitsupi eitsupi force-pushed the refactor/config-structure branch from 3010bc9 to 276d556 Compare February 1, 2026 08:05
@eitsupi eitsupi merged commit 215cee6 into main Feb 1, 2026
10 checks passed
@eitsupi eitsupi deleted the refactor/config-structure branch February 1, 2026 08:08
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.

2 participants