desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Checking out a linekd dataset to the directory it’s already linked to does nothing

Open Mr0grog opened this issue 5 years ago • 1 comments

This is pretty similar to #480 ;)

If I have a dataset with a linked directory that I checkout out via the CLI, Qri Desktop still shows a “checkout” button. Trying to check it out to the same directory I already linked it to via the CLI does nothing — the dialog stays open, shows no errors, and does not indicate that the dataset is either already checked out or has been successfully checked out.

Steps to reproduce:

  1. Create or checkout a dataset somewhere on disk with Qri CLI.
  2. Open the dataset in Qri Desktop.
  3. In Qri Desktop, click the “checkout” button and set the save path to the same directory used in step 1 (so it would effectively wind up in the same spot it’s already linked to).
  4. Click the “checkout dataset” button in the dialog to confirm.

Result:

Nothing happens! The dialog is still open with no feedback.

Expected:

Either an error message that the dataset is already checked out or success, since nothing actually had to change.

Qri Desktop version 0.4.0

Mr0grog avatar Mar 11 '20 17:03 Mr0grog

Dope thank you.

The underlying things that's happening here is we aren't correctly handling getting websocket responses that indicate that a 'body' has been created. This is our trigger to know whether a dataset has been checked out.

Once we get the 'created' websocket response from the backend that a body file has been created, we should re-fetch the dataset list. The dataset list response is what we rely on currently to know if a dataset is checked out.

However, this is hack, and we should really be getting some message from the backend stating that a dataset has been 'linked' (or 'unlinked') and we should react to that message.

We have been considering using the command line and desktop simultaneously as an advanced use case, so this may not get priority while bug squashing.

ramfox avatar Mar 16 '20 19:03 ramfox