Skip to content

Tasks: lenient 'done today' mode for tasks without a ✅ date stamp #29

@thetechjon

Description

@thetechjon

Context

The done today task-query operator requires every completed task to carry a ✅ YYYY-MM-DD stamp. Tasks toggled via the editor checkbox auto-stamp; tasks typed manually as - [x] or synced in from Obsidian without the date do not. Users who edit outside noteser (or imported a vault with hand-written completions) get 0 results from done today even when their [x] count is genuinely high.

Adding a lenient mode unlocks the query for everyone whose workflow does not depend on the stamp.

Where to look

  • src/utils/taskQuery.ts — the query engine; done today resolution lives here.
  • src/stores/settingsStore.ts — where the new toggle would live (alongside editorAutocorrect).
  • src/components/modals/SettingsModal.tsx — Settings → Editor or a new Tasks group.
  • src/types/index.ts line ~ where Note is defined — has updatedAt.

Acceptance criteria

  • New persisted setting taskQueryLenientDoneToday: boolean with default false.
  • Settings → Editor (or Tasks) gains a toggle: "Match completed tasks without a ✅ YYYY-MM-DD stamp as done today".
  • When ON: done today matches - [x] lines that lack a ✅ date AND live in a note whose updatedAt falls within today's local-time window.
  • When OFF: behaviour unchanged (existing tests pass).
  • At least one new test case in the existing taskQuery.test.ts covers the lenient branch.

Complexity

Small.

For first-time contributors

Read CONTRIBUTING.md. npm install, npm run dev. The taskQuery tests are a good place to start the rabbit hole: npx jest taskQuery. PR against dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions