Repository navigation
Fix: journal today only sees the daily file — must aggregate all of a day's notes (project notes, transcripts) - #60
Merged
Merged
Conversation
The Notes section of gatherToday previously read only the daily file (daily/YYYY/MM/YYYY-MM-DD.md), so a day with notes captured via --project was incorrectly reported as empty. Now queries the store for all note chunks with source=note and created_at >= midnight, rendering them grouped by source. Project note sections are labelled with their path. Transcripts remain excluded from Notes (they appear under Meetings via the existing recentMeetings path). The MCP today tool inherits the fix automatically (it routes through gatherToday). The journal://today resource is kept as the literal daily file per option (a) in the issue discussion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Retro: no durable lesson (merged clean / one-off). |
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.
🤖 Agent-Generated PR
Closes #55
Agent Used: Claude Code
Complexity: medium
Summary
journal todayreported empty even when notes were captured — as long as those notes landed somewhere other thandaily/YYYY/MM/YYYY-MM-DD.md. This fix rewrites the Notes section ofgatherToday()to query the store for all note chunks from today instead of reading a single hard-coded path.Implementation Notes
store.Filter, render results. The decisions/todos/meetings sections were already store-driven; only Notes was reading a raw file.gatherNoteMD()helper (opens store, queriesFilter{Source: store.SourceNote, Since: midnight}) andbuildNotesMD()(assembles aggregated Markdown with daily chunks first, then project note chunks labelled with their source path).midnightis now computed once at the top ofgatherToday()and shared with the meetings section (previously the meetings section computed it separately).journal://todayresource (option a): left as the literal daily file. The resource maps to a file; the aggregated view is thetodaytool. The description is unchanged — it already says "Corresponds to daily/YYYY/MM/YYYY-MM-DD.md". The issue discussion explicitly recommends (a).todaytool (mcpToday) routes throughgatherToday()so it inherits the fix at zero extra cost.Changes
cmd/show.go: Replace single-file read ingatherToday()with store query; addgatherNoteMD()andbuildNotesMD()helpers; updatetodayReport.Notesfield comment.cmd/show_test.go: Two new tests —TestGatherTodayAggregatesAllSources(daily + project note + transcript: both notes in Notes, transcript only in Meetings, project source attributed) andTestGatherTodayProjectOnlyNotEmpty(project-note-only day is not empty).docs/USAGE.md: Clarified thattodayaggregates all sources; noted thejournal://todayresource/tool distinction.book/src/daily-use.md: Updated the "morning" section description.CHANGELOG.md: Added Fixed entry under[Unreleased].Testing
Automated:
make testgreen, all 11 packages pass)Manual testing performed:
make fmt vetcleanmake buildsucceedsmake testgreen (serial-p 1)Review Checklist
Correctness
journal://todayresource unchanged per option a)Code Quality
Tests