Skip to content

fix(list): prefer the exact-case name for --area and --tag - #358

Merged
ryanlewis merged 1 commit into
mainfrom
fix/list-exact-case
Oct 3, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/list-exact-case

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

What was wrong

list --area X, list --tag X and projects --area X matched every area or tag whose title equals X ignoring case. Things lets two areas or two tags differ only by case, so naming one listed both. open --area/--tag (#284) and list --project (#341) already prefer the exact-case title.

What changed

There are two new helpers next to projectNameMatch in internal/db/tasks.go, areaNameMatch and tagNameMatch. They follow the same rule:

Areas and tags are never trashed, so the trashed-item exception from #341 doesn't apply. The list views' --area and --tag filters use the helpers, and so does things projects --area. The golden SQL file is regenerated; only the area and tag clauses and their arguments changed. commands.md and SKILL.md now say exact case applies to --area and --tag too.

How it was tested

  • New tests in internal/db/namecase_test.go set up two areas and two tags that differ only by case. They check exact case, the other case, all caps, a padded name and a uuid, for both list filters and for projects --area. They failed before the change and pass now.
  • make test and make lint pass.
  • Built binary against a scratch copy of the Things database, with an extra area personal beside Personal and tags ZzCase and zzcase. anytime --area personal listed 1 task, --area Personal 10, and --area PERSONAL 11. projects --area and --tag behaved the same way.

list --area and --tag, and projects --area, matched every title equal
to the name ignoring case. Things lets two areas or tags differ only by
case, so naming one listed both.

They now take names the way --project does since #341: an exact-case
title wins, and only with none does the filter fold case and trim.
@ryanlewis
ryanlewis force-pushed the fix/list-exact-case branch from a8f80fd to 8cf1708 Compare October 3, 2026 22:58
@ryanlewis
ryanlewis merged commit 2896ea2 into main Oct 3, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/list-exact-case branch October 3, 2026 23:00
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