Tree:
5d12c76693
ai-context
app_id_fix
build-ios
cross-platform-factory
cross-platform-factory-redux
d9085ced6df7dc7bdcd899959cea6489cab7f8b8
db-backup-cross-platform
deep-fix
deep_linking
design-tweaks-2023-12
elec-tweak
electron_fix_20250317
experimental_plugin
eye-slash
feat/image-feed-view-improvements
fix-service-worker
friend-tech-inspired-pwa-dialog
gifting-ui-2025-05
home-icon-enhancements
home-view-notification-improvements
homeview-cleanup-2025-03
homeview-refresh-2025-02
invite-client-side
main
master
new-storage
nostr
notification-request-permission-dialog
notify-time
offer-edit
passkey
passkey-cache
photo-reverse
plan-loc
playwright-pwa-install-test
profile-pic
project-gives
qrcode-capacitor
qrcode-reboot
registration-gate
remove-old-alerts
search-map-fix
side_step
simple-signer
split_build_process
sql-absurd-sql
sql-absurd-sql-back
sql-absurd-sql-further
sql-absurd-sql-further2
sql-wa-sqlite
starred-projects
sw-cleanup
tmp
trent-tweaks
tweaks
ui-fixes-2024-03
ui-fixes-2025-03
v-onboarding-2024-04
vite-version
why-migrate-fail
0.1.8
0.2.1
0.2.11
0.2.17
0.2.2
0.2.4
0.3.35
0.3.50
0.3.51
0.3.52
0.3.53
0.3.54
0.3.55
0.3.56
0.3.57
0.4.1
0.4.2
0.4.3
0.4.4
${ noResults }
17 Commits (5d12c76693b4b5ab577381e27cc64cb1fbeba14b)
Author | SHA1 | Message | Date |
---|---|---|---|
|
5d12c76693 |
fix(sqlite): enable database encryption in Electron app
The app is failing to initialize encryption because: - Database is created with 'no-encryption' mode - Capacitor SQLite plugin's encryption methods are available but unused - Secret table exists but encryption isn't properly initialized This commit will: - Enable encryption in database connection options - Initialize encryption secret before database open - Use Capacitor SQLite plugin's encryption methods - Ensure secret table is properly initialized This fixes the "No initial encryption supported" error that occurs when trying to save new identities or access encrypted data. Technical details: - Changes connection options to use 'secret' encryption mode - Adds setEncryptionSecret call before database open - Maintains existing secret table structure - Uses Capacitor SQLite plugin's native encryption support |
4 days ago |
|
409de21fc4 |
fix(db): resolve SQLite channel and initialization issues
- Add sqlite-status to valid IPC channels - Fix SQLite ready signal handling - Improve database status tracking - Add proper error handling for status updates - Keep database connection open during initialization Technical Details: - Added sqlite-status to VALID_CHANNELS.invoke list - Implemented sqlite-status handler with proper verification - Added database open state verification - Improved error handling and logging - Fixed premature database closing Testing Notes: - Verify SQLite ready signal is received correctly - Confirm database stays open after initialization - Check status updates are processed properly - Verify error handling for invalid states Security: - Validates all IPC channels - Verifies database state before operations - Maintains proper connection lifecycle - Implements proper error boundaries Author: Matthew Raymer |
4 days ago |
|
b6ee30892f |
feat(sqlite): enhance SQLite initialization and IPC handlers
This commit significantly improves SQLite database management and IPC communication in the TimeSafari Electron app. Key changes include: - Add new IPC handlers for database lifecycle management: - sqlite-open: Open database connections - sqlite-close: Close database connections - sqlite-is-db-open: Check database connection status - get-path: Retrieve database path - get-base-path: Get base directory path - Enhance SQLite initialization with: - Improved error handling and recovery mechanisms - Detailed logging for all database operations - State verification and tracking - Proper cleanup of IPC handlers - Transaction state management - Security improvements: - Validate all IPC channels - Implement proper file permissions (0o755) - Add connection state verification - Secure error handling and logging - Performance optimizations: - Implement WAL journal mode - Configure optimal PRAGMA settings - Add connection pooling support - Implement retry logic with exponential backoff Technical details: - Add SQLiteError class for detailed error tracking - Implement handler registration tracking - Add comprehensive logging with operation tagging - Update preload script with new valid channels - Add type definitions for all SQLite operations Testing: - All handlers include proper error handling - State verification before operations - Recovery mechanisms for failed operations - Logging for debugging and monitoring Author: Matthew Raymer |
4 days ago |
|
e1f9a6fa08 |
refactor(sqlite): disable verbose logging in migration system
- Comment out all info and debug logs in sqlite-migrations.ts - Maintain logging structure for future debugging - Reduce console output during normal operation - Keep error handling and logging infrastructure intact This change reduces noise in the console while maintaining the ability to re-enable detailed logging for debugging purposes. |
5 days ago |
|
340e718199 |
feat(logging): enhance SQLite logging and IPC handler management
- Add Winston-based structured logging system with: - Separate console and file output formats - Custom SQLite and migration loggers - Configurable log levels and verbosity - Log rotation and file management - Type-safe logger extensions - Improve IPC handler management: - Add handler registration tracking - Implement proper cleanup before re-registration - Fix handler registration conflicts - Add better error handling for IPC operations - Add migration logging controls: - Configurable via DEBUG_MIGRATIONS env var - Reduced console noise while maintaining file logs - Structured migration status reporting Security: - Add proper log file permissions (0o755) - Implement log rotation to prevent disk space issues - Add type safety for all logging operations - Prevent handler registration conflicts Dependencies: - Add winston for enhanced logging - Remove deprecated @types/winston This change improves debugging capabilities while reducing console noise and fixing IPC handler registration issues that could cause database operation failures. |
5 days ago |
|
ec74fff892 |
refactor: enhance SQLite error handling and type safety
Current State: - SQLite initialization completes successfully - API exposure and IPC bridge working correctly - Type definitions and interfaces properly implemented - Enhanced error handling with specific error codes - Comprehensive logging system in place Critical Issue Identified: SQLite initialization timeout causing cascading failures: - Components attempting database operations before initialization complete - Error logging failing due to database unavailability - Multiple components affected (HomeView, AccountView, ImageMethodDialog) - User experience impacted with cache clear prompts Changes Made: - Added proper TypeScript interfaces for SQLite operations - Enhanced SQLiteError class with error codes and context - Implemented input validation utilities - Added detailed logging with timestamps - Improved error categorization and handling - Added result structure validation Type Definitions Added: - SQLiteConnectionOptions - SQLiteQueryOptions - SQLiteExecuteOptions - SQLiteResult - SQLiteEchoResult Error Codes Implemented: - SQLITE_BUSY - SQLITE_NO_TABLE - SQLITE_SYNTAX_ERROR - SQLITE_PLUGIN_UNAVAILABLE - SQLITE_INVALID_OPTIONS - SQLITE_MIGRATION_FAILED - SQLITE_INVALID_RESULT - SQLITE_ECHO_MISMATCH Next Steps: 1. Implement initialization synchronization 2. Add component loading states 3. Improve error recovery mechanisms 4. Add proper error boundaries 5. Implement fallback UI states Affected Files: - electron/src/rt/sqlite-init.ts - src/types/electron.d.ts Note: This is a transitional commit. While the structure and type safety are improved, the initialization timeout issue needs to be addressed in the next commit to prevent cascading failures. Testing Required: - SQLite initialization timing - Component loading sequences - Error recovery scenarios - Database operation retries |
6 days ago |
|
91a1c05473 |
fix(electron): consolidate SQLite initialization and IPC handling
- Consolidate preload script with secure IPC bridge and channel validation - Ensure single initialization path in main process - Add robust error handling and user feedback - Fix race conditions in window creation and SQLite ready signal Current state: - SQLite initializes successfully in main process - IPC bridge is established and events are transmitted - Window creation and loading sequence is correct - Renderer receives ready signal and mounts app - Database operations still fail in renderer due to connection issues Known issues: - SQLite proxy not properly initialized in renderer - Database connection not established in renderer - Error logging attempts to use database before ready - Connection state management needs improvement This commit represents a stable point where IPC communication is working but database operations need to be fixed. |
6 days ago |
|
1e63ddcb6e |
feat(sqlite): enhance migration system and database initialization
- Add robust logging and error tracking to migration system - Implement idempotent migrations with transaction safety - Add detailed progress tracking and state verification - Improve error handling with recoverable/non-recoverable states - Add migration version validation and sequential checks - Implement proper rollback handling with error recording - Add table state verification and debugging - Fix migration SQL parsing and parameter handling - Add connection pool management and retry logic - Add proper transaction isolation and state tracking The migration system now provides: - Atomic transactions per migration - Automatic rollback on failure - Detailed error logging and context - State verification before/after operations - Proper connection management - Idempotent operations for safety This commit improves database reliability and makes debugging easier while maintaining proper process isolation. The changes are focused on the migration system and do not require restructuring the existing ElectronPlatformService architecture. Technical details: - Added MigrationError interface for better error tracking - Added logMigrationProgress helper for consistent logging - Added debugTableState for verification - Added executeWithRetry for connection resilience - Added validateMigrationVersions for safety - Enhanced SQL parsing with better error handling - Added proper transaction state management - Added connection pool with retry logic - Added detailed logging throughout migration process Note: This commit addresses the database initialization issues while maintaining the current architecture. Further improvements to the ElectronPlatformService initialization will be handled in a separate commit to maintain clear separation of concerns. |
6 days ago |
|
a6edcd6269 |
feat(db): add secure secret generation and initial data setup
Add proper secret generation using Node's crypto module and initial data setup for the electron environment. This commit: - Implements secure random secret generation using crypto.randomBytes() - Adds initial data migrations (002) with: - Secret table with cryptographically secure random key - Settings table with default API server - Contacts, logs, and temp tables - Improves SQL parameter handling for migrations - Adds proper transaction safety and rollback support - Includes comprehensive logging and error handling Security: - Uses Node's crypto module for secure random generation - Implements proper base64 encoding for secrets - Maintains transaction safety for all operations Testing: - Verified database structure via sqlite3 CLI - Confirmed successful migration execution - Validated initial data insertion - Checked index creation and constraints Note: This is a temporary solution for secret storage until a more secure storage mechanism is implemented. |
7 days ago |
|
b7b6be5831 |
fix(sqlite): resolve duplicate table creation in migrations
Split initial schema into two sequential migrations to prevent duplicate table creation and improve migration clarity. Changes: - Separate initial schema into two distinct migrations: * 001_initial_accounts (v1): Create accounts table & index * 002_secret_and_settings (v2): Create remaining tables (secret, settings, contacts, logs, temp) - Add version conflict detection to prevent duplicate migration versions - Ensure migrations are sequential (no gaps) - Update rollback scripts to only drop relevant tables Technical Details: - Add validateMigrationVersions() to check for: * Duplicate version numbers * Sequential version ordering * Gaps in version numbers - Validate migrations both at definition time and runtime - Update schema_version tracking to reflect new versioning Testing: - Verified no duplicate table creation - Confirmed migrations run in correct order - Validated rollback procedures - Checked version conflict detection |
7 days ago |
|
cbaca0304d |
feat(sqlite): implement initial database migrations
Add robust SQLite migration system with initial schema for TimeSafari desktop app. Includes comprehensive error handling, transaction safety, and detailed logging. Key Changes: - Add migration system with version tracking and rollback support - Implement initial schema with accounts, secret, settings, contacts tables - Configure SQLite PRAGMAs for optimal performance and reliability - Add detailed logging and state verification - Set up WAL journal mode and connection pooling Technical Details: - Use @capacitor-community/sqlite for native SQLite integration - Implement atomic transactions per migration - Add SQL validation and parsing utilities - Configure PRAGMAs: * foreign_keys = ON * journal_mode = WAL * synchronous = NORMAL * temp_store = MEMORY * page_size = 4096 * cache_size = 2000 * busy_timeout = 15000 * wal_autocheckpoint = 1000 Note: Current version has duplicate migration v1 entries that need to be addressed in a follow-up commit to ensure proper versioning. Testing: - Verified migrations run successfully - Confirmed table creation and index setup - Validated transaction safety and rollback - Checked logging and error handling |
7 days ago |
|
28c114a2c7 |
fix(sqlite): resolve migration issues and enhance documentation
This commit addresses critical SQLite migration issues and significantly improves code documentation and error handling. The changes include both functional fixes and comprehensive documentation updates. Key Changes: - Fix migration name binding issue by switching to direct SQL statements - Add proper SQL value escaping to prevent injection - Implement comprehensive error handling and recovery - Add detailed logging throughout migration process - Enhance transaction safety and state verification Documentation Updates: - Add comprehensive module-level documentation - Document all major functions with JSDoc - Add security and performance considerations - Include detailed process flows - Document error handling strategies Technical Details: - Switch from parameterized queries to direct SQL for schema_version updates - Add proper string escaping for SQL values - Implement state verification before/after operations - Add detailed debug logging for migration process - Enhance error recovery with proper state tracking Security: - Add SQL injection prevention - Implement proper value escaping - Add transaction isolation - Enhance state verification - Add error sanitization Performance: - Optimize transaction handling - Implement efficient SQL parsing - Add connection pooling - Reduce locking contention - Optimize statement reuse Testing: - Verified migration process with fresh database - Tested error recovery scenarios - Validated transaction safety - Confirmed proper state tracking - Verified logging completeness Breaking Changes: None Migration Required: Yes (database will be recreated) Author: Matthew Raymer |
1 week ago |
|
786f07e067 |
feat(electron): Implement SQLite database initialization with proper logging
- Add comprehensive logging for database operations - Implement proper database path handling and permissions - Set up WAL journal mode and PRAGMA configurations - Create initial database schema with tables and triggers - Add retry logic for database operations - Implement proper error handling and state management Current state: - Database initialization works in main process - Connection creation succeeds with proper permissions - Schema creation and table setup complete - Logging system fully implemented - Known issue: Property name mismatch between main process and renderer causing read-only mode conflicts (to be fixed in next commit) Technical details: - Uses WAL journal mode for better concurrency - Implements proper file permissions checking - Sets up foreign key constraints - Creates tables: users, time_entries, time_goals, time_goal_entries - Adds automatic timestamp triggers - Implements proper connection lifecycle management Security: - Proper file permissions (755 for directory) - No hardcoded credentials - Proper error handling and logging - Safe file path handling Author: Matthew Raymer |
1 week ago |
|
710cc1683c |
fix(sqlite): Standardize connection options and improve error handling
Changes to sqlite-init.ts: - Standardized connection options format between main and renderer processes - Added explicit mode: 'rwc' to force read-write-create mode - Added connection registration verification - Added detailed logging of actual file paths - Added journal mode verification to detect read-only state - Removed redundant PRAGMA settings (now handled in main process) - Added more detailed error reporting for connection failures Security: - Ensures consistent read-write permissions across processes - Verifies database is not opened in read-only mode - Maintains proper file permissions (644) and directory permissions (755) Testing: - Verified connection creation in both main and renderer processes - Confirmed journal mode is set correctly - Validated connection registration - Tested error handling for invalid states Author: Matthew Raymer |
1 week ago |
|
ebef5d6c8d |
feat(sqlite): Initialize database with complete schema and PRAGMAs
Initial database setup with: - Created database at /home/matthew/Databases/TimeSafari/timesafariSQLite.db - Set optimized PRAGMAs for performance and safety: * WAL journal mode for better concurrency * Foreign key constraints enabled * Normal synchronous mode * Memory temp store * 4KB page size * 2000 page cache (8MB) - Created core tables: * schema_version (for migration tracking) * users (for user management) * time_entries (for time tracking) * time_goals (for goal setting) * time_goal_entries (for goal tracking) - Added automatic timestamp triggers for: * users.updated_at * time_entries.updated_at * time_goals.updated_at - Fixed connection handling to work with plugin's undefined return pattern - Added rich logging throughout initialization process Security: - Database created with proper permissions (644) - Directory permissions set to 755 - No encryption (as per requirements) - Foreign key constraints enabled for data integrity Testing: - Verified table creation - Confirmed schema version tracking - Validated connection registration - Tested WAL mode activation Author: Matthew Raymer |
1 week ago |
|
57191df416 |
feat(sqlite): Database file creation working, connection pending
- Successfully creates database file using plugin's open() method - Directory permissions and path handling verified working - Plugin initialization and echo test passing - Database file created at /home/matthew/Databases/TimeSafari/timesafariSQLite.db Key findings: - createConnection() returns undefined but doesn't error - open() silently creates the database file - Connection retrieval still needs work (getDatabaseConnectionOrThrowError fails) - Plugin structure confirmed: both class and default export available Next steps: - Refine connection handling after database creation - Add connection state verification - Consider adding retry logic for connection retrieval Technical details: - Using CapacitorSQLite from @capacitor-community/sqlite/electron - Database path: /home/matthew/Databases/TimeSafari/timesafariSQLite.db - Directory permissions: 755 (rwxr-xr-x) - Plugin version: 6.x (Capacitor 6+ compatible) |
1 week ago |
|
900c2521c7 |
WIP: Improve SQLite initialization and error handling
- Implement XDG Base Directory Specification for data storage - Use $XDG_DATA_HOME (defaults to ~/.local/share) for data files - Add proper directory permissions (700) for security - Fallback to ~/.timesafari if XDG paths fail - Add graceful degradation for SQLite failures - Allow app to boot even if SQLite initialization fails - Track and expose initialization errors via IPC - Add availability checks to all SQLite operations - Improve error reporting and logging - Security improvements - Set secure permissions (700) on data directories - Verify directory permissions on existing paths - Add proper error handling for permission issues TODO: - Fix database creation - Add retry logic for initialization - Add reinitialization capability - Add more detailed error reporting - Consider fallback storage options |
1 week ago |