Skip to content

refactor(config): source config-file labels from ConfigFileKind::label() - #3432

Merged
max-sixty merged 1 commit into
mainfrom
config-file-kind-labels
Jul 12, 2026
Merged

refactor(config): source config-file labels from ConfigFileKind::label()#3432
max-sixty merged 1 commit into
mainfrom
config-file-kind-labels

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Follow-up to #3411, which introduced ConfigFileKind::label() but left bare "User config" / "System config" / "Project config" strings in a few places. This threads the kind through so the label strings have one source:

  • LoadError::File and load_config_file carry a ConfigFileKind instead of a &'static str label (src/config/user/mod.rs, consumed in emit_user_config_warnings).
  • wt config create takes the kind, deriving both its messages and the project/user hint branch from it; the redundant is_project: bool parameter is gone.
  • The diagnostic report's config sections and the project-config parse error use label() directly.

No behavior change: every user-facing string is byte-identical (full pre-merge gate green, zero snapshot changes). The uppercase section headings in wt config show ("USER CONFIG") and lowercase prose mentions ("a user config") stay literal; they are headings and prose, not the file label.

This was written by Claude Code on behalf of max

Replace the bare "User config"/"System config"/"Project config" strings
left behind by #3411 with ConfigFileKind: LoadError::File and
load_config_file carry the kind, wt config create derives its messages
and project/user branch from it (dropping the redundant is_project
flag), and the diagnostic report and project-config parse error use
label() directly. No user-facing output changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@max-sixty
max-sixty marked this pull request as ready for review July 12, 2026 19:48
@max-sixty
max-sixty merged commit 0f842d9 into main Jul 12, 2026
40 checks passed
@max-sixty
max-sixty deleted the config-file-kind-labels branch July 12, 2026 22:15
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