refactor: split Configuration god-class (Phase 3, #234) - #237
Merged
Conversation
Phase 3 of #234. The 700-line Configuration god-class is now a thin IConfiguration facade (~105 lines) composing: - SettingsReader — scalar settings, base paths, scope/template defs - PathResolver — entry/note/weekly path & file pattern resolution - TemplateProvider — header/inline/time template resolution Pattern types + defaults moved to config/patterns.ts. TemplateService (the prior resolver) is split into PathResolver + TemplateProvider, both pure (no vscode) and fed settings via the IJournalSettings seam. Behavior unchanged — method bodies relocated, not rewritten. Refs #234. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 tasks
Owner
Author
Brooks-Lint PR Review: ApprovedHealth Score: 96/100 Phase 3 of #234 is successfully implemented. This PR decomposes the 700-line \Configuration\ god-class into focused, decoupled collaborators. Key Findings:
Recommendation: Merge immediately to unblock Phase 4 (Package-by-Feature). |
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.
Phase 3 of #234 — split the 700-line
Configurationgod-class into focused collaborators.Depends on #236 (Phase 2) being merged.
Changes
vscode/conf.tsis now a thinIConfigurationfacade (~105 lines) that composes three collaborators invscode/config/:config/settings-reader.tsjournal.*settings, base paths, scope + inline-template definitions, windows-path normalizationconfig/path-resolver.tsconfig/template-provider.tsconfig/patterns.tsPatternDefinition/ScopeDefinitiontypes + defaultsTemplateServiceis split intoPathResolver+TemplateProvider. Both are pure (novscodeimport) and receive settings through the smallIJournalSettingsseam — sets up Phase 5 (vscode-free domain).Verification
npm run compile-tests(tsc) ✔npm run compile(esbuild) ✔npm run lint✔Acceptance (#234)
Configurationsplit into 3 focused classes (+ a small types module).IConfigurationso call sites are untouched.settings-reader.tsis 323 lines incl. the 17-line GPL header (~290 effective) — right at the~300target; the base-path block is the bulk and is cohesive. Can split further on request.Refs #234.
🤖 Generated with Claude Code