Repository navigation
fix(add): check the list Things picks when titles fold together - #390
Merged
Merged
Conversation
ryanlewis
force-pushed
the
fix/name-collisions
branch
from
October 7, 2026 22:11
120e567 to
7fd2237
Compare
ryanlewis
force-pushed
the
fix/name-collisions
branch
from
October 7, 2026 22:25
7fd2237 to
cad6fb5
Compare
When two projects, or two areas, share a title under the CLI's folding, Things files into the one whose uuid sorts first byte by byte, even when another one's title matches exactly. Measured in Things 3 with add, add-project's area, update and json, over pairs that differ in case, normalisation and compatibility forms, created in either order. A project completed or cancelled today, which Things still shows, takes part too, and Things files into it even with no other match; a logged or trashed one does not. AddTarget and project add/edit's area match now pick that row, so the read-back checks the list Things filed into instead of any list sharing the title, and project edit --area tells two same-titled areas apart. ListTitleShared goes, since nothing is left unknown.
…project by uuid Review fixes for the list Things picks: - a repeating template is left out of the title match only, so its uuid still names it (edit --heading in a template project, add --list <template-uuid>) - by uuid Things files into any project, closed, logged or trashed, and reopens a closed one (measured with list-id) - AddTarget returns a Target, and AreaTarget is the one area pick for add, project add/edit --area and import - add, edit, project add and project edit note on stderr when several lists share the title and which one Things will use, and when the project is closed or trashed - tests for the other "Move completed items to Logbook" choices, which the docs now say were not measured, and for unreadable areas - the docs no longer say only open projects match
ryanlewis
force-pushed
the
fix/name-collisions
branch
from
October 7, 2026 22:30
cad6fb5 to
36e9001
Compare
…y real moves Review fixes, round 3: - db.Target carries ByUUID, set by AddTarget and AreaTarget, in place of comparing the target with the trimmed reference at each call site; an import area given as a padded uuid is no longer taken for that area, since Things takes area by title and does not trim it - a project and an area sharing a title get a note naming the project, which Things picks whichever uuid sorts first (measured) - edit and project edit only note when the item moves somewhere new - project edit --area "" counts as a possible change again - checkAreaID uses AreaTarget, and checkMove keeps one target - measured: update moves a to-do into a logged or trashed project by list-id, reopening a closed one, and --heading alone moves it under a heading of its own logged or trashed project; tests pin both - docs describe the notes for edit and project edit
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.
When two projects, or two areas, share a title under the CLI's folding (case, full case folding, NFC/NFD, compatibility forms), the CLI preferred the exact-case title, and since #383 the read-back accepted any list sharing the title. Things does neither: it files into the matching row whose uuid sorts first, byte by byte.
What I measured in Things 3
things:///addwithlist=went to the smallest uuid every time, including when the other project's title matched exactly. Creation order and index made no difference.HUq6…,QbEp…,dPXM…): Things tookHUq6…, so it is byte order. A 21-character uuidVQjv…lost toHGL4…, so it is string order, not numeric.add list=andadd-project area=both took the smallest uuid, again ignoring the exact-case title. So didjsonandupdate(projectarea=, to-dolist=).Café) and fullwidth (WIDE/wide) collisions follow the same rule.updatewithlist=andlist-id=does the same. A project completed two days ago (logged) or trashed does not count.Change
AddTargetpicks the smallest uuid among projects that are open or closed but not yet logged (repeating templates excluded), then areas.project add --area,project edit --areaand import'sareapick the same area (titledArea), soproject edit --areanow tells two same-titled areas apart.ListTitleSharedis removed.Verification
make testandmake lintpass. I also ran the built binary against the zz items:add --project "…Fold"was confirmed inFOLD;add --listinto the canceled-today min-uuid project and a lone completed-today project was confirmed without a warning;project add --area "…Aa1"was confirmed inAA1; import of a to-do and a project was confirmed;project edit --areamoved a project from the larger-uuid area to the one Things picks, and a re-run naming the other case was a no-op.