Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local storage gets out of sync with GitHub #153

Open
docwhat opened this issue Feb 2, 2023 · 0 comments
Open

Local storage gets out of sync with GitHub #153

docwhat opened this issue Feb 2, 2023 · 0 comments

Comments

@docwhat
Copy link

docwhat commented Feb 2, 2023

How to reproduce:

  1. Add a repository to two browsers.
  2. In one browser, create a new ADR and "commit and push".
  3. In the other browser, you will not see the new ADR.
  4. Note that you cannot refresh the browser page to update the list of ADRs.

Workaround

  • You can disconnect and reconnecting will force everything to be reloaded.
  • If you add a second branch, you can switch between the branches to force a refresh for just that repository. Any changes will be lost.

Thoughts

For each repository in the addedRepositories list, the git commit SHA1 should be stored next to the branch.

A small background task can periodically check for new content (e.g., on browser focus if last check was 30+ seconds ago).

To make conflict resolution easier, each ADR may want to keep a git commit SHA1 for the editedMd showing what commit the edits are relative to. That way, you could try to re-apply the diff to the new originalMd.

An alternative is to use the git blob SHA1 since that is all you really care about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant