Question for Miniapps admins: storage consistency and safe multi-client writes
Hello Miniapps team!
We're building Kairos, a conversational Miniapp where preserving long conversation histories is essential.
Before activating a new storage system, we're investigating the guarantees of "miniappsAI.storage" when the same user has the app open in multiple browsers, tabs, or the Android app.
Could the team clarify or provide official documentation covering:
- Concurrency: Are "setItem()" operations atomic per key? What happens when two clients write to the same key? Is a consistent ordering guaranteed?
- Conflict prevention: Is there any CAS (compare-and-swap), conditional write, transaction, revision/ETag, server-side lock, lease, or fencing mechanism?
- Visibility: What are the guarantees for read-after-write consistency, cross-client synchronization, caching, and data propagation delays?
- Offline behavior: Can delayed or queued writes after reconnect overwrite newer values?
- Client scope: Do Chrome, Development Tools Browser, and the Miniapps Android application share the same storage for the same logged-in user? How do anonymous sessions and development/production environments differ?
- Storage API: Are change notifications, key enumeration, or server-side write timestamps available? What happens when "removeItem()" races with a write?
- Limits and testing: Are value-size, key-length, and key-count limits consistent across clients? Is there a recommended isolated testing method and cleanup procedure?
We have seen an apparent delay between updates in Chrome and their visibility in DTB, but have not yet determined whether this was caused by storage synchronization, caching, or something else.
Our concern is silent lost updates: two clients can both believe they successfully saved a conversation, while one overwrites the other's changes.
An official explanation of the storage consistency model, or a recommended safe architecture, would be greatly appreciated.
This question concerns any supported browser or app client, not just Chrome and DTB. Those were simply the two clients involved in my particular observation.
Thank you!