- Set default Digest.View to 'date' if unspecified.
- Make Digest.View optional in validation.
- Enforce that Digest.Host and SMTP.Host are present if Digest.Email is configured.
- Update documentation to reflect these changes and correct required/optional statuses.
- Update tests to cover new defaults and validation rules.
- Restore logic to set default values for SMTP port (587) and Digest Compress (true) in config.
- Change Digest.Compress to *bool to correctly distinguish between unset and false values.
- Update CONFIG.md to reflect the removal of default categories in AI view.
- Fix logic that relied on defaults in processor and preview script.
- Add validation in config.go to ensure digest titles produce non-empty slugs.
- Remove redundant fallback to 'default' slug in archive.go.
- Update tests to reflect these changes.
- Remove default category injection in config to distinguish between explicit user categories and auto-mode.
- Update AI prompts:
- Rename initialGroupingPrompt to openGroupingPrompt.
- Add strictGroupingPrompt for enforcing user-defined categories.
- Update AI grouping logic:
- Use strictGroupingPrompt and skip consolidation if categories are provided.
- Use openGroupingPrompt and perform consolidation if categories are empty.
- Add Uncategorized group merging logic.
- Add tests for strict user mode and merging logic.
This commit improves the documentation strategy by separating the comprehensive reference manual from the example configuration file.
Changes:
- Created 'docs/CONFIG.md': A detailed guide to all configuration options, including the new multi-digest and filtering features, validation rules, and default AI categories.
- Updated 'config.yaml.example': Removed verbose comments to create a clean, copy-paste friendly template.
- Updated 'README.md': Added a prominent link to 'docs/CONFIG.md' in the Setup section.
This commit improves the configuration validation to prevent common user errors and runtime issues.
Changes:
- internal/config/config.go:
- Added a check to ensure all digest titles result in unique slugs.
- Added validation for all regex pattern fields in 'filters'.
- Added 'validate:"dive"' to the 'Categories' field to ensure custom categories are validated.
- internal/config/config_test.go:
- Added test cases for duplicate slugs, invalid regexes, and invalid categories.
This ensures that the application fails early with helpful errors if the configuration is invalid.
Updates the archive generation to support the new folder structure: archives/<digest-slug>/<date>.html.
Changes:
- Updated 'OverviewTemplateData' to include 'DigestTitle' and 'DigestSlug'.
- Updated 'ArchiveService' to use 'DigestSlug' in file paths.
- Updated 'DigestService', 'View', and 'Processor' to propagate digest title/slug.
- Updated tests to match new structure and signatures.
This commit delivers the core logic for the Multi-Digest Architecture.
Phase 2 (Filter Engine):
- Implemented 'internal/filter' with exact/prefix/regex matching.
- Implemented 'internal/manager' for digest priority assignment.
- Updated 'models.Entry' to include 'SiteURL'.
Phase 3 (Processor Refactor):
- Updated 'ProcessDigest' to filter entries using 'DigestManager'.
- Updated 'main.go' to schedule jobs per digest index.
Phase 4 (LLM & Categorization):
- Added 'DefaultCategories' in 'internal/config'.
- Updated LLM prompts and service flow to respect user-defined or default categories.
- Updated mocks and tests across the board.
The application now supports configuring multiple digests with distinct filters and categories, and correctly assigns entries and prompts the LLM accordingly.
This commit stabilizes the 'Multi-Digest Architecture' feature (Phase 1).
Changes:
- Fix mocks in 'internal/app' and 'internal/testutil' to match new EmailService interface.
- Update 'ProcessDigest' calls in tests to respect new 'Digests' config slice.
- Update 'internal/config' tests to satisfy stricter validation rules (added missing 'host', 'view' fields).
- Verify 'Slugify' utility is present and tested.
Result:
- 'make lint', 'make test', and 'make build' now pass.
- The project is ready for Phase 2 (Filter Engine).