Surface Todoset-level todos in todos list
Summary
Fixes #474. In Basecamp 5, todos can live directly under the Todoset without a Todolist (parent.type: "Todoset"). todos list enumerated todos by looping over the todoset's todolists, so these "listless" todos were invisible — the command returned 0 for projects whose todos all live at the Todoset level.
Root cause
listAllTodos lists a project's todolists and fetches todos per-list. When there are zero todolists (or todos parented to the Todoset directly), nothing is returned. Verified live: the API accepts a todo created against a Todoset ID and returns it with parent.type: "Todoset", but GET /todolists/{todosetId}/todos.json 404s — so listless todos are only reachable via the Recordings API (which is why recordings todos was the documented workaround).
Fix
After aggregating todolist todos, listAllTodos now calls a new fetchTodosetLevelTodos helper that:
- Queries the Recordings API (
type=Todo, scoped to the project bucket, status mapped from the todos-list filter). - Keeps only recordings parented directly to this todoset.
- Hydrates each via
Todos().Get— the SDKRecordingtype lacks the completion/assignee/due fields the list output and its filters need. - Applies the completed/incomplete split client-side, since Recordings status is lifecycle-only (active/archived/trashed).
Existing assignee/overdue filters then apply uniformly. Recordings errors are non-fatal, so the todolist path never regresses. CLI-only change — no SDK bump or API change required.
Verification
Validated end-to-end against a live project with mixed Todolist + Todoset-level todos:
- Default view returns the todolist todo and the incomplete listless todo; the completed listless todo is correctly hidden.
--completedreturns only the completed listless todo.--list <id>and projects without listless todos are unaffected.
Two unit tests added (surfacing listless todos + completion-split filtering). Full bin/ci is green.
Summary by cubic
Surface Todoset-level todos in todos list, enforce correct --limit semantics, and bound/order the recordings scan to avoid full-project traversals. Allow cross-list --sort with --assignee/--overdue, and error on invalid project IDs. Fixes #474.
- Bug Fixes
- Include Todoset-level (“listless”) todos via Recordings and hydrate with
Todos().Get; existing filters still apply. - With
--assignee/--overdue, fetch all candidates and apply--limitafter filtering (mirrors single-list). - Apply completed/incomplete split client-side for listless todos; Recordings errors are non-fatal.
- Respect
--limitand scan efficiently: cap kept listless todos after parent filtering (0=default 100, -1=all); scan a recent, most-recent-first window by default, use--allfor exhaustive scans. - Allow
--sortwhen results aren’t sampled (--allor--assignee/--overdue); return a usage error on unparseable project IDs.
- Include Todoset-level (“listless”) todos via Recordings and hydrate with