refactor(config): source config-file labels from ConfigFileKind::label() - #3432
Merged
Conversation
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
marked this pull request as ready for review
July 12, 2026 19:48
worktrunk-bot
approved these changes
Jul 12, 2026
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.
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::Fileandload_config_filecarry aConfigFileKindinstead of a&'static strlabel (src/config/user/mod.rs, consumed inemit_user_config_warnings).wt config createtakes the kind, deriving both its messages and the project/user hint branch from it; the redundantis_project: boolparameter is gone.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.