- 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
- 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