In Nostr applications, relays serve as distributed databases - similar to git, where each repository holds a database. Git has a standard mechanism for bringing those databases into sync, which is helpful for offline work as well as redundancy.
I feel that with Nostr, we are in the area of centralized VCS like Subversion, where every check-in and update requires a connection. You may do some changes locally, but to properly integrate them you connect to the remote.
Negentropy
Forays into alternatives are being made: https://github.com/hoytech/strfry and its negentropy protocol, which can merge the data of relays automatically. This allows you to essentially maintain a local copy of a relay. The library https://github.com/damus-io/nostrdb might make this accessible from clients. But the issue with this so far is interoperability: Only few relays maintained by few people support it, making it unsuitable to rely on for a client.
Furthermore, Mostr is supposed to connect to multiple relays at once - so do you keep a mirror of each relay separately? Might it be possible to have a single local proxy relay that handles syncing with each relay? Or do I just cache events in a proprietary format?
The Path
For now, Mostr can be used offline if it has internet when started to fetch the initial state. Missing here is the ability to persist unsubmitted changes to prevent data loss upon communication failure or crash. This will be tackled next.
Fully offline, until a reliable method of caching relay data is found, only new tasks can be tracked, which can still be useful though for keeping time-tracking on track.
As I write this, a thought comes to mind: There is no need to cache everything, but only what matters most - user metadata, tasks and state updates and maybe notes. Meanwhile closed and done tasks as well as time-tracking could be omitted to reduce local footprint significantly.
Negentropy shall definitely be considered, also to reduce startup times which are already growing to multiple seconds with few months of data from a single user, but since I am for now using the rnostr relay without negentropy support, the main thing needed is the aforementioned cache for tasks so you can still at least view them offline and ideally also a storage model for unsubmitted events. Tasks could even be mirrored to a file hierarchy as I originally envisioned, but creation and modification in there would be tricky.