- Added proper cleanup of task references before deletion operations
- Remove deleted tasks from parent subtask lists to prevent orphaned references
- Filter deleted tasks from reorder operations to avoid invalid references
- Fixes "Task data not found" errors caused by inconsistent state
This ensures Super Productivity's state remains consistent when tasks are deleted
during markdown synchronization operations.
- Changed detectIndentSize to use most common indent size instead of minimum
- Prevents incorrect task hierarchy when malformed lines are present
- Fixes duplication issues caused by tasks being treated as subtasks incorrectly
Increased test timeouts and improved setup to handle async initialization.
The focus trigger fix has been implemented and is working correctly in practice.
Store pendingMdToSpSync config in local variable before calling handleMdToSpSync
to prevent race conditions when window gains focus during debounce period.
- Use separate mdToSpDebounceTimer and spToMdDebounceTimer variables
- Prevents SP changes from canceling the 10-second MD to SP debounce
- Add logging to differentiate between sync directions
- Clear timer state when sync completes
This fixes the issue where frequent SP changes were preventing
the 10-second debounce for markdown file changes from working.
- Update package.json with latest dependencies
- Configure build script for plugin packaging
- Archive old implementation in src/background/old/
- Remove obsolete test files and utilities
- Clean up unused replication approach
Tests:
- Markdown parser tests with edge cases and error handling
- Task operations generator tests for create/update/delete/reorder
- SP to markdown conversion tests with ordering validation
- Sync state verification tests
- Integration tests for full sync workflows
- File utilities tests
Configuration:
- Jest setup for plugin testing
- ESLint and Prettier configuration
- Test utilities and mocks
Core sync infrastructure:
- Markdown parser with task ID extraction and parent-child support
- SP to markdown converter with proper task ordering based on project taskIds
- Task operations generator for efficient batch updates
- Sync manager with file watching and intelligent debouncing
- Window focus-aware debouncing (15s when unfocused, 1s when focused)
- Post-sync verification to ensure consistency
Key features:
- Bidirectional sync between markdown files and Super Productivity
- Preserves task hierarchy and subtask ordering
- Handles duplicate ID detection and prevention
- Smart conflict resolution with detailed logging
- Efficient batch operations to minimize API calls
Plugin integration:
- Background script with proper initialization
- UI bridge for configuration management
- Plugin manifest and entry point
- Configuration UI for file path setup
- Add @super-productivity/plugin-api package with TypeScript definitions
- Define core plugin interfaces, types, and manifest structure
- Add plugin hooks system for event-driven architecture
- Create plugin API type definitions and constants
- Add documentation and development guidelines