Add offline transaction create outbox with background flush - #14
Merged
Conversation
Define Room outbox schema, create-or-enqueue flow, generation-safe flush, pending UI, and MVP non-goals for T3.3 / roadmap #34. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
Persist creates when offline or on IO failure, show pending rows on the transactions list, and flush under the authenticated sync generation when connectivity returns. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
Refuse enqueue without a sync generation under SessionDataBarrier so logout cannot leave cross-session rows, and rethrow CancellationException during flush so REPLACE work does not mark PENDING creates as FAILED. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
gjong
marked this pull request as ready for review
July 27, 2026 13:49
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
Implements roadmap offline transaction drafts/outbox (T3.3 / #34) as a create-only MVP: durable queue + generation-safe background flush.
Design:
docs/design/offline-transaction-outbox.mdChanges
transaction_outbox+ migrationcreateTransactionOrEnqueue→ Synced | Queued (offline / IOException)SyncWorkRunner+ reconnect one-shot worker under sync generationSessionDataBarrierand requires an active sync generationCancellationException(does not mark FAILED)LocalDataCleanerclears outboxNon-goals (follow-ups)
Offline edit/delete, scan-without-API, server idempotency keys
Test plan