ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

bug: Show indicator for indirect pins (within MFS breadcrumbs)

Open lidel opened this issue 4 years ago • 3 comments

Extracted from https://github.com/ipfs/ipfs-webui/pull/1713

Problem

Right now user can't tell when a file is pinned indirectly (when file is not pinned, but its parent dir is). This is especially problematic when MFS autopinning is enabled. In that scenario, everything is pinned indirectly via MFS root CID, but that is not reflected in the Files interface in any way.

How to detect indirect pins?

We need to limit checks to MFS. Even if file is pinned indirectly via some CID that is not in MFS, we won't be able to show that. In the context of WebUI, we should check if any level from breadcrumbs is pinned (locally or remotely) and update "Pin Status" column.

How to indicate indirect pins?

I believe this should be only indicate in "Pin Status" column on Files screen, and should be distinct enough, so people know that file is pinned via one of its parents.

  • We could display a faded cloud icon (30% etc) next to files that are pinned indirectly
  • .. or design a new icon for such files
  • ?

Would appreciate help / troughts / suggestions here. @jessicaschilling @rafaelramalho19

lidel avatar Mar 25 '21 22:03 lidel

I'd vote for the lower-opacity icon plus mouseover explanatory text. We experimented quite a bit with franken-icons in that column last year and none of them really worked ...

jessicaschilling avatar Mar 25 '21 23:03 jessicaschilling

It's a shame that something as useful as visually indicating if one of your files is pinned or not via an "old" folder recursive pin isn't yet implemented. It may be that I've not yet fully grasped IPFS, but the Web UI constantly gives me the impression that the GC will eat one of my files, because when I change a folder's contents, its CID will of course update too.

Say 1 new file was added to this folder. The pinned CID of the folder before this change happened still recursively pins all files except this 1 new file (I think). A pin of the folder's new CID is necessary to make sure the new file stays local and isn't removed. ipfs add automatically pins an added file, why not the UI's Import feature?

As far as I can tell, only pinning files is the best method if reliable visual feedback is desired (when you know the contents of a folder's files won't change but you still plan to add new files).

Is there not a way that, for example, when a folder's CID changes and the previous CID was recursive, automatically recursively pin the new CID? I'm not sure how much that would solve, but at least all new changes to the folder's contents would be automatically pinned.

I'd just like to be confident that anything I Import won't be mistakenly removed by GC.

redactedscribe avatar May 12 '22 16:05 redactedscribe

@redactedscribe I apologize that we still haven't addressed this issue for you. For context: the ipfs-desktop project lost some team members to another higher priority project a few years ago and only recently has been receiving the dedicated devs it requires.

Action items for dev (or community member!) who wants to make a PR for this:

  1. for each file we should check if any level from breadcrumbs is pinned (locally or remotely) and update "Pin Status" column.
    • If a user clicks into a pinned parent folder, we can assume the children listed within that parent are all pinned. We shouldn't need to check breadcrumb path for each child, as they all exist at that path (need to confirm this)
    • If the prior bullet point is true, we should probably display the regular "pinning status" icon at the breadcrumb level
  2. modify pinned status icon to represent child of parent pinned item
    • icon at 30% reduced opacity
    • tooltip on hover to allow users to discover more information about the parent of the items being pinned
  3. Allow users to pin child items directly
    • i.e. if a child is pinned via it's parent, changes to that parent pinning could result in changes to the old parent's children's pinning status (i.e. overriding a CID with childA with a CID that has childB will mean childA should get garbage collected). In this scenario, users may find a child important enough to ensure it's not garbage collected, regardless of the parent's updates.
    • We should follow Kubo practice for this.
    • If the child is pinned, but parent is removed or unpinned, how do we handle this?

@hacdias how does kubo handle item 3 currently?

@juliaxbow what do you think about the proposed UX updates?

SgtPooki avatar Dec 05 '22 21:12 SgtPooki