Repository navigation
Conversation
added 2 commits
October 30, 2026 07:30
…ents The conversation send-later queue was held purely in React state (useMessageQueue) with no persistence and no cross-client sync: a restart or a second window/web client started from an empty queue. - Add a message_queue_item SQLite table (SeaORM entity + migration), keyed by owner_id (the conversation id) with a client-generated item_uid per item. The draft is stored as JSON since PromptDraft is a frontend-only type. - Add message_queue_service (list / full-replace save in one transaction) shared by both run modes, a Tauri command and an axum web handler (/message_queue_list, /message_queue_save). - Broadcast message-queue://changed (owner_id, origin, items) on every save via the existing EventEmitter, so every Tauri window and web client converges to the same queue. Each client ignores its own echo. - The hook persists + subscribes only when an ownerId is present; unbound draft tabs stay in-memory and behave exactly as before, so the existing no-owner unit tests keep passing. Closes the queue-lost-on-restart / not-shared-across-clients gap.
…ing type imports - drop unused ConnectionTrait / IntoActiveModel imports: clippy -D warnings failed all 9 Rust jobs on them - sync ownerIdRef / editingItemIdRef in effects instead of during render: the react-hooks lint bans ref writes in render - import PersistedQueueItem / MessageQueueSaveItem in api.ts: the build's type-check (TS2304) was never reached in CI because lint failed first - run prettier over the hook (import wrapping, indentation)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The conversation "send later" queue (the message-queue panel backed by `useMessageQueue`) was held purely in React state. It was never persisted and never shared across clients, so:
This PR makes the queue persisted (SQLite) and multi-client synced (the existing `EventEmitter` broadcast), while keeping the in-memory behavior for unbound draft tabs.
What changed
Verification
Test plan