Skip to content

fix(db): match project and area titles across Unicode compatibility forms - #371

Merged
ryanlewis merged 1 commit into
mainfrom
fix/compat-names
Oct 4, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/compat-names

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Things matches project and area titles across Unicode compatibility forms, but the CLI did not. So --project/--area missed titles that Things would match, and add, edit and project add/edit warned that a list or area would not resolve when Things filed the item there anyway.

What Things does

I checked this in Things 3 with throwaway items, using list= in things:///add and things:///update, area= in add-project and update-project, and tags= in add, and read the results back over AppleScript. Each form was tested both ways round (compatibility form typed, plain title stored, and the reverse):

Form Project / area titles Tag names
Fullwidth A, a match A no match
Superscript ² matches 2 no match
Circled Ⓑ matches B no match
No-break space matches a space no match
Ligature fi matches fi matches (already handled by full case folding)
Ⅳ, ㎏, …, ½ match IV, kg, ..., 1⁄2 not tested
Café vs Cafe no match no match

This is Unicode's compatibility caseless match (NFKC plus case folding). Accents still count.

Change

  • New FoldName (SQL: fold_name()) applies the compatibility caseless match. It is used for project and area titles in the --project/--area filters, open --area, AddTarget (the add/edit warnings) and the project add/edit area warning.
  • Tags, headings, title lookups and search keep FoldCase.
  • Exact-case names are still preferred, and NFC/NFD names still match.
  • The LIKE value is escaped after folding, because fullwidth % folds to %.
  • Updated docs (commands.md, agents.md) and the bundled skill.

Checks

  • make test and make lint pass. New tests cover FoldName against FoldCase, the filters, FindAreaUUID/FindTagUUID, AddTarget and the project add warning. The golden SQL changed only by fold( becoming fold_name(.
  • Against real Things: main's binary warned for add --list <fullwidth title> and project add --area <superscript title>, and Things filed both correctly anyway. This branch gives no warning. edit --list and project edit --area with fullwidth and circled forms moved the items as expected.

…orms

Things matches list and area titles in things:///add and add-project
across compatibility forms: fullwidth letters, superscript digits,
circled letters, a no-break space, Roman numerals and the like. It does
not do this for tag names. The --project and --area filters, open
--area, and the add, edit and project add warnings now fold project and
area titles the same way (Unicode compatibility caseless match). Tags,
headings and title search keep the canonical fold. Exact-case names are
still preferred.
@ryanlewis
ryanlewis merged commit 0155f28 into main Oct 4, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/compat-names branch October 4, 2026 01:11
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