Repository navigation
[CTX-0169] feat(config): named profiles --profile + env overrides (#271) - #308
Merged
Merged
Conversation
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.
Closes #271.
What
Named profiles layered UNDER the user file, per #271 decision and
lua-and-xdg.md§Layers:--profile NAME(CLI) overBITTY_PROFILE(env) ->$XDG_CONFIG_HOME/bitty/profiles/<name>.luaas theProfilelayer (precedenceCli 70 > User 50 > Profile 40).--config PATH(CLI) overBITTY_CONFIG(env), else the XDG default probe. Both explicit sources fail closed when missing.BITTY_*env > file+profile > defaults.init.lua(or the explicit file) still wins over the profile;--themewins over both (deep-merge compose, not whole-file replace).--config+--profiletogether: both layers load (explicit file wins) with a stderr warning.[A-Za-z0-9_-](1..=64) so a profile always maps to exactly one file;XDG_CONFIG_DIRSnever consulted.config checkprints aprofile =row plus per-keyprofile: <path>sources;config pathrespectsBITTY_CONFIG; headless line carriesprofile=<name>.CTX-0180 rebase note
CLI overrides now flow through one
CliOverridesstruct -> oneCliplan (resolve_effective_full);resolve_effectivestays as a thin back-compat delegate. CTX-0180 (--font-family/--font-size/--opacity) only adds fields toCliOverrides::to_layer— no signature churn. Unblocks on this merge.Tests
bitty-config: name validation, path resolution, CLI>env resolvers,user>profile>default+ deep-merge compose,load_profile_layerkind tag, missing-profile fail-closed.bitty-app:--profileparsing (space/equals/subcommand-order/escape-hatch), CLI>env pin, merge-level precedence +config checklabel, traversal fail-closed.cargo fmt --check,clippy -D warnings(workspace),cargo test --workspace --all-targets --locked(all ok, 0 failed), windowscargo checktarget,actionlintclean.Live (headless-guarded, seat contested for pixels)
Worktree
recording/ctx-0169/(uncommitted): two profiles switch theme/font live viaconfig check+--headless(source=profileend to end, exit codes incl. fail-closed 2). No display server on host, so pixel screenshots skipped with reason (see LIVE.md); seated reviewer can checkhyprctl clientstitle... (profile).Priority: P2 | Area: config | Labels: feat,area:config,P2 | Milestone: v0.1.0 | RFC: - | Task: CTX-0169