feat(offline): add explicit offline queue and reconciliation flow (#184) - #207
Conversation
…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)
|
@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. |
|
@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! 🚀 |
|
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.
I have worked on this, check it out now. |
|
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! |
Closes #184