fix(today): exclude completed tasks by default, add --include-completed#109
Merged
Conversation
…lled Address code-review findings on the --include-completed feature: - Error (instead of silently ignoring) when --include-completed is used on any view other than today, including when a trailing project name promotes today → project. Mirrors how --on/--from/--to reject unsupported views. - Add a start=1 cancelled (status=2) fixture so the `status IN (2,3)` branch is actually exercised; the prior fixtures only covered status=3. - Compute the test's "yesterday" via AddDate so it stays a valid ThingsDate across month boundaries (raw bit subtraction underflowed on the 1st).
ryanlewis
added a commit
that referenced
this pull request
Jun 22, 2026
Release-notes header for the upcoming `v0.5.0` tag (required at the tagged commit by `.goreleaser.yaml`). Covers the two behaviour changes in this release: - JSON `status` now emits a string instead of the raw int (#107, closes #105) - `things today` excludes completed by default; `--include-completed` restores UI-parity (#109, closes #106) Plus dependency maintenance (#100, #108). Part of cutting v0.5.0 via `/release minor`.
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.
What
things todaynow returns only open tasks by default. Completed/cancelled items that Things keeps on screen until it logs them out of Today are available behind a new opt-in flag:Closes #106.
Why
The
todayview kept completed/cancelled items visible until Things logged them out of Today (UI-parity, added in #74). For automation this over-reports: "in today" stopped meaning "still to do", and consumers had to filter on the barestatus: 3themselves. Defaulting to open tasks is the least-surprising behaviour;--include-completedrestores the UI-parity view for anyone who wants it.How
internal/db:TaskFilter.IncludeCompleted+ atodayWhere(includeCompleted)helper. Defaulttodayfiltersstatus = 0; with the flag it keepsstatus IN (2,3)items whosestopDatepost-datesmanualLogDate(the same logged-out signal as before).cmd/things:--include-completedflag. It only affectstoday, so it's rejected with an error on any other view (including when a trailing project name promotestoday → project), matching how--on/--from/--toreject unsupported views — no silent no-ops.internal/skill/SKILL.md: documented the new default and flag.Tests
--include-completedsurfaces unlogged completed + cancelled items pre-log, then drops them oncemanualLogDateadvances.Review
Ran
/code-review --fix(xhigh). Applied: the non-today rejection, astart=1cancelled (status=2) fixture closing a coverage gap, and month-boundary-safe date arithmetic in the test helper.Knowingly not changed (out of scope / pre-existing):
--on/--from/--tofilter--include-completeditems bystartDate, not completion date — consistent date-filter semantics across all views.TMSettings LIMIT 1(noORDER BY) and theNULLstopDatethree-valued-logic drop are carried over verbatim from the prior inline clause; not introduced here.