Commit graph

13945 commits

Author SHA1 Message Date
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
24fced4617 feat(plugins): update plugin infrastructure and cleanup 2025-07-10 15:06:48 +02:00
Johannes Millan
37244c7d2f chore: remove temporary sync-md design documentation
- Remove AI-generated design documents that were used during development
- These documents served their purpose for planning and are no longer needed
2025-07-10 14:58:11 +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
3d6f94ba0e feat(core): add subTaskIds support to batch update reducer
- Handle direct subTaskIds updates in task batch operations
- Add tests for subtask reordering functionality
- Enable efficient subtask order synchronization
2025-07-10 14:54:48 +02:00
Johannes Millan
74987a7303 feat(plugin-api): add subTaskIds support to BatchTaskUpdate interface
- Enable subtask reordering operations through batch updates
- Add optional subTaskIds property to update operations
2025-07-10 14:54:13 +02:00
Johannes Millan
b014d35a93 fix(plugins): replace any types with proper types and refactor message strings to enum
- Replace all `any` usage with proper TypeScript types
- Add BatchUpdateRequest import and type for batchUpdateForProject method
- Create PluginIframeMessageType enum for consistent message type handling
- Fix postMessage calls to use proper type signatures
- Update type assertions with proper casting through unknown
- Improve type safety across plugin bridge communication layer
2025-07-07 23:04:17 +02:00
Johannes Millan
843775aa87 refactor(plugins): implement bound method factory to eliminate mutable state
- Replace _currentPluginId mutable state with bound method factory pattern
- Create PluginBridgeService.createBoundMethods() that returns plugin-specific methods
- Each plugin gets its own bound methods with pluginId pre-applied
- Eliminates race conditions and awkward _setCurrentPlugin pattern
- Plugins can no longer impersonate each other (security improvement)
- Replace all 'any' types with proper TypeScript types
- All tests passing, no code duplication
2025-07-07 22:09:35 +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
76dc5c1eaf feat: add possibility to cancel tutorial 2025-07-04 14:16:50 +02:00
Johannes Millan
75450b93c7 Merge branch 'fix/issues'
* fix/issues:
  fix: add defensive programming fix for
2025-07-04 13:31:19 +02:00
Johannes Millan
9b30d56b0c fix: add defensive programming fix for
Closes #4698
2025-07-04 13:14:40 +02:00
Johannes Millan
24878e5528 feat(sync): improve sync conflict dialog 2025-07-04 13:14:16 +02:00
Johannes Millan
1b003780da refactor: simplify dialog 2025-07-04 10:51:39 +02:00
Johannes Millan
25074b140f test: fix failing 2025-07-04 10:39:26 +02:00
Johannes Millan
b63505e2aa test: enable all disabled tests (~45 tests)
- Enable 3 tests in sync-race-condition.spec.ts
- Enable 4 tests in sync-race-condition-diagnostic.spec.ts
- Enable 3 tests in sync-fixes.spec.ts
- Enable 5 tests in task-due.effects.spec.ts
- Enable 1 test in task-later-today.selectors.spec.ts
- Uncomment entire plugin.service.spec.ts file (28 tests)

Tests may still need fixes to pass but are no longer disabled
2025-07-03 20:37:57 +02:00
Johannes Millan
4caf7b4fa5 build: update CLAUDE.md 2025-07-03 20:16:53 +02:00
Johannes Millan
1e71f395af test: fix 2 2025-07-03 19:55:56 +02:00
Johannes Millan
2548ad1b7a test: fix 2025-07-03 17:53:14 +02:00
Johannes Millan
f4996e4a51 test: adjust setup 2025-07-03 17:37:16 +02:00
Johannes Millan
44f85a022a Merge branch 'feat/code-level-improvements'
* feat/code-level-improvements:
  fix: repeatable tasks not getting re-created #4687
  feat: improve repeat task handling
  fix: error alert background for dark theme

# Conflicts:
#	src/styles/components/global-error-alert.scss
2025-07-03 16:10:27 +02:00
Johannes Millan
5fec51fe83 fix(plugin): warning 2025-07-03 16:07:15 +02:00
Johannes Millan
4da07d1f7b fix: repeatable tasks not getting re-created #4687 2025-07-03 15:42:44 +02:00
Johannes Millan
df829fd4d1 feat: improve repeat task handling 2025-07-03 15:22:52 +02:00
Johannes Millan
cfe0951c9f cleanup plugin code 2025-07-03 14:10:26 +02:00
Johannes Millan
635f644867 fix: error alert background for dark theme 2025-07-03 14:09:34 +02:00
Johannes Millan
922196c541 docs: add vibe coding tipps 2025-07-03 14:01:07 +02:00
Johannes Millan
2a75f32b76 fix(plugin): plugin.js initialization not working as it should 2025-07-03 13:51:33 +02:00
Johannes Millan
a73c74ce1d fix(plugin): remove plugin from list when deleted 2025-07-03 13:44:12 +02:00
Johannes Millan
4b15ac1fc1 fix(plugin): uploaded plugins not working 2025-07-03 13:32:49 +02:00
Johannes Millan
0091cea5a1 fix(plugins): fix plugin upload issues with UI reactivity and uploaded:// protocol
- Update plugin states Map when uploading plugins to enable UI reactivity
- Handle uploaded:// protocol properly in plugin loader by routing to cache
- Add newly uploaded plugins to _pluginStates Map for immediate UI updates
- Fix issue where page refresh was required to see uploaded plugins

The root causes were:
1. Uploaded plugins were added to _loadedPlugins but not _pluginStates Map
2. The plugin loader tried to make HTTP requests for uploaded:// URLs

Now uploaded plugins appear immediately in the UI without page refresh.
2025-07-03 13:12:59 +02:00
Johannes Millan
c35687c872 feat: add log and update message 2025-07-03 13:00:16 +02:00
Johannes Millan
0a55fa2823 docs: update plugin development guide 2025-07-03 12:49:59 +02:00
Johannes Millan
63f9527080 cleanup old plugin data 2025-07-03 12:21:10 +02:00
Johannes Millan
0c4968724d cleanup docs 2025-07-03 12:07:26 +02:00
Johannes Millan
bba8e2faf1 refactor: simplify css variables 2 2025-07-03 11:58:25 +02:00
Johannes Millan
5a399300e5 refactor: simplify css variables 2025-07-03 11:53:09 +02:00
Johannes Millan
b56d4e21b1 fix: side panel content show behavior 2025-07-03 10:23:10 +02:00
Johannes Millan
3714dcba65 Merge branch 'fix/multiple'
* fix/multiple:
  feat: improve reliably for repeatable tasks 2
  feat: improve reliably for repeatable tasks
  fix: avoid mutation
  docs: add theme colors overview
  fix: date pipe error with indonesian
  build: fix docker build
  fix: only filter out later today tasks for today list
  fix: task detail panel not opening for tasks planned for later
2025-07-02 20:33:16 +02:00
Johannes Millan
32426267e0 feat: improve reliably for repeatable tasks 2 2025-07-02 20:33:02 +02:00
Johannes Millan
fdd6173cc3 test: fix tests 2 2025-07-02 20:18:07 +02:00
Johannes Millan
089c94e4a7 test: fix tests 2025-07-02 20:18:07 +02:00
Johannes Millan
8c6782e0c1 Revert "test: disable due tests for now"
This reverts commit 96d4a876af.
2025-07-02 20:18:07 +02:00
Johannes Millan
928b4d2779 feat: improve reliably for repeatable tasks 2025-07-02 20:17:00 +02:00
Johannes Millan
cd5fd1e698 fix: avoid mutation 2025-07-02 20:01:07 +02:00
Johannes Millan
a87656982f docs: add theme colors overview 2025-07-02 19:56:47 +02:00