Skip to content

Query View

What Is Query View?

Writing a filter expression inside a zen-todo code block displays filtered task results from all your lists inline. An empty code block renders the full interactive panel instead.

Quick Start

Copy any of these into a code block to get started:

Tasks completed today

markdown
```zen-todo
completed today
```

Overdue tasks

markdown
```zen-todo
overdue
```

Tasks due this week

markdown
```zen-todo
due this week
```

Filter Reference

Completion Filters

FilterDescription
completed todayTasks completed today
completed this weekTasks completed this week
completed this monthTasks completed this month
completed YYYY-MM-DDTasks completed on a specific date (e.g. completed 2026-03-01)
completed before YYYY-MM-DDTasks completed before a specific date
completed after YYYY-MM-DDTasks completed after a specific date

Due Date Filters

FilterDescription
due todayTasks due today
due this weekTasks due this week
due this monthTasks due this month
due YYYY-MM-DDTasks due on a specific date (e.g. due 2026-03-15)
due before YYYY-MM-DDTasks due before a specific date
due after YYYY-MM-DDTasks due after a specific date

Status Filters

FilterDescription
overdueIncomplete tasks past their due date
incompleteAll incomplete tasks
not completedAlias for incomplete

List Filter

FilterDescription
list: WorkTasks from lists whose title contains "Work" (case-insensitive)
list: "Daily Tasks"List names with spaces (wrap in quotes)

Comments

Lines starting with # are ignored:

# Today's review
completed today

Combining Filters

Multiple filters on separate lines are combined with AND:

Overdue tasks in the Work list

markdown
```zen-todo
overdue
list: Work
```

Tasks completed this month in the Work list

markdown
```zen-todo
completed this month
list: Work
```

Incomplete tasks due this week

markdown
```zen-todo
due this week
incomplete
```

Behavior Notes

  • Empty code block → full interactive panel (add, edit, archive tasks)
  • Code block with text → query mode (read-only + checkbox toggle)
  • Checkbox toggles task completion directly. Changes are saved to the source .md file immediately.
  • External changes are reflected automatically after a 300 ms debounce.
  • Unrecognized lines show an errorUnknown filter: "..." displayed in red below the header.
  • Results are grouped by list — each group shows a description and hit count in the header.

Released under the MIT License.