overview digest #51

Merged
eleith merged 40 commits from gemini/feat/overview-digest into main 2025-08-23 16:02:50 +00:00
40 Commits
Author SHA1 Message Date
eleith 026ac4b802 fix miniflux preview favicon generation 2025-08-23 08:55:42 -07:00
eleith 6720bec04e fix favicon rendering 2025-08-23 08:50:43 -07:00
eleith 220dd25b68 improve llm test speed by mocking sleep 2025-08-23 07:34:41 -07:00
eleith e195701db3 continue to iterate with gemini calls to improve output success and add more logging 2025-08-23 07:29:08 -07:00
eleith 33aab97394 adjust models so primary goups have IDs and allow allow subgroupers to work with these primary groups directly 2025-08-22 12:27:32 -07:00
eleith 01a1e3eec4 fix issue when llm responds incorrectly
default to feed sub_group_by instead of date
2025-08-21 22:12:58 -07:00
eleith 7ea8855acb clear out superflous comments 2025-08-21 21:15:55 -07:00
eleith 2498dcfba7 feat: Add tests for archive.go functions 2025-08-22 01:48:37 +00:00
eleith 61e2a7b388 feat: Add tests for overview.gohtml and textToHTML func 2025-08-22 01:45:11 +00:00
eleith f27f07d8ab feat: Add tests for digest.BuildDigestData (non-AI) 2025-08-22 01:40:47 +00:00
eleith 5352931433 feat: Add happy path test for ProcessAndSendDigest 2025-08-22 01:32:19 +00:00
eleith 48e1e033c0 feat: Add tests for app.go NewApp and With* functions 2025-08-22 01:26:50 +00:00
eleith 06ddde7cf7 feat: Add test for initScheduler 2025-08-22 01:19:23 +00:00
eleith 68e6da4178 fix entry total for ai group 2025-08-21 14:20:21 -07:00
eleith b9a6685312 bring back llm summaries due to bad struct field and test struct mismatch 2025-08-21 14:00:38 -07:00
eleith 475082c3b2 revise stat line to always include feed count and show group summary stat in overview 2025-08-21 13:24:08 -07:00
eleith 76850a6a5a ensure llm summaries get pulled into the right model 2025-08-21 12:20:55 -07:00
eleith b623aaa159 decouple miniflux models from internal app models 2025-08-21 10:36:43 -07:00
eleith 6cd6aba85c remove unused miniflux calls 2025-08-21 10:02:26 -07:00
eleith 77e3a1b316 bring back mark as read
mark entries in digest as read
2025-08-21 09:56:35 -07:00
eleith 21eeecf532 rework config defaults and accepted values
fix up preview to handle miniflux and mock data separately
2025-08-21 09:10:40 -07:00
eleith 000185a47e decouple preview serving from html. clean up preview script. fix directory listing blocking 2025-08-21 08:50:16 -07:00
eleith 5dfe4be0b5 rework web server for better sanitization and avoiding directory listing 2025-08-21 08:31:33 -07:00
eleith 0a9576480c refactor: Improve archive cleanup logic
This commit refactors the archive cleanup functionality to be more robust and general.

The previous implementation relied on directory names to identify old archives. This new implementation crawls the directory tree and removes files based on their modification time. It then does a second pass to remove any empty directories.

This approach is more resilient to changes in the directory structure and accurately reflects the user's intent to clean up old files based on their age.
2025-08-21 13:37:09 +00:00
eleith 8f83db3a88 feat: update email digest and attachment handling
modifies email service to account for attaching multiple digests in one
email.

updates preview-email for testing
2025-08-21 06:13:00 -07:00
eleith 1779ceb847 feat: Produce overview and multiple group entry digests 2025-08-21 04:08:47 +00:00
eleith 06612da67a feat: Implement local preview server with graceful shutdown 2025-08-21 04:07:30 +00:00
eleith 61a2add5df feat: Refactor web server logic into internal/webserver 2025-08-21 04:07:20 +00:00
eleith 5f9ffc1381 refactor: rename HTMLTemplateData to OverviewTemplateData
Renamed the generic HTMLTemplateData struct to OverviewTemplateData
to better reflect its purpose as the data model for the digest overview.
This improves clarity and consistency with GroupedEntriesTemplateData.

Updated all references across the codebase, including:
- internal/app/services/*
- internal/archive/archive.go
- internal/digest/digest.go
- internal/email/email.go
- internal/email/email_test.go
- internal/models/models.go
- internal/processor/processor.go
- internal/templates/templates.go
- internal/templates/templates_test.go
- internal/testutil/mocks.go
- scripts/preview/main.go
2025-08-20 22:26:38 +00:00
eleith bd7ee12aac rework services for isolation and avoid cycles 2025-08-20 15:18:22 -07:00
eleith 375622efb1 feat: Update preview script to use ArchiveService for HTML generation
This commit updates the scripts/preview/main.go to use the ArchiveService to generate the overview and grouped entry HTML files.

- Removed the generateHTML and writeHTMLToFile functions.
- Called application.ArchiveService.MakeArchiveHTML to generate the HTML files.
- Updated the email sending logic to use the files returned by MakeArchiveHTML.
2025-08-20 20:06:37 +00:00
eleith b8d169832e feat: Implement email functionality for overview and grouped entries
This commit implements the email functionality for the overview digest and grouped entries.

- Modified internal/email/email.go to send one email with the Overview Digest as the body and attach all Group Digest HTML files.
- Updated internal/app/interfaces.go and internal/testutil/mocks.go to reflect the changes in the Send function signature.
- Updated cmd/miniflux-digest/main.go and internal/processor/processor.go to reflect the changes in the Send function signature and to pass the data to the Send function.
2025-08-20 20:03:47 +00:00
eleith 79d22b93da feat: Implement HTML generation for overview and grouped entries
This commit implements the HTML generation for the overview digest and grouped entries.

- Renamed internal/templates/entries.gohtml to internal/templates/grouped-entries.gohtml.
- Created internal/templates/overview.gohtml.
- Made getHTML function in internal/archive/archive.go reusable.
- Modified internal/archive/archive.go to create daily archive directories and render HTML files for both the overview and grouped entries.
2025-08-20 19:53:53 +00:00
eleith 71dbcb3b9d refactor: Make getHTML in archive package reusable
This commit refactors the getHTML function in internal/archive/archive.go to accept an html/template.Template as an argument. This makes the function reusable for different HTML templates, such as the overview digest and grouped entries.
2025-08-20 19:47:59 +00:00
eleith 6efef9b15d feat: Update MockDigestService for sortBy
This commit updates the MockDigestService in internal/testutil/mocks.go to reflect the change in the BuildDigestData signature, which now includes the sortBy parameter. This ensures consistency between the mock and the actual interface, and allows for proper testing of the sorting functionality.
2025-08-20 19:41:40 +00:00
eleith 060480c824 feat: Implement entry sorting based on config 2025-08-20 19:35:54 +00:00
eleith 72ec13f7a9 refactor: restructure llm package 2025-08-20 19:25:47 +00:00
eleith 91d117ab11 refactor: break circular dependency between digest and llm packages 2025-08-20 19:19:54 +00:00
eleith d869e22c6e refactor: break circular dependency between digest and llm
This commit refactors the code to break a circular dependency between the `digest` and `llm` packages.

The `digest` package was responsible for both creating the LLM prompt and parsing the response, while also depending on the `llm` package to make the actual API call. This created a tight coupling between the two packages.

This commit introduces a new `DigestLLMService` in the `digest` package, which is responsible for all LLM-related logic within the digest context. The `llm` package now provides a more generic `LLMService` that is only responsible for making the API call.

This change improves the separation of concerns and makes the code more modular and easier to maintain.
2025-08-20 19:10:01 +00:00
eleith da9056298b feat: Implement core overview digest data flow
Refactors data fetching, grouping, and initial processing for the new overview digest.
Updates configuration, main application loop, and preview script.
Adjusts related tests for compatibility.
2025-08-20 14:01:04 +00:00