mirror of
https://github.com/heroblackink/ultimate-todoist-sync-for-obsidian.git
synced 2026-07-22 07:40:27 +00:00
9.6 KiB
9.6 KiB
CHANGELOG
[1.0.4] - 2026-02-17
Added
- Three-way sync direction controls: Added two new settings for granular sync control
obsidianToTodoistEnabled(default: true) - Enable/disable Obsidian → Todoist synctodoistToObsidianEnabled(default: false) - Enable/disable Todoist → Obsidian sync- Both directions are independently controllable via new UI toggles in settings
- Sync status display now shows direction states
- Full syncData persistence: Added
syncDataCachefield to settings to store complete Todoist API response- All API data (projects, items, sections, labels, notes, user, etc.) is now persisted
- Plugin startup loads from cache first, reducing API calls
- Data is saved to cache after full sync and incremental sync
Changed
- Removed syncToken from settings: Token now only stored in memory within syncDataCache
- Read from
this.syncData?.sync_tokeninstead ofsettings.syncToken
- Read from
- Improved mergeSyncData: Now merges all API response fields dynamically instead of hardcoded fields
- databaseChecker completely rewritten:
- Now checks 8 combinations of 3 data sources (Vault, Todoist, taskFileMapping)
- New issue types: mapping_file_not_found, mapping_task_not_in_todoist, mapping_orphan, vault_task_no_mapping, line_number_mismatch
- Report format updated: shows data source combinations table first, then detailed issues by type
Fixed
- rebuildCache refactored: Updated to use new architecture with taskFileMapping
Tests
- Added comprehensive test suite:
tests/sync-api/test-todoist-sync-api-full.mjs
[1.0.3] - 2026-02-17
Changed
- Major Refactoring: Simplified Data Architecture
- Removed
todoistTasksDatafrom settings (was storing tasks/projects/events in persistent storage) - Added
taskFileMappingto settings (stores taskId → {filePath, lineNumber} mapping only) - Now using
syncData(in-memory from Todoist API) as single source of truth for tasks/projects - Todoist API is now the primary data source instead of local cache
- Removed
Refactored Files
src/settings.ts: RemovedtodoistTasksDatainterface, addedtaskFileMappinginterfacesrc/todoistSyncAPI.ts:- Modified
GetAllProjects(),GetTaskById(),GetActiveTasks()to read fromsyncDatawith fallback to full sync - Added
getProjectById(),getProjectByName()methods for project lookups - Added
getSyncData()public method to access in-memory sync data
- Modified
src/cacheOperation.ts:- Added 4 new taskFileMapping methods:
getTaskFileMapping(),setTaskFileMapping(),deleteTaskFileMapping(),getAllTaskFileMappings() - Deprecated all old cache methods (made them no-ops):
loadTasksFromCache,saveTasksToCache,appendTaskToCache,closeTaskToCacheByID,reopenTaskToCacheByID, etc. - Updated
getDefaultProjectNameForFilepath()to use todoistSyncAPI
- Added 4 new taskFileMapping methods:
src/obsidianToTodoist.ts: Replaced all cacheOperation calls with taskFileMapping or removed themsrc/fileOperation.ts: Replaced allloadTaskFromCacheyID()calls withgetTaskFileMapping()+GetTaskById()src/taskParser.ts: Replaced cache methods with todoistSyncAPI methodssrc/databaseChecker.ts: UsessyncData.items+taskFileMappinginstead oftodoistTasksData.taskssrc/modal.ts: UsestodoistSyncAPI.getSyncData().projectsinstead oftodoistTasksData.projectssrc/todoistToObsidian.ts: Simplified to use taskFileMapping, removed event tracking calls
Notes
- Events (todoist → obsidian sync) are temporarily ignored to simplify one-way sync first
- This refactoring reduces data duplication and ensures Todoist is the single source of truth
[1.0.2] - 2026-02-16
Added
- Added comprehensive operation logging system (
src/logOperation.ts)- Tracks 30+ log action types including task operations, file operations, cache operations, and Todoist API operations
- Persistent log storage in plugin settings
- Log viewing modal in settings
- Added bidirectional sync module split
src/obsidianToTodoist.ts- Handles sync from Obsidian to Todoistsrc/todoistToObsidian.ts- Handles sync from Todoist to Obsidiansrc/syncModule.ts- Refactored to orchestrate bidirectional sync
- Added automatic file backup before modifications (
src/backupOperation.ts)- Backs up files to
.todoist-backups/directory - Configurable backup retention
- Backs up files to
- Added conflict detection and resolution for rebuild cache (
src/conflictModal.ts)- Interactive modal for resolving content and status conflicts
- Options: keep Obsidian, keep Todoist, or skip
- Added comprehensive
checkDatabasefunction with 3-way data comparison- Three data sources: Vault files, local Cache, and Todoist API
- 16 types of issue detection:
task_deleted_in_todoist: Task exists in Vault and Cache but deleted in Todoistmissing_in_cache: Task exists in Vault and Todoist but not in local cachenew_task_not_synced: Task in Vault not synced to Todoist and not in cachefile_reference_missing: Task in Cache and Todoist but Vault file reference missingorphaned_in_cache: Task in Cache but not in Vault and deleted in Todoisttask_not_in_vault: Task in Todoist but not in any Vault filecontent_mismatch: Content differs between Vault and Todoistcache_content_outdated: Cache content is outdated compared to Todoiststatus_mismatch: Completion status differs between Vault and Todoistcache_status_outdated: Cache status is outdated compared to Todoistduedate_mismatch: Due date differs between Cache and Todoistduplicate_task: Same task ID appears in multiple filespriority_mismatch: Priority differs between Cache and Todoistlabel_mismatch: Labels differ between Vault and Todoistproject_mismatch: Project differs between Cache and Todoist
- Generates detailed markdown report with task information (ID, content, file, line, due date, priority, status)
- Report saved to
.todoist-reports/folder
Fixed
- Fixed checkbox regex bug (
\d+→\w+to support string IDs) - Fixed taskParser.ts regex inconsistencies
- Fixed duplicate module initialization in initializePlugin()
- Fixed AddTask date handling bug (was converting dueDatetime instead of dueDate)
- Fixed unused imports and variables in main.ts
- Improved rebuildCache with checkbox status detection and completion status comparison
- Fixed
getPluginPath()method error - replacedgetBasePath()withvault.configDirfor better compatibility - Replaced
fetch()with Obsidian'srequestUrl()for all Todoist API calls to fix CORS issues and ensure properX-Todoist-Clientheader is sent
[1.0.1] - 2026-02-16
Added
- Added tests directory with API test scripts
- Added
tests/test-todoist-api.js- Basic API test script - Added
tests/test-rest-api-full.mjs- Full REST API test script (29 test cases) - Added
tests/test-sync-api.js- Basic Sync API test script - Added
tests/test-sync-api-full.js- Full Sync API test script (26 test cases)
Fixed
- REST API Migration (v9 → v1): Updated
src/todoistRestAPI.tsto handle new pagination formatGetActiveTasks(): Now returnsresult.resultsinstead of raw resultGetAllProjects(): Now returnsresult.resultsinstead of raw result
- Sync API Migration (v9 → v1): Updated
src/todoistSyncAPI.tsto use new API endpointsgetAllResources(): Changed URL to/api/v1/syncgetUserResource(): Changed URL to/api/v1/syncupdateUserTimezone(): Changed URL to/api/v1/syncgetAllActivityEvents(): Changed to GET/api/v1/activities, returns{ events: [] }formatgetCompletedItemsActivity(): Changed to GET/api/v1/activities?event_type=completedgetUncompletedItemsActivity(): Changed to GET/api/v1/activities?event_type=uncompletedgetUpdatedItemsActivity(): Changed to GET/api/v1/activities?event_type=updatedgetProjectsActivity(): Changed to GET/api/v1/activities?object_type=project- Fixed null check for
extra_data.clientingetNonObsidian*methods
- Build Configuration: Updated
esbuild.config.mjsto handle Node.js built-in modules in new@doist/todoist-api-typescriptlibrary (v6.5.0)- Added
node:assert,node:async_hooks,node:buffer,node:console,node:crypto,node:dns,node:diagnostics_channel,node:events,node:fs,node:http,node:https,node:net,node:path,node:perf_hooks,node:querystring,node:stream,node:string_decoder,node:timers,node:tls,node:url,node:util,node:util/types,node:worker_threads,node:zlib
- Added
Changed
- Library Update:
@doist/todoist-api-typescriptupgraded from v2.1.2 to v6.5.0
Known Issues
- TypeScript compilation errors due to library version incompatibility with TypeScript 4.7.4 (use
npm run build-without-tscfor now)
prelease [1.0.38] - 2023-06-09
https://github.com/HeroBlackInk/ultimate-todoist-sync-for-obsidian/releases/tag/v1.0.38-beta
- New feature
- 1.0.38 beta now supports date formats for tasks.
- Todoist task link is added.
prelease [1.0.37] - 2023-06-05
https://github.com/HeroBlackInk/ultimate-todoist-sync-for-obsidian/releases/tag/v1.0.37-beta
- New feature
- Two-way automatic synchronization, no longer need to manually click the sync button.
- Full vault sync option, automatically adding
#todoistto all tasks. - Notes/comments one-way synchronization from Todoist to Obsidian.
- Bug fix
- Fixed the bug of time zone conversion.
- Removed the "#" from the Todoist label.
- Update the obsidian link in Todoist after moving or renaming a file.