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 inline-assets.js script to boilerplate-solid-js
- Add deploy script that builds, inlines assets, and packages
- Update README with deployment instructions for HTML UI plugins
- Asset inlining needed for all plugins with index.html due to data URL loading
- Add inline-assets script to embed JS/CSS into HTML for data URL compatibility
- Update build process to automatically inline assets during build:all
- Fix PluginAPI integration and wait for API availability
- Update App.tsx to use PluginAPI.dispatchAction instead of postMessage
- 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