Skip to content

feat(offline): add explicit offline queue and reconciliation flow (#184) - #207

Merged
truthixify merged 2 commits into
wraith-protocol:developfrom
Adeyemiadigun:wave-9-offline-queue-reconciliation
Sep 30, 2026
Merged

truthixify merged 2 commits into
wraith-protocol:developfrom
Adeyemiadigun:wave-9-offline-queue-reconciliation

Conversation

@Adeyemiadigun

Copy link
Copy Markdown
Contributor

Closes #184

  • lib/offlineQueue: classify safe-to-queue (payment-intent, scan-session) vs signing-required (signed-submit) work with validated, bounded localStorage persistence
  • lib/offlineReconcile: reconnect engine; intents/scans revalidate to done/needs-review/conflict, signed envelopes never auto-broadcast (stale ones conflict), attempt budget, offline no-op
  • stores/offlineQueueStore: persisted store + explicit two-step broadcast as the only submit path for held envelopes
  • hooks/useOfflineReconcile: online, SW flush-message, and mount triggers
  • OfflineBanner: queued count offline, reconciling/review states online
  • OfflineQueuePanel on Send page for review/conflict resolution
  • StellarSend: offline sends become intents, offline scans persist; App: shared-text scans persist; SW: queue sync tag nudges clients
  • docs/guides/offline-queue.md documents the policy
  • tests: 30 unit + e2e/offline-queue.spec.ts (banner, offline send, reconnect conflicts, no auto-broadcast)
  • fix: reveal once themed (was hidden forever, blank page)

…aith-protocol#184)

- lib/offlineQueue: classify safe-to-queue (payment-intent,
  scan-session) vs signing-required (signed-submit) work with
  validated, bounded localStorage persistence
- lib/offlineReconcile: reconnect engine; intents/scans revalidate
  to done/needs-review/conflict, signed envelopes never auto-broadcast
  (stale ones conflict), attempt budget, offline no-op
- stores/offlineQueueStore: persisted store + explicit two-step
  broadcast as the only submit path for held envelopes
- hooks/useOfflineReconcile: online, SW flush-message, and mount triggers
- OfflineBanner: queued count offline, reconciling/review states online
- OfflineQueuePanel on Send page for review/conflict resolution
- StellarSend: offline sends become intents, offline scans persist;
  App: shared-text scans persist; SW: queue sync tag nudges clients
- docs/guides/offline-queue.md documents the policy
- tests: 30 unit + e2e/offline-queue.spec.ts (banner, offline send,
  reconnect conflicts, no auto-broadcast)
- fix: reveal <body> once themed (was hidden forever, blank page)
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Adeyemiadigun is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Adeyemiadigun Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

The focused unit tests pass, but the queue cap is unsafe when all 50 entries are still actionable. addEntry returns 51 items, then saveOfflineQueue silently drops the new item with slice(). Please handle a full active queue explicitly and add that boundary test.

@Adeyemiadigun

Copy link
Copy Markdown
Contributor Author

The focused unit tests pass, but the queue cap is unsafe when all 50 entries are still actionable. addEntry returns 51 items, then saveOfflineQueue silently drops the new item with slice(). Please handle a full active queue explicitly and add that boundary test.

I will work on it now

…work

addEntry returned 51 items on a full actionable queue and
saveOfflineQueue silently dropped the new tail entry. Now addEntry
returns { entries, accepted, evicted }: full-actionable queues reject
with input untouched, terminal entries are evicted to fit, and the save
path persists exactly what it is given. enforceQueueCap applies the same
rule to oversized loaded state. Store enqueue returns null on rejection
(surfaced as a queue-full error in Send and a panel notice). Adds
boundary tests: full-actionable reject, single-terminal evict, corrupt
oversize, save passthrough, and store-level 50+1.
@Adeyemiadigun

Copy link
Copy Markdown
Contributor Author

The focused unit tests pass, but the queue cap is unsafe when all 50 entries are still actionable. addEntry returns 51 items, then saveOfflineQueue silently drops the new item with slice(). Please handle a full active queue explicitly and add that boundary test.

I have worked on this, check it out now.

@truthixify
truthixify merged commit 6387f04 into wraith-protocol:develop Sep 30, 2026
1 of 2 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. Thanks @Adeyemiadigun. The queue now rejects full actionable state clearly without silently dropping work.

@Adeyemiadigun

Copy link
Copy Markdown
Contributor Author

Merged. Thanks @Adeyemiadigun. The queue now rejects full actionable state clearly without silently dropping work.

Thanks again for the review and guidance on getting those tests sorted out!

Looking ahead to the next wave next month, I'd love to take on more issues. Please feel free to assign any upcoming tasks directly to me.

For faster communication, you can also reach me via:

Discord: @ghostmanny12

Email: adeyemiadigun12@gmail.com

WhatsApp: +2347088201223

Ready to dive in whenever the next wave opens!

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.

[Wave 9] Add an explicit offline queue and reconciliation flow

2 participants