State layer hardening#21
Merged
Merged
Conversation
Preview Deployment Ready!
Deployment Details
Updates automatically on each push. View workflow run |
piggydoughnut
approved these changes
Jun 15, 2026
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.
The app's state could jump backwards for a moment: a check in flipping back to "not checked in", a registration reverting, a session you just made flickering in the list. It was a timing thing, a stale read landing after a fresher update and overwriting it.
This PR makes confirmed state only ever move forward, so a late or out of order read can't undo something newer. Your own transactions (register, check in, create or cancel a session) now show up in the UI right away through a pending layer that rolls back if they fail and clears once the chain confirms, without ever touching confirmed state. State is also saved on every change and repainted on a cold start, so a slow connection no longer leaves you on a blank screen, and things like bookmarks and hidden sessions move to storage that survives a mobile WebView eviction.