mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-24 03:06:16 +00:00
- Rewrite sync.md plugin using Solid.js for better performance - Implement sophisticated bidirectional sync algorithm with conflict detection - Add support for three sync modes: bidirectional, file-to-project, project-to-file - Create comprehensive sync logic with checksum-based change tracking - Add test script to validate sync functionality - Maintain task hierarchy and handle deletions gracefully
1.7 KiB
1.7 KiB
Sync.md Plugin (Solid.js Version)
A SuperProductivity plugin that syncs markdown files with project tasks, now built with Solid.js for better performance and maintainability.
Features
- Bidirectional Sync: Sync changes from markdown to project and vice versa
- One-way Sync Options: Choose to sync only from file to project or project to file
- Conflict Detection: Detects when both file and project have changed
- Real-time Monitoring: Watches markdown files for changes
- Modern UI: Built with Solid.js for a responsive, reactive interface
Sync Logic
The plugin uses a sophisticated bidirectional sync algorithm that:
- Tracks Changes: Maintains checksums of tasks and file content to detect changes
- Detects Conflicts: Identifies when both sides have modified the same task
- Preserves Hierarchy: Maintains task/subtask relationships during sync
- Handles Deletions: Marks tasks for deletion rather than removing them
Development
# Install dependencies
npm install
# Development server
npm run dev
# Build for production
npm run build
# Package as plugin
npm run package
Testing Sync Logic
# Run sync logic tests
npx tsx test-sync-logic.ts
Architecture
src/App.tsx- Main Solid.js application componentsrc/syncLogic.ts- Core bidirectional sync algorithmplugin.js- Plugin entry point that integrates with SuperProductivityindex.html- HTML template for the plugin UI
Sync Directions
- Bidirectional: Changes sync both ways with conflict detection
- File → Project: Markdown file is the source of truth
- Project → File: SuperProductivity project is the source of truth