Skip to content

fix: include custom markers in journal entry query conditions#95

Open
lychengrex wants to merge 1 commit intoahonn:masterfrom
lychengrex:fix/custom-markers-journal-entries
Open

fix: include custom markers in journal entry query conditions#95
lychengrex wants to merge 1 commit intoahonn:masterfrom
lychengrex:fix/custom-markers-journal-entries

Conversation

@lychengrex
Copy link

Summary

Fixes #57 — Custom markers (e.g., WAITING) on journal pages were not displayed when treatJournalEntriesAsScheduled was enabled.

Root cause: The Datalog queries in today.ts, scheduled.ts, and next-n-days.ts only included built-in markers (NOW/LATER/TODO/DOING) in journal entry conditions. Custom markers on journal pages without explicit SCHEDULED: or DEADLINE: properties fell through all query conditions and were invisible.

Changes

  • src/querys/today.ts — Added customMarkerJournalCond: matches custom marker blocks on journal pages with journal-day <= today, without explicit scheduled/deadline (to avoid double-counting)
  • src/querys/scheduled.ts — Added customMarkers parameter; expanded marker filter to include custom markers alongside built-in ones
  • src/querys/next-n-days.ts — Added customMarkers and treatJournalEntriesAsScheduled parameters; added journal entry and scheduled conditions for custom markers
  • src/App.tsx — Updated all query call sites to pass customMarkers and treatJournalEntriesAsScheduled

Test plan

  • pnpm build passes (tsc + vite, zero errors)
  • WAITING tasks on journal pages appear in Today section when treatJournalEntriesAsScheduled is enabled
  • WAITING tasks with explicit SCHEDULED: dates continue to work
  • Built-in markers (NOW/LATER/TODO/DOING) behavior unchanged

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WAITING tasks no longer show up even with the custommarker configured

1 participant