Skip to content

chore(warnings): one wording for the missing-area and heading-needs-a-list warnings - #450

Merged
ryanlewis merged 2 commits into
mainfrom
chore/message-wording
Oct 10, 2026
Merged

ryanlewis merged 2 commits into
mainfrom
chore/message-wording

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Three warning wordings brought into line. Agents read these on stderr, so one form per warning is easier to match.

Missing area: "finds no", not "has no"

project add --area and project edit --area/--area-id said Things has no area called "X", while import said Things finds no area called "X" for the same miss. The comment in targetmsg.go called the difference deliberate, but the PR that added it (#440) only kept it so that refactor stayed byte-identical; it gave no reason for the difference itself.

I picked "Things finds no area". Every other list and area warning (add, edit, import) already says "Things finds no project or area", so this is now the only form. "Finds" is also more accurate: the check is about how Things matches the name, and an area can exist that Things will still not match (for example a padded name, since Things does not trim). noArea is gone; project uses noTarget("area", ...).

Unknown heading names the list by title

edit --list-id proj-1 --heading Later said "proj-1" has no heading "Later". When the list was given by uuid, the warning now uses its title: "Tools" has no heading "Later". /code-review pointed out that add and import had the same problem, so the new listName helper is used by all three.

"--heading needs a list" in one form

Before:

add:    --heading "Setup" needs --list or --project; Things will ignore it and put the to-do in the Inbox
edit:   --heading "Setup" needs --list: the to-do is not in a project, so Things will leave it where it is
import: heading "Setup" needs a list; Things will ignore it and put the to-do in the Inbox

After (headingNeedsList builds all three):

add:    --heading "Setup" needs --list or --project; Things will ignore it and put the to-do in the Inbox
edit:   --heading "Setup" needs --list or --list-id, as the to-do is not in a project; Things will ignore it and leave the to-do where it is
import: heading "Setup" needs list or list-id; Things will ignore it and put the to-do in the Inbox

Each one still says what really happens: edit leaves the to-do where it is, and add and import put it in the Inbox.

docs/content/commands.md is updated where it quotes these. SKILL.md does not quote them.

Tests

TestTargetWarningsExact and TestImportTargetWarningsExact pin the new full lines. They add the import heading-without-list case (which no test covered before) and the uuid-to-title cases for add and import.

Follow-up (not in this PR)

  • noHeadingID still says "Things has no heading with id"; it may be worth moving it to "finds no" as well.

@ryanlewis
ryanlewis merged commit fa47d6c into main Oct 10, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the chore/message-wording branch October 10, 2026 14:13
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