Skip to content

Refactor/foundation#1944

Draft
boyan01 wants to merge 6 commits intomainfrom
refactor/foundation
Draft

Refactor/foundation#1944
boyan01 wants to merge 6 commits intomainfrom
refactor/foundation

Conversation

@boyan01
Copy link
Copy Markdown
Collaborator

@boyan01 boyan01 commented Mar 23, 2026

No description provided.

YeungKC added 6 commits March 5, 2026 23:49
- Introduced a new protocol for worker commands and events in `protocol.dart`.
- Replaced legacy event handling with a structured command/event system in `account_server.dart`, `decrypt_message.dart`, and `message_worker_isolate.dart`.
- Implemented `IsolateRouter` to manage communication between main and worker isolates.
- Added `IsolateRpcClient` for handling RPC requests and responses between isolates.
- Created `WorkerSupervisor` to manage worker lifecycle, including restart logic and heartbeat monitoring.
- Updated all relevant files to utilize the new command/event structure, improving maintainability and clarity.
- Removed deprecated imports and unused code related to the old isolate communication method.
…perations

- Introduced various payload classes for handling database write operations, including conversation updates, job management, participant sessions, message status updates, and sticker management.
- Implemented a new worker isolate (`db_write_worker_isolate.dart`) to handle database write tasks asynchronously, improving performance and responsiveness.
- Enhanced the database interaction layer with methods for inserting, updating, and deleting records across multiple entities such as users, conversations, messages, and stickers.
- Replaced `message_worker_isolate.dart` with `sync_worker_isolate.dart` for improved message processing.
- Introduced `AppRuntimeSessionHost` to manage runtime sessions and handle database writes.
- Updated `HomePage` and `NetworkStatus` to utilize the new session management structure.
- Enhanced `DecryptMessage` and related jobs to work with the new sync worker architecture.
- Removed deprecated `message_worker_isolate.dart` and its associated code.
- Added `HydrationStorage` for persistent key-value storage with JSON support.
- Created `ConversationFilterNotifier` and `ConversationFilterState` for managing conversation filtering logic.
- Introduced tests for runtime hub architecture, RPC client, worker supervisor, and UI components to ensure proper functionality and adherence to design patterns.
- Enforced usage of UI context providers instead of direct context lookups in various UI components.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants