Refactor LocalDataSource to reuse the shared database connection from database.ts, avoiding OPFS file handle conflicts. Add retry logic with exponential backoff for database open operations, particularly important for Web/OPFS environments. Also add dynamic theme support to chat input and message bubble styles, using theme colors instead of hardcoded values for better light/dark mode support.
BREAKING CHANGE: Database initialization now requires userId to be passed explicitly for user-specific databases
- Updated RegisterScreen to support a multi-step registration flow with components for email input, verification, and profile setup.
- Added new components: VerificationCodeInput, StepIndicator, and corresponding types for step management.
- Enhanced background service to check authentication status before executing tasks, improving app reliability.
- Updated TypeScript configuration to include module resolution and JSON module support.
This update significantly improves the user registration experience and ensures background tasks are only executed for authenticated users.