Open
Conversation
Add the ability to (optionally) sync with a server. See /docs/_server_api.md for details on the protocol. This uses a last-write-wins approach to handling merge conflicts. This does mean that if someone does a bunch of changes in both an online and an offline instance, and then syncs the offline instance, the changes in the offline instance will win, even if chronologically they happened before the online instance. However, this is an unlikely use-case, and allows us to have a much simpler solution than something more complex like an or-set CRDT, and avoids issues with clock drift that using timestamps introduces (which present an ongoing sync issue rather than just at the point you bring one online).
aJanuary
commented
Feb 24, 2026
Contributor
Author
There was a problem hiding this comment.
I don't know what your opinion is of having an example server code in this repo.
| "OFFLINE_LABEL": "Currently Offline", | ||
| "FETCH_BUTTON_LABEL": "Fetch Data Now" | ||
| }, | ||
| "SYNC": { |
Contributor
Author
There was a problem hiding this comment.
This does have the downside that if you just copy config_example.json to config.json, it will now error if you're not running a server. An option would be to not include this in the example config.
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.
Add the ability to (optionally) sync with a server. See /docs/_server_api.md for details on the protocol.
This uses a last-write-wins approach to handling merge conflicts. This does mean that if someone does a bunch of changes in both an online and an offline instance, and then syncs the offline instance, the changes in the offline instance will win, even if chronologically they happened before the online instance. However, this is an unlikely use-case, and allows us to have a much simpler solution than something more complex like an or-set CRDT, and avoids issues with clock drift that using timestamps introduces (which present an ongoing sync issue rather than just at the point you bring one online).