Skip to content

Add offline transaction create outbox with background flush - #14

Merged
gjong merged 3 commits into
mainfrom
cursor/offline-transaction-outbox-25b7
Jul 27, 2026
Merged

Add offline transaction create outbox with background flush#14
gjong merged 3 commits into
mainfrom
cursor/offline-transaction-outbox-25b7

Conversation

@gjong

@gjong gjong commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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.md

Changes

  • Room v7 transaction_outbox + migration
  • createTransactionOrEnqueue → Synced | Queued (offline / IOException)
  • Flush via SyncWorkRunner + reconnect one-shot worker under sync generation
  • Enqueue holds SessionDataBarrier and requires an active sync generation
  • Flush rethrows CancellationException (does not mark FAILED)
  • Form success UX when queued; Transactions list pending section + discard
  • Logout/LocalDataCleaner clears outbox
  • Strings en/nl/de; ADR-005 / README / usability notes
  • Unit tests (enqueue, flush, cancel, session refuse, form/list, migration)

Non-goals (follow-ups)

Offline edit/delete, scan-without-API, server idempotency keys

Test plan

  • Unit tests
  • Lint + assembleDebug
  • Confirm CI (build + instrumented) — green on run 30269725994
  • Design → senior build → QA (cancel + session-guarded enqueue approved)
Open in Web Open in Cursor 

cursoragent and others added 3 commits July 27, 2026 12:56
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
gjong marked this pull request as ready for review July 27, 2026 13:49
@gjong
gjong merged commit f57c8bc into main Jul 27, 2026
2 checks passed
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