Skip to content

Fix ToDo creation in JXA automation - #16

Merged
thaodangspace merged 1 commit into
mainfrom
fix-jxa-todo-creation
Aug 26, 2026
Merged

Fix ToDo creation in JXA automation#16
thaodangspace merged 1 commit into
mainfrom
fix-jxa-todo-creation

Conversation

@thaodangspace

Copy link
Copy Markdown
Owner

Summary

Fixes task creation failures (Can't make class) caused by JXA not reliably resolving the two-word "to do" class specifier in app.make({ new: "to do", ... }).

  • Adds newTodo(app, container, title) helper using app.ToDo({ name: title }) and pushing directly to the target container's toDos collection.
  • Updates addTodo to push directly to the resolved project or Inbox.
  • Updates addProject child task creation to push directly to the new project.

Verification

  • Unit and race tests pass (make test, make test-race, make vet, make build).

Replace app.make({ new: "to do" }) with app.ToDo(...) pushed directly into target containers (inbox or project). This avoids "Can't make class" errors on macOS/Things versions where the two-word "to do" class specifier fails to resolve.
@thaodangspace
thaodangspace merged commit 0d668c5 into main Aug 26, 2026
3 checks passed
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