Skip to content

feat(list): filter by --on / --from / --to date ranges#81

Merged
ryanlewis merged 1 commit into
mainfrom
list-date-filters
May 7, 2026
Merged

feat(list): filter by --on / --from / --to date ranges#81
ryanlewis merged 1 commit into
mainfrom
list-date-filters

Conversation

@ryanlewis
Copy link
Copy Markdown
Owner

Summary

  • Adds --on YYYY-MM-DD, --from, --to flags to things list (and view shortcuts like things upcoming).
  • Filters apply to t.startDate for most views and to t.deadline on the deadlines view.
  • Not supported on inbox / trash / logbook. --on is mutually exclusive with --from/--to. Inputs accept YYYY-MM-DD or RFC3339 (date portion); invalid input fails fast in the same style as --when / --deadline.

ThingsDate is bit-encoded (year<<16 | month<<12 | day<<7) and monotonic across calendar order, so the SQL filter compares the encoded int64 directly — no decode round-trip.

Closes #77.

Test plan

  • go test -race ./... (234 passing)
  • golangci-lint run ./... clean
  • DB-level: exact-match, inclusive --from, inclusive --to, range, deadlines-view-targets-deadline
  • CLI-level: end-to-end --on today returns the seeded task, --on tomorrow returns nothing; rejects on inbox view; rejects --on mixed with --from; rejects bad date strings; rejects inverted range
  • Updated internal/skill/SKILL.md per CLAUDE.md mandate

Add date filters to `things list` so agents and humans can ask "which
tasks are scheduled this weekend?" in one query rather than parsing
human output or post-filtering JSON. Filters apply to startDate by
default and to deadline on the deadlines view; not supported on
inbox/trash/logbook. --on is mutually exclusive with --from/--to.
@ryanlewis ryanlewis merged commit 1af17f9 into main May 7, 2026
1 check passed
@ryanlewis ryanlewis deleted the list-date-filters branch May 7, 2026 00:16
ryanlewis added a commit that referenced this pull request May 10, 2026
## Summary
- Spell out `things open`'s flags
(`-p`/`-a`/`-t`/`-q`/`--filter`/`--background`) — the bundled SKILL.md
previously showed only `things open <ref|list>`, leaving every flag
invisible to agents that read the skill.
- Replace the trailing `...` on `things edit` / `things project edit`
with the actual flag list — adds `--prepend-notes`, `--append-notes`,
`--checklist`, `--prepend-checklist`, `--append-checklist`, `--list-id`,
`--heading-id` to edit and `--prepend-notes` / `--append-notes` to
project edit.

The recent `--on / --from / --to` list filters (#81) were already
documented in #80, so no change needed there.

## Test plan
- [x] \`make test\` passes
- [ ] After merge, \`things skill show\` reflects the new lines
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.

List filtering by date / date range (--on, --from, --to)

1 participant