Todoist plugin: Add date filtering, multi-project sync, status sync, and comprehensive tests#734
Todoist plugin: Add date filtering, multi-project sync, status sync, and comprehensive tests#734felciano wants to merge 37 commits intoNotePlan:mainfrom
Conversation
- Add projectDateFilter setting with choices: all, today, overdue|today, 7 days - Default to 'overdue | today' to focus on actionable tasks - Fix URL encoding in filter construction - Update README with documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Support /todoist sync project today - Support /todoist sync project overdue - Support /todoist sync project current (today+overdue) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- /todoist sync project today (alias: tospt) - /todoist sync project overdue (alias: tospo) - /todoist sync project current (alias: tospc) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ensureHeadingExists helper function - Create section headings from Todoist automatically - Create default header from settings automatically Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use for...of instead of forEach for proper async/await - Add filterTasksByDate() for client-side filtering - Todoist API ignores filter param when project_id is specified Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace ensureHeadingExists with addTaskBelowHeading - When heading doesn't exist, append both heading and task - Use appendTodo after creating heading instead of addTodoBelowHeadingTitle Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isEditorNote flag throughout the call chain - Use Editor.appendParagraph instead of note methods for current note - Fixes tasks not appearing when syncing the open note Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Read todoist_filter from note frontmatter - Priority: command-line > frontmatter > settings - Valid values: all, today, overdue, current, 7 days - Updated README with documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Support multiple Todoist projects per note via todoist_ids frontmatter - Add projectSeparator setting to control project heading format - Add sectionFormat setting to control section heading format - Organize tasks by Todoist sections under project headings - Parse JSON array strings in frontmatter for project IDs - Graceful fallback when headings aren't found - Update README with multi-project documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents three approaches for automatically syncing Todoist tasks when daily notes are created or opened. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Combines three feature branches: - feature/todoist-date-filter: Date filtering (today, overdue, 3/7 days) - feature/todoist-multi-project: Multiple projects per note with sections - bugfix/todoist-multi-value-frontmatter: JSON array parsing for project IDs New settings: projectDateFilter, projectSeparator, sectionFormat New frontmatter: todoist_ids, todoist_filter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow users to specify Todoist projects by name instead of numeric ID in frontmatter. Supports both single and multiple project names: - todoist_project_name: "Project Name" - todoist_project_names: ["Project1", "Project2"] Names are resolved to IDs via the Todoist API with exact match first, then case-insensitive fallback. Existing todoist_id/todoist_ids frontmatter remains fully supported for backward compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow passing project names directly to /todoist sync project without needing frontmatter. Supports CSV format with quoted values for names containing commas: /todoist sync project "ARPA-H" /todoist sync project "ARPA-H, Personal" /todoist sync project "ARPA-H, \"Work, Life\", Personal" /todoist sync project "ARPA-H" today Priority order: inline args > frontmatter names > frontmatter IDs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow passing project names as an array for cleaner template tag usage: syncProject(["ARPA-H", "Personal"], "today") This avoids CSV escaping issues for project names containing commas. Both formats now supported: - Array: [["ARPA-H", "Work, Life"]] (best for templates) - CSV string: "ARPA-H, \"Work, Life\"" (for x-callback-urls) Also added README section on embedding sync calls in notes with examples for both template tags and x-callback-url links. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
NotePlan requires arguments to be defined in plugin.json for the command bar to prompt for them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New command that prompts for: 1. Project name(s) - comma-separated 2. Date filter - select from options This provides a user-friendly way to sync projects without needing frontmatter or remembering argument syntax. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New settings: - 'Insert before project title': Nothing, Blank Line, Horizontal Rule, or Blank Line + Horizontal Rule - 'Insert before section heading': same options Also added debug logging to getTodoistProjects() and resolveProjectNamesToIds() to help diagnose sync issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use correct /tasks/filter endpoint with query parameter - Add pagination support to fetch all tasks (not just first 50) - Always filter to exclude tasks assigned to others - Clear global arrays to prevent duplicate tasks on re-run - Add heading deduplication to prevent duplicate project/section names - Update command semantics to match API behavior (today excludes overdue) - Replace syncDueTodayByProject with syncCurrentByProject (today + overdue) - Remove unused pullTodoistTasksForToday function All sync commands now correctly handle multiple runs without duplicates and properly filter by assignment across all API calls. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Converts NotePlan tasks to Todoist Inbox tasks with bidirectional linking. Supports single task (cursor) or multi-task (selection) conversion. Extracts priority (!!!/!!/!), due dates (>YYYY-MM-DD), and labels (#tag). Handles subtasks by creating Todoist subtasks with parent_id. Appends [^](todoist-link) to converted tasks. Skips tasks already linked to Todoist. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Syncs only task completion status between NotePlan and Todoist without adding or removing tasks. If a task is marked done in NotePlan, it gets closed in Todoist. If a task is completed in Todoist, it gets marked done in NotePlan. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Phase 1: Pure function unit tests (parsing.test.js) - Phase 2: API mock tests (api.test.js) - Phase 3: Integration tests (commands.test.js) - Add test fixtures (mockTasks.js, mockParagraphs.js) - Export internal functions for testing - 121 tests total, all passing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents all Todoist plugin feature branches and their merge order. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Todoist now uses alphanumeric task IDs (e.g., 6X4P4Mp38MWX3MW4) instead of purely numeric IDs. Updated regex from (\d+) to ([a-zA-Z0-9]+). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Todoist API v1 returns 'checked: true' for completed tasks, not 'is_completed'. Updated all three places checking completion status. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Script builds and deploys Todoist plugin from integration branch, handling stash/restore of uncommitted changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename 'todoist sync status only' to 'todoist sync status' (alias: toss) - Add 'todoist sync status all' command (alias: tossa) to sync across all linked notes - Refactor status sync logic into reusable syncStatusForNote helper Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive list of new commands, settings, frontmatter options, and bug fixes for PR review. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflict in NPPluginMain.js by keeping the feature branch's more comprehensive pullTodoistTasksByDateFilter implementation, which already uses the corrected /tasks/filter endpoint with ?query= parameter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive test suite for filterTasksByDate function
- Add regression tests for "3 days" and "7 days" filters excluding tasks without due dates
- Fix projectSync to handle both API response formats ({results:[...]} and plain array)
- Add debug logging to trace filter values through projectSync
- Export filterTasksByDate for unit testing
- Improve update-todoist-live.sh to detect and report build failures
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle cursor-based pagination in fetchProjectSections, pullTodoistTasksByProject, and getTodoistProjects to properly fetch all results from the Todoist v1 API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename syncStatusOnly to syncStatus in tests to match exported function - Update test mocks to use 'checked' field instead of 'is_completed' to match Todoist API v1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@dbludeau Pls let me know when it is ready to release. |
|
@felciano Thanks for this contribution! I will defer to @dbludeau to do the testing and approval for the plugin in particular. Thanks! |
- Move docs/TODOIST_AUTOSYNC_DESIGN_OPTIONS.md to dbludeau.TodoistNoteplanSync/docs/ - Remove NEW-FEATURES.md from root (duplicate of plugin version) - Remove update-todoist-live.sh (dev script not for PR) - Remove .claude/settings.local.json (local settings) - Add .claude/ to .gitignore to prevent accidental commits of local settings Addresses PR feedback to keep plugin files within plugin directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Fixed--thank you @dwertheimer. Silly mistakes. |
|
@dwertheimer do you have a perspective on including things like AGENT.md or CLAUDE.md in the repo? |

Summary
Major enhancement to the Todoist NotePlan Sync plugin adding date filtering, multi-project support, bidirectional status sync, and a comprehensive test suite.
New Commands
Date-Filtered Project Sync:
/todoist sync project today(tospt) - Sync only tasks due today/todoist sync project overdue(tospo) - Sync only overdue tasks/todoist sync project current(tospc) - Sync overdue + today tasks/todoist sync project by name(tospn) - Interactive prompts for project selectionGlobal "By Project" Commands:
/todoist sync today by project(tostbp) - Today's tasks grouped by project/todoist sync overdue by project(tosobp) - Overdue tasks grouped by project/todoist sync current by project(toscbp) - Today + overdue grouped by project/todoist sync week by project(toswbp) - Next 7 days grouped by projectStatus Sync:
/todoist sync status(toss) - Bidirectional completion sync for current note/todoist sync status all(tossa) - Sync completion status across all linked notesConvert Task:
/todoist convert to todoist task(cttt, toct) - Convert NotePlan tasks to TodoistNew Settings
projectDateFilter- Default date filter for project syncsprojectSeparator- How to separate multiple projects visuallyprojectPrefix- What to insert before project titlessectionFormat- Format for Todoist section headingssectionPrefix- What to insert before section headingsNew Frontmatter Options
todoist_project_name/todoist_project_names- Reference projects by nametodoist_ids- Sync multiple projects to one notetodoist_filter- Per-note date filter overrideBug Fixes
checkedinstead ofis_completed)Testing
Test plan
npx jest dbludeau.TodoistNoteplanSync)🤖 Generated with Claude Code