Commit graph

223 commits

Author SHA1 Message Date
Johannes Millan
78421e6196 fix(sync-md): fix failing tests after parser changes
- Update duplicate ID handling to set ID to null instead of skipping task
- Fix tests expecting different indent detection behavior
- Update tests to match actual parser behavior with most common indent detection
2025-07-10 19:17:41 +02:00
Johannes Millan
bbc4fa7ac6 fix(sync-md): remove extra blank lines between tasks in markdown output
- Remove blank line insertion after each parent task group
- Add support for orphaned subtasks (subtasks whose parent is not in the current task list)
- Add comprehensive tests for markdown formatting without extra blank lines
2025-07-10 18:46:01 +02:00
Johannes Millan
a0c91efc59 fix(sync-md): prevent state inconsistency with comprehensive relationship cleanup
- 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.
2025-07-10 16:46:21 +02:00
Johannes Millan
5a873420eb fix(sync-md): fix task duplication by improving indent detection
- 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
2025-07-10 16:41:35 +02:00
Johannes Millan
d536dc5291 test(sync-md): update debounce tests for async initialization
Increased test timeouts and improved setup to handle async initialization.
The focus trigger fix has been implemented and is working correctly in practice.
2025-07-10 16:36:22 +02:00
Johannes Millan
33102f6a3e fix(sync-md): fix window focus immediate sync trigger
Store pendingMdToSpSync config in local variable before calling handleMdToSpSync
to prevent race conditions when window gains focus during debounce period.
2025-07-10 16:27:35 +02:00
Johannes Millan
d0e45524bf fix(syncMd): separate debounce timers for MD to SP and SP to MD sync
- 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.
2025-07-10 15:43:35 +02:00
Johannes Millan
c9a1ec2136 feat(syncMd): implement 10-second debounce for MD to SP sync with focus-aware triggering
- Add SYNC_DEBOUNCE_MS_MD_TO_SP constant (10 seconds)
- Always use 10-second debounce for markdown file changes
- Track pending MD to SP syncs
- Immediately trigger sync when window gains focus if pending
- Extract handleMdToSpSync for reusability

This prevents sync conflicts when editing markdown files outside SP
2025-07-10 15:24:40 +02:00
Johannes Millan
564e0f023b feat(syncMd): update build configuration and archive old implementation
- 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
2025-07-10 14:57:08 +02:00
Johannes Millan
e4f83e3de8 feat(syncMd): add comprehensive test suite and development configuration
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
2025-07-10 14:56:19 +02:00
Johannes Millan
30a962c2a9 feat(syncMd): implement core markdown sync plugin with bidirectional synchronization
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
2025-07-10 14:55:44 +02:00
Johannes Millan
88814795c7 feat(sync-md): new approach and make it work better 2025-07-07 18:39:14 +02:00
Johannes Millan
2548ad1b7a test: fix 2025-07-03 17:53:14 +02:00
Johannes Millan
cfe0951c9f cleanup plugin code 2025-07-03 14:10:26 +02:00
Johannes Millan
5a399300e5 refactor: simplify css variables 2025-07-03 11:53:09 +02:00
Johannes Millan
7333f6118a 14.0.0-rc.1 2025-06-29 15:42:10 +02:00
Johannes Millan
caa64775e5 fix(plugin): better handle bundled plugins 2025-06-29 15:32:51 +02:00
Johannes Millan
247561682f fix(plugin): procrastination buster plugin again 2025-06-29 13:30:03 +02:00
Johannes Millan
e0237b3dad feat: add inline-assets mechanism to plugin-boilerplate
- 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
2025-06-29 12:06:06 +02:00
Johannes Millan
11911b2ba2 fix: procrastination-buster plugin build process with asset inlining
- 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
2025-06-29 11:49:37 +02:00
Johannes Millan
0145f28d50 feat: cleanup plugins 2025-06-29 06:19:39 +02:00
dependabot[bot]
48f9883860
build(deps): bump the npm_and_yarn group across 1 directory with 2 updates
Bumps the npm_and_yarn group with 2 updates in the /packages/plugin-dev/procrastination-buster directory: [esbuild](https://github.com/evanw/esbuild) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `esbuild` from 0.21.5 to 0.25.5
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.5)

Updates `vite` from 5.4.19 to 6.3.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 6.3.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-27 20:51:29 +00:00
Johannes Millan
d4d81bf511 feat(plugin-api): create foundational plugin API package
- 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
2025-06-27 18:13:19 +02:00