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

[Bug] new sync missed and clobbered previous sync #751

Open
mentalisttraceur opened this issue Mar 24, 2023 · 1 comment
Open

[Bug] new sync missed and clobbered previous sync #751

mentalisttraceur opened this issue Mar 24, 2023 · 1 comment

Comments

@mentalisttraceur
Copy link

mentalisttraceur commented Mar 24, 2023

  1. Installed Stylebot yesterday on one laptop (Brave browser on Linux). Opened a website, pasted my custom CSS for it into Stylebot (worked great, loved it!).
  2. Turned on sync, verified that Stylebot's JSON file appeared in Google Drive with my CSS. Lovely!
  3. Installed Stylebot later on second laptop (Brave browser on Windows). Opened the same website.
  4. Noticed that my styles were not applied. Opened Stylebot to the "code" tab, saw that it was blank. Remembered that on this laptop I didn't yet turn on sync.
  5. Turned on sync, sync allegedly came on, but my upstream CSS didn't appear in the code tab.
  6. Toggled between the code tab and other tabs once or twice. Hit the sync button once or twice.
  7. Checked in Google Drive: the JSON file was wiped to an empty slate.

Seems like second browser's Stylebot failed to see/register/apply the changes from the first, or at least didn't update the state of the built-in code editor, and then saved that still blank state over what I previously synced.

Expected behavior

When a new instance of Stylebot has cloud sync first turned on, I'd expect it to successfully load and apply all of the CSS that was already synced to that account for all webpages that have CSS saved, even in edge cases like Stylebot's code editor being already open on one of those pages.

@mentalisttraceur mentalisttraceur changed the title [Bug] Sync clobbering issue [Bug] new sync missed and clobbered previous sync Mar 24, 2023
@mentalisttraceur
Copy link
Author

mentalisttraceur commented Apr 8, 2023

Okay, it looks like sync just never looks at the information in Google drive - it's just a one-way push/override to the cloud?

What's the receptivity to a PR which will download and compare what's in Google Drive to what the local StyleBot has configured, and pick the latest (based on some basic heuristic like timestamp to start)?

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