Skip to content

fix(edit): treat a no-op move as applied and warn on unknown ids - #372

Merged
ryanlewis merged 3 commits into
mainfrom
fix/edit-noop
Oct 4, 2026
Merged

ryanlewis merged 3 commits into
mainfrom
fix/edit-noop

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Four gaps in the edit read-back and the unresolved-target warnings, each checked against Things 3 with throwaway items.

No-op moves. Moving an item to the list, area or heading it is already in makes Things record no change, so edit and project edit waited for one and reported a false "did not apply". This covered --list, --list-id, --heading, --heading-id and project edit --area/--area-id. Those moves now count as no change, and an edit made only of them prints the item at once. A to-do under a heading moved to its own project with --list alone does move (it leaves the heading), so that still waits.

Unknown ids. Things ignores an unknown --list-id, --heading-id or --area-id, with no dialog, the same as an unknown name. Each now gets a warning like the name forms, and counts as no change. An unknown --heading-id with a known list moves the to-do to the list with no heading, as Things does. A known --heading-id wins over a list or heading title sent with it.

Unknown --list with --heading. Things ignores the list and treats the heading as if it came alone: it looks in the to-do's own project and moves it there if the heading exists. The warning now says so, and the read-back matches.

Heading matching. Things matches heading titles untrimmed, case-insensitively, with full case folding (STRASSE finds Straße) and NFC/NFD equivalence, the same as list titles. The CLI already used the shared matcher for headings; tests now pin those cases. Things does not match compatibility forms in heading titles: Full did not find Full, and x2 did not find x².

Docs and the bundled skill are updated for the new warnings.

…known ids

A move to the list, area or heading an item is already in made Things
record no change, so edit and project edit waited and reported a false
"did not apply". Those moves now count as no change.

An unknown --list-id, --heading-id or --area-id is ignored by Things, as
an unknown name is, and now gets the same warning. An unknown --list with
--heading is looked up as a heading alone, which is what Things does.
Also note that headings are compared by folded title, and show the
ignored --heading-id warning in the docs.
Things matches project and area titles with compatibility folding, so an
--area naming the project's own area in fullwidth is also no change.
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