Skip to content

fix(list): carry projects in the bare-filter catch-all view - #232

Merged
ryanlewis merged 1 commit into
mainfrom
fix/issue-222-catchall-projects
Sep 10, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/issue-222-catchall-projects

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Closes #222

What changed

The internal catch-all view — the one a bare --project/--area/--tag filter routes to when no view is named — was still pinned to t.type = 0 while every named view except inbox had been widened to todoOrProject (#205, #209, #216, #220). It now uses the same set.

--project is unaffected in practice: a project has no parent project of its own, so p.uuid never matches a project row and the filter still returns a project's contents. The visible change is for --area and --tag.

Why

An agent sweeping an area with things --area Work -j got none of that area's projects, which is exactly the miss #222 describes. Parity with what Things.app shows in the matching list is the project's stated goal.

How verified

Measured by uuid against Things.app on 10 Sep 2026. For one area the app reports four projects; the CLI returned zero project rows before this change and returns the same four uuids after. things --project <uuid> -j still returns zero project rows.

Tests added in internal/db/tasks_test.go cover the widened set, the --area/--tag/--project split, and the exclusions that must not widen with it — headings, trashed projects, repeating project templates and the to-dos inside them. Four existing tests asserted the old to-do-only behaviour and now assert the project rows: two area filters, the catch-all grouping order, and the CLI-level default-view test.

make test and make lint are clean.

Docs

The paragraph naming the bare-filter exception was rewritten once, in internal/skill/SKILL.md, docs/content/commands.md, docs/content/agents.md and the README. It now states the --project case rather than a whole-view exception.

Every named view except inbox returns project rows (#205, #209, #216, #220),
but a filter with no view named — `things --area Work`, `things -t urgent` —
routes to the internal catch-all view, which was still pinned to `t.type = 0`.
An agent sweeping an area that way got none of its projects.

The catch-all now uses the same `todoOrProject` set as the named views.
`--project` is unaffected in practice: a project has no parent project of its
own, so `p.uuid` never matches a project row and the filter still returns a
project's contents.

Verified against Things.app on 10 Sep 2026 by uuid. For one area the app
reports four projects; the CLI returned none before this change and returns
the same four uuids after. `--project` still returns zero project rows.

Tests cover the widened set, the exclusions that must not widen with it
(headings, trashed projects, repeating project templates and their children),
and the `--area`/`--tag`/`--project` split. Four existing tests asserted the
old to-do-only behaviour and now assert the project rows.

Docs drop the exception the paragraph has carried since #220, in SKILL.md,
commands.md, agents.md and the README, and name the `--project` case instead.

Closes #222
@ryanlewis
ryanlewis merged commit 61801ea into main Sep 10, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/issue-222-catchall-projects branch September 10, 2026 12:14
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.

bug: the bare-filter view (things -p X, -a, -t with no view) still omits projects

1 participant