- Remove unused isDev variable
- Add proper type annotations for event handlers
- Add explicit Promise<void> return type for loadIndexHtml
- Use unknown type for error parameters instead of any
- Fix event handler parameters by prefixing unused params with underscore
- Improve error handling type safety throughout the file
This commit improves type safety and removes unused code while maintaining
existing functionality. All TypeScript linter violations have been addressed
without changing the core behavior of the application.
Database paths are still broken here.
Security Impact: None - changes are type-level only
Testing: No functional changes, existing tests should pass
- Make database initialization non-blocking to prevent app crashes
- Add proper window lifecycle management and error handling
- Implement retry logic for index.html loading
- Add detailed logging for debugging
- Fix type safety issues in error handling
- Add proper cleanup on window close
WIP: Database path resolution still needs fixing
- Current issue: Path conflict between ~/.local/share and ~/.config
- Database connection failing with invalid response
- Multiple connection attempts occurring
This commit improves app stability but database connectivity needs to be addressed in a follow-up commit.
- Add logic in main process to resolve and create the correct database directory and file path using Electron's app, path, and fs modules
- Pass absolute dbPath to CapacitorSQLite plugin for reliable database creation
- Add extensive logging for debugging database location, permissions, and initialization
- Remove redundant open() call after createConnection in Electron platform service
- Add IPC handlers for essential SQLite operations (echo, createConnection, execute, query, closeConnection, isAvailable)
- Improve error handling and logging throughout initialization and IPC
- Still investigating database file creation and permissions issues
- Assign CapacitorSQLite instance to the global sqlitePlugin variable so it is accessible in IPC handlers.
- Enhance error logging in the IPC handler to include JSON stringification and stack trace for better debugging.
- Reveal that the generic .handle() method is not available on the plugin, clarifying the next steps for correct IPC wiring.
- Added "type": "module" to package.json to support ES module imports for Electron SQLite
- Renamed postcss.config.js to postcss.config.cjs to maintain CommonJS syntax
- This ensures build tools can properly load the PostCSS configuration
- Ensures devToolsWebContents is not null before calling focus() after opening DevTools in detached mode.
- Prevents runtime and linter errors in Electron main process.
- Changed from direct plugin usage to SQLiteConnection pattern
- Matches how platform services use the SQLite plugin
- Removed handle() method dependency
- Added proper method routing in IPC handler
The app now launches without initialization errors. Next steps:
- Test actual SQLite operations (createConnection, query, etc.)
- Verify database creation and access
- Add error handling for database operations
- Remove worker thread approach in favor of direct plugin initialization
- Initialize CapacitorSQLiteElectron in main process
- Set up IPC handler to forward SQLite operations
- Remove unused worker files and build config
This reverts to a simpler, more reliable approach for SQLite in Electron,
using the plugin as intended in the main process.
- Enhance electron build configuration with proper asset handling
- Add comprehensive logging and error tracking
- Implement CSP headers for security
- Fix module exports for logger compatibility
- Update TypeScript and Vite configs for better build support
- Improve development workflow with better dev tools integration
- Add web build prerequisite step to electron build docs
- Update electron run command to use npx
- Fix electron asset loading with improved path handling
- Add request interception for proper asset resolution
- Remove service worker files from electron build
- Improve debug logging for electron builds
- Move detailed setup and build instructions from README.md to BUILDING.md
- Add concise reference to BUILDING.md in README.md
- Keep testing and other documentation in README.md
- Improve organization of documentation by separating build-specific content
- Properly disable service workers in electron builds
- Add CSP headers for electron security
- Fix path resolution in electron context
- Improve preload script error handling and IPC setup
- Update build scripts for better electron/capacitor compatibility
- Fix router path handling in electron context
- Remove electron-builder dependency
- Streamline build process and output structure
This change improves the stability and security of electron builds while
maintaining PWA functionality in web builds. Service workers are now
properly disabled in electron context, and path resolution issues are
fixed.
- Add dedicated electron build scripts for each platform
- Configure Vite rollup options for electron builds
- Update electron-builder configuration with proper app metadata
- Add clean script and rimraf dependency
- Set proper appId and build settings for production builds
- Enable asar packaging for better security