Offline UX Patterns
github.com
github.com
Assuming the happy path just leads to the app breaking in weird ways down the road.
All your examples are retryable errors in which the prescription is the same: "keep the message queued until it's successful." And when all your failure modes are like this optimistic-no-feedback works. If you have non-retryable errors in your failure modes "Bad Request", "Gone" this pattern can't be used.
You use whatever mechanism is available in your language/framework to catch exceptions or errors, and you handle it. The program should do its best to recover, fail gracefully, and emit a useful message or log.
This is one of the core tenets of programming. Again, since the dawn of time.
I find that in most cases, a local-first application would have a more predictable UX, because most actions need to be successful without a remote server to begin with.
Still, building the UX with an "offline-first" mindset is a giant leap forward when compared to all the networked applications I interact with.
Distributed systems are just hard I guess, especially involving user systems.
As a big fan of SQLite myself, I have to admit, this significantly raised their street cred in my eyes.
It's an odd name. Nice of you to share on Github.