- Created complete test suite for PluginService with 28 tests
- Fixed type import issues for PluginNodeScriptRequest, PluginNodeScriptResult, PluginSidePanelBtnCfg
- Resolved window.ea type conflicts between test.ts and window-ea.d.ts
- Updated plugin-api package to avoid duplicate global declarations
- Fixed rxjs compatibility issues by using v6-compatible patterns
- Added proper HTTP request mocking for built-in plugin loading
- Fixed side panel and plugin management test setup
- Tests cover: initialization, side panel management, plugin loading/unloading, ZIP handling, error scenarios
Currently: 17 passing, 11 failing tests (significant progress from initial compilation errors)
- Add sidePanel flag to PluginManifest type
- Create PluginSidePanelBtnCfg interface for side panel buttons
- Implement plugin-side-panel-btns component for rendering buttons in main header
- Add plugin-panel-container component for rendering plugin iframes in right panel
- Update RightPanelComponent to support plugin panels
- Add activeSidePanelPlugin$ observable to PluginService
- Create reusable iframe utilities to avoid code duplication
- Update plugin API to support registerSidePanelButton method
- Skip menu entry registration for plugins with sidePanel flag
- Add test-side-panel-plugin to demonstrate functionality
When a plugin has 'sidePanel': true in its manifest, it will:
1. Not create a menu entry (unless explicitly registered)
2. Allow registration of side panel buttons via registerSidePanelButton
3. Load its iframe in the RightPanelComponent when activated
- Create window-ea.d.ts to properly type window.ea (ElectronAPI)
- Replace all 'as any' castings with proper types
- Update all any[] to unknown[] for better type safety
- Import proper types (PluginManifest) in electron files
- Update plugin-api types to use unknown instead of any
- Fix app.getPath type casting with proper parameter types
- Rebuild plugin-api dist files with updated types
- Implement secure Node.js script executor in Electron main process
- Add sandboxed execution environment with memory/timeout limits
- Create two-stage consent dialog for nodeExecution permission
- Add plugin registration/unregistration with main process
- Integrate executeNodeScript method into plugin API
- Add IPC handlers for plugin-to-main communication
- Ensure consent is checked when enabling plugins
- Add proper cleanup on plugin unload
Security features:
- Dangerous globals removed from execution context
- Plugin-specific working directories
- Configurable memory and timeout limits
- Persistent consent storage
- Only available in Electron environment
Moved all plugin-related type definitions from plugin-api.model.ts
to the @super-productivity/plugin-api package to eliminate duplication
and maintain a single source of truth for plugin types.
- Moved TaskCopy, ProjectCopy, TagCopy type aliases to plugin-api
- Moved PluginHeaderBtnCfg interface to plugin-api package
- Moved SnackCfgLimited type alias to plugin-api package
- Updated all imports to use types from the plugin-api package
- Simplified plugin-api.model.ts to just re-export from package
- PluginHooks is an enum that needs to be used as a value in runtime code
- Changed from type-only export to regular export to fix TypeScript errors
- Keeps Hooks as type-only export since it's just a type alias