Repository navigation
chore(warnings): one wording for the missing-area and heading-needs-a-list warnings - #450
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --areaandproject edit --area/--area-idsaidThings has no area called "X", while import saidThings finds no area called "X"for the same miss. The comment intargetmsg.gocalled 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).noAreais gone;projectusesnoTarget("area", ...).Unknown heading names the list by title
edit --list-id proj-1 --heading Latersaid"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-reviewpointed out thataddandimporthad the same problem, so the newlistNamehelper is used by all three."--heading needs a list" in one form
Before:
After (
headingNeedsListbuilds all three):Each one still says what really happens:
editleaves the to-do where it is, andaddandimportput it in the Inbox.docs/content/commands.md is updated where it quotes these. SKILL.md does not quote them.
Tests
TestTargetWarningsExactandTestImportTargetWarningsExactpin 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)
noHeadingIDstill says "Things has no heading with id"; it may be worth moving it to "finds no" as well.