A day is summarized long before it is over. Because group selection filtered
out every (date, project) that already had an entry — and the --date filter was
applied inside that guard — no flag could refresh the current day's entry.
Neither --all nor --date reached it; the only way was deleting the row by hand.
Naming a date is now treated as a deliberate request to regenerate it. --all is
unchanged and still only visits dates with no entry, so routine incremental runs
never rewrite existing work. Persistence was already an upsert, so a regenerated
entry replaces the old one in place.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A day gets summarized long before it is over, and there was no way to refresh that entry afterwards.
Group selection filtered out every
(date, project)that already had an entry, and the--datecheck was applied inside that guard. So once the current day had an entry, neither--allnor--date <today>would revisit it — the only way to fold in the rest of the day's work was deleting the row by hand:sqlite3 notebook.db "DELETE FROM journal_entries WHERE date='...' AND project_id='...'"Naming a date is now treated as a deliberate request to regenerate it.
--allis unchanged: it still only visits dates with no entry, so routine incremental runs never rewrite existing work.--dateregenerates, replacing what's there. Pair with--projectto narrow it to one project.Persistence was already an upsert, so a regenerated entry replaces the old one in place rather than duplicating.
Testing
95 tests pass, typecheck clean. Written test-first — three tests, one for the new behaviour and two pinning the existing behaviour so the guard can't be loosened by accident:
Branches from
main; independent of #19, #20 and #21.🤖 Generated with Claude Code