feat(list)!: show closed items Things still shows by default - #384
Merged
Merged
Conversation
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.
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.
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
logbookheld 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--projectlisting and a bare--arealisting 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 carryingstatusin JSON. This is the output--include-completedgave before, which already matched the app.--open-onlyleaves those rows out. It works on any listing (doing nothing where only open rows are listed) and is rejected onlogbookandtrash.--include-completedis 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.TaskFilter.OpenOnly, with the zero value matching the app). So a project'sshow --agentbrief lists that project's tasks closed today too, as the app's project page does, and marks every row when any row is closed.completeandcancelnow 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.logbookor in the default listing of its view, project or area. The one exception, as before, is a closed Anytime project with no area.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
--dband HOME overridden), compared with AppleScriptto dos of list ...:--projectoutput matchesto dos of project idrow for row, in the same order. Theshow --agentbrief matches too.--open-onlygives exactly what the old default gave on every view, project and area I checked.things todaybefore and after, for a to-do completed today: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
todayIndexReferenceDateDESC and then bytodayIndex, 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.