TiddlyDesktop icon indicating copy to clipboard operation
TiddlyDesktop copied to clipboard

TiddlyDesktop doesn't remember the target filename for GitHub / GitLab

Open AndreasHennig opened this issue 2 years ago • 2 comments

I want to save my changes using the GitHub saver / GitLab saver. So I created an access token, entered it in the $:/ControlPanel and hit the "save Changes" button. Although it takes quite some time (around 10-20 seconds), I eventually get the "Saved wiki" toast and there is a new commit in my remote git repository with all the changes.

However, if I close the TiddlyDesktop window for this wiki and open it again, it has "forgotten" the filename of the target file. Since without a target filename the GitLab saver configuration is incomplete, is doesn't save the changes to GitLab anymore. So everytime I reopen a wiki in TiddlyDesktop, I have to go into the $:/ControlPanel and re-enter the target filename. This is quite tidious.

At some point I even experienced TiddlyDesktop to loose the GitLab saver configuration completely. But couldn't figure out how to to reproduce this behavior reliably.

I would like TiddlyDesktop to keep my saver configurations for GitHub / GitLab.

Is the current behavior intentional or did I might discover a bug?

My environment:

  • TiddlyDesktop 0.0.14
  • macOS 11.5.1 (Big Sur)

AndreasHennig avatar Aug 06 '21 12:08 AndreasHennig

Hi @AndreasHennig thanks for the report. It sounds like the sequence was:

  1. Open wiki file in TiddlyDesktop
  2. Fill in GitHub/GitLab details (the access token is stored in local storage, but all the other settings are saved as tiddlers in the wiki)
  3. Save file to GitHub/GitLab
  4. Close window

I think the problem is that the modifications to the wiki made in (2) have not been saved by TiddlyDesktop, they've only been saved to GitHub/GitLab. If you want to also save changes via TiddlyDesktop then between steps 3 and 4 you'd need to clear the GitHub/GitLab saving details and save again, to give the TiddlyDesktop saver a chance to run.

TW5 doesn't support working with multiple savers at once, which is why you'd need to clear the GitHub/GitLab details before being able to save to TiddlyDesktop.

If your desired workflow is to maintain a local copy of your wiki and occasionally copy it up to GitHub/GitLab, then you might find things easier to not use the GitHub/GitLab saver, but instead use an the command line or an external tool like GitHub Desktop to post the file to GitHub/GitLab.

Jermolene avatar Aug 06 '21 16:08 Jermolene

Hi @Jermolene,

and thanks for your quick answer.

TW5 doesn't support working with multiple savers at once, which is why you'd need to clear the GitHub/GitLab details before being able to save to TiddlyDesktop.

Hang on, just to make sure I get it: If I open a freshly created wiki, the "local saver" (which only saves changes to the local html file on my machine) is implicitly active. However, as soon as I have entered and saved a valid configuration for another saver, lets say the GitHub saver, the local saver isn't active anymore. So changes are not saved to the local html file but only pushed to GitHub?

I think the problem is that the modifications to the wiki made in (2) have not been saved by TiddlyDesktop, they've only been saved to GitHub/GitLab. If you want to also save changes via TiddlyDesktop then between steps 3 and 4 you'd need to clear the GitHub/GitLab saving details and save again, to give the TiddlyDesktop saver a chance to run.

Ok, so let's say I want to work on the version of my wiki that contains the GitHub credentials (since I want to work on my wiki locally but want my changes to be pushed regularly to GitHub) - in this case I can't just reopen the local html file. Instead I would have to download the version from GitHub and start from there, right?

If your desired workflow is to maintain a local copy of your wiki and occasionally copy it up to GitHub/GitLab (...)

I actually thought this is the exact workflow the GitHub saver was created for. But from your explaination I guess it's only suited for "one-time" backups of my wiki, right?

AndreasHennig avatar Aug 10 '21 06:08 AndreasHennig