Skip to content

feat(list)!: show closed items Things still shows by default - #384

Merged
ryanlewis merged 1 commit into
mainfrom
fix/show-unlogged
Oct 4, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/show-unlogged

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

When I tick something off in Things, the app keeps it in its list, ticked, until it goes to the Logbook (the next day under the default "Move completed items to Logbook: Daily" setting). The CLI dropped it from the list but logbook held it back too, so by default it showed up nowhere. This change makes the default listings match the app.

What changes

  • inbox, today, anytime, upcoming, someday, a bare --project listing and a bare --area listing now include the closed items Things hasn't logged yet. They sit where the app has them, among the open rows, marked [x]/[~] in plain output and carrying status in JSON. This is the output --include-completed gave before, which already matched the app.
  • New --open-only leaves those rows out. It works on any listing (doing nothing where only open rows are listed) and is rejected on logbook and trash.
  • --include-completed is still accepted as a hidden flag that does nothing, so scripts keep working. It is still rejected where it was rejected before, and it can't be combined with --open-only.
  • The default lives in the db filter now (TaskFilter.OpenOnly, with the zero value matching the app). So a project's show --agent brief lists that project's tasks closed today too, as the app's project page does, and marks every row when any row is closed.
  • Closed rows get row numbers like any other row, so complete and cancel now check the item first. If it is already in the requested state, they send nothing and exit 0 with a note. If it was closed the other way (completing a cancelled item, say), they refuse and send nothing.
  • The logbook split still holds: every closed item is either in logbook or in the default listing of its view, project or area. The one exception, as before, is a closed Anytime project with no area.
  • Updated docs (commands.md, agents.md), the README and the bundled skill. The examples that act on .[0] now pass --open-only.

Checked against the app

Run against the live database (with --db and HOME overridden), compared with AppleScript to dos of list ...:

  • Today, Anytime, Inbox, Upcoming and Someday: the default output has the same rows as the app, closed ones included. Anytime, Inbox, Upcoming and Someday match the app's order exactly. In Anytime the three closed project to-dos sit at the app's positions 35, 39 and 41.
  • Two projects that have closed-today tasks: the default --project output matches to dos of project id row for row, in the same order. The show --agent brief matches too.
  • --open-only gives exactly what the old default gave on every view, project and area I checked.

things today before and after, for a to-do completed today:

BEFORE
    Personal
1.   [ ]  ★ Chase LG about 32GS95UV fan rattle — ...   2026-09-25
2.   [ ]  shop for a new beanie                        2026-09-28

AFTER
    Personal
1.   [ ]  ★ Chase LG about 32GS95UV fan rattle — ...   2026-09-25
2.   [ ]  shop for a new beanie                        2026-09-28
3.   [x]  ★ Toothbrush needs charging                  due:2026-10-03

Known gap (separate issue)

In Today the app puts the toothbrush row first in its area group, but the CLI puts it third. This isn't about closed rows. Within a group the app sorts by todayIndexReferenceDate DESC and then by todayIndex, and the CLI drops the first of those keys (#237). On today's 20-row Today that rule matches the app at every position. Fixing it changes the order of open rows too, so I'm leaving it for a separate PR.

The lists (inbox, today, anytime, upcoming, someday) and project and area
listings now include the closed items Things has not logged out of them
yet, in place and marked [x] or [~], as the app shows them. --open-only
drops them. --include-completed is kept as a hidden no-op so existing
scripts keep working.

The default now lives in the db filter (OpenOnly, zero value matches the
app), so a project's `show --agent` brief lists its tasks closed today
too, with each row marked. Because those rows are numbered, `complete`
and `cancel` on an item already in that state send nothing and exit 0
with a note, and refuse to switch a completed item to cancelled or back.

BREAKING CHANGE: default listings now include closed items Things has
not logged yet (under the default Daily setting, those closed today).
Pass --open-only to get the old open-only output.
@ryanlewis
ryanlewis merged commit 3b6512b into main Oct 4, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/show-unlogged branch October 4, 2026 13:16
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.

1 participant