feat: layered config with always-current defaults file - #30
Merged
Conversation
Two files: default-config.toml is a mirror of the embedded defaults, rewritten on every launch so it always documents the running version (the app never reads it back). config.toml holds only what the user changes, applied over defaults with plain per-key precedence — user keys win wholesale (lists and inline action tables included), section tables merge per contained key. Vocabulary layering is schema, not merge magic: builtin vocabulary + user extraVocabulary, concatenated and deduped. New installs get a near-empty starter config. Rewrite pass now defaults on (with technicalFormatting). Legacy tingd/json migration code removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Solves the stale-config problem: the old single literate config.toml was a snapshot of the defaults at install time, so shipped improvements (new sections, new vocabulary words) never reached existing installs.
Now two files in App Support (Sublime-style layering):
extraVocabulary = []).Merge semantics
Plain per-key precedence, no magic: a key in config.toml wins wholesale — lists and inline action tables included (no field bleed-through from a default action into its replacement). Section tables ([mappings], [replacements], [rewrite]) merge per contained key, so overriding one mapping keeps the rest. Where different semantics are wanted, the schema provides them:
vocabulary(builtin) +extraVocabulary(user's), concatenated and deduped at load — builtin list updates keep flowing to configs that only add words.Also
Testing
🤖 Generated with Claude Code