Skip to content

Implements global user config - #63

Merged
MiniCodeMonkey merged 4 commits into
MiniCodeMonkey:mainfrom
KLIM8D:global-config
Sep 28, 2026
Merged

MiniCodeMonkey merged 4 commits into
MiniCodeMonkey:mainfrom
KLIM8D:global-config

Conversation

@KLIM8D

@KLIM8D KLIM8D commented Apr 28, 2026

Copy link
Copy Markdown

Some parts of the code depends on #62 being merged

@MiniCodeMonkey

Copy link
Copy Markdown
Owner

Thanks for this. I rebased it on the updated #62 and pushed two fixes to your branch.

  1. A project config couldn't turn a global setting off. With push: true globally, push: false in the project was ignored, because Merge skipped zero values. Load now decodes the user file and then the project file into the same struct, so any key the project sets wins, and new config fields need no merge code.
  2. Saving from Settings wrote the whole effective config to .chief/config.yaml, which copied every global value into the project. Settings now writes only the key you edited, through a new config.SaveValue.

One open question for later: the global file is ~/.chief/config.yaml (or under $XDG_CONFIG_HOME) rather than the OS config folder on macOS and Windows. I'm fine with that for consistency with .chief/, but it needs a docs entry.

@KLIM8D

KLIM8D commented Sep 28, 2026

Copy link
Copy Markdown
Author

LGTM! Same goes for #62

KLIM8D and others added 4 commits September 28, 2026 12:12
…_HOME. Merge global config with project specific (if any)
Load decodes the user file and then the project file into one Config.
yaml.v3 only overwrites fields whose keys are present, so a project key
wins even when it is false or empty (e.g. opting out of a global
onComplete.push: true), and new config fields need no merge code.

SaveValue sets a single dotted key in the project file and leaves the
rest of the file alone, so keys a project never set keep inheriting.

Claude-Session: https://claude.ai/code/session_01Fxi8Py1Weyua51Y1RBt2NP
Settings saved the whole effective config, which now includes values
inherited from the user config. Toggling one setting in a project
copied every inherited global value into .chief/config.yaml and pinned
it there. Settings now writes only the edited key via config.SaveValue.

Claude-Session: https://claude.ai/code/session_01Fxi8Py1Weyua51Y1RBt2NP
@MiniCodeMonkey
MiniCodeMonkey merged commit 7e063c5 into MiniCodeMonkey:main Sep 28, 2026
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