Skip to content

fix(list): list anytime tasks due later in upcoming, as the app does - #288

Merged
ryanlewis merged 1 commit into
mainfrom
fix/upcoming-deadlines
Sep 30, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/upcoming-deadlines

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

things upcoming left out tasks that Things.app shows in Upcoming. If a task sits in Anytime with no start date and has a deadline after today, the app lists it in Upcoming on the deadline's day. The CLI did not list it at all. An agent reading upcoming never saw those deadlines coming.

Measured against the live database and the app on 30 Sep 2026: the app's Upcoming held 36 rows and things upcoming returned 33. Two of the three missing rows were open Anytime tasks with no start date and a deadline later this month or next. The third was closed today (see below). With this change the CLI returns the 35 open rows in the same order as the app.

Cause

The upcoming view only took rows in the Someday bucket with a start date (start = 2 AND startDate IS NOT NULL). The app also puts an undated Anytime task with a future deadline in Upcoming, and sorts it by that deadline among the rows scheduled for the same day.

Change

  • upcoming also takes undated Anytime tasks (start = 1, type = 0) whose deadline is after today. Today's date is worked out in SQL the same way the Logbook's held-in-place test works it out.
  • It orders by COALESCE(startDate, deadline), then todayIndex as before. --on/--from/--to on upcoming compare the same date, so things upcoming --on <deadline> finds the task.
  • Projects of this shape, and tasks that have both a start date and a deadline, are left alone. The data had none of either, so the app's behaviour for them was not measured.

A task like this now comes back from both upcoming and anytime, as it does in the app. The docs and the bundled skill say so, and tell agents to merge the two on uuid.

Tests

TestUpcomingListsAnytimeToDosDueLater failed before the fix: both deadline-only rows were missing, and --on missed one. TestListTasksViews now expects the base fixture's t-deadline row in upcoming. The golden SQL is regenerated.

Not in scope: the app also keeps a task closed today in Upcoming, struck through, but upcoming does not take --include-completed.

Ran as part of a weekly bughunt routine.

@ryanlewis ryanlewis added fix Bug fix bughunt Found by the weekly bughunt routine labels Sep 30, 2026
The app's Upcoming lists an Anytime to-do with no start date and a deadline
after today under the deadline's day. things upcoming only took Someday-bucket
rows with a start date, so it missed them. Upcoming now takes both, orders and
date-filters by COALESCE(startDate, deadline).
@ryanlewis
ryanlewis force-pushed the fix/upcoming-deadlines branch from 0f0fc1d to 3185be3 Compare September 30, 2026 03:32
@ryanlewis
ryanlewis merged commit 285642b into main Sep 30, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/upcoming-deadlines branch September 30, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bughunt Found by the weekly bughunt routine fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant