fix: include custom markers in journal entry query conditions#95
Open
lychengrex wants to merge 1 commit intoahonn:masterfrom
Open
fix: include custom markers in journal entry query conditions#95lychengrex wants to merge 1 commit intoahonn:masterfrom
lychengrex wants to merge 1 commit intoahonn:masterfrom
Conversation
When `treatJournalEntriesAsScheduled` is enabled, custom markers like WAITING on journal pages were not displayed because: 1. In today.ts, `journalEntryCond` only matched built-in markers (NOW/LATER/TODO/DOING), so custom markers on journal pages fell through all query conditions. 2. In scheduled.ts, the marker filter excluded custom markers entirely. 3. In next-n-days.ts, custom markers were not handled at all. This fix adds custom markers to the journal entry conditions in all three query files and updates App.tsx to pass the customMarkers parameter to all query functions. Fixes ahonn#57
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.
Summary
Fixes #57 — Custom markers (e.g.,
WAITING) on journal pages were not displayed whentreatJournalEntriesAsScheduledwas enabled.Root cause: The Datalog queries in
today.ts,scheduled.ts, andnext-n-days.tsonly included built-in markers (NOW/LATER/TODO/DOING) in journal entry conditions. Custom markers on journal pages without explicitSCHEDULED:orDEADLINE:properties fell through all query conditions and were invisible.Changes
src/querys/today.ts— AddedcustomMarkerJournalCond: matches custom marker blocks on journal pages withjournal-day <= today, without explicit scheduled/deadline (to avoid double-counting)src/querys/scheduled.ts— AddedcustomMarkersparameter; expanded marker filter to include custom markers alongside built-in onessrc/querys/next-n-days.ts— AddedcustomMarkersandtreatJournalEntriesAsScheduledparameters; added journal entry and scheduled conditions for custom markerssrc/App.tsx— Updated all query call sites to passcustomMarkersandtreatJournalEntriesAsScheduledTest plan
pnpm buildpasses (tsc + vite, zero errors)treatJournalEntriesAsScheduledis enabledSCHEDULED:dates continue to work