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

gui: Always show Out of Sync Items for remote devices #8632

Conversation

tomasz1986
Copy link
Contributor

Right now, the Out of Sync Items list for a specific remote device is
available only when the device is online and currently synchronising.
However, the list itself is being created by Syncthing all the time, so
there is no need to hide it from the user even when the remote device is
offline or paused. This way they can always easily check which files
exactly have not been synchronised yet.

In addition, the Out of Sync Items entry already includes file size next
to it, so there is no need to display it again next to the Sync Status
entry. Thus, remove out-of-sync file size from Sync Status, leaving only
percentage next to it.

Signed-off-by: Tomasz Wilczyński twilczynski@naver.com

Screenshots

Before (Out of Sync Items present only when online and syncing)

image

After (Out of sync Items present always, as long as there is any)

image

Right now, the Out of Sync Items list for a specific remote device is
available only when the device is online and currently synchronising.
However, the list itself is being created by Syncthing all the time, so
there is no need to hide it from the user even when the remote device is
offline or paused. This way they can always easily check which files
exactly have not been synchronised yet.

In addition, the Out of Sync Items entry already includes file size next
to it, so there is no need to display it again next to the Sync Status
entry. Thus, remove out-of-sync file size from Sync Status, leaving only
percentage next to it.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
@nekr0z
Copy link
Contributor

nekr0z commented Oct 31, 2022

If I remember correctly, the rationale behind the current behavior was that when a remote device is not connected, there is no way to know its state (it may have connected to a third device that has all the data and sync everything from there, we don't know), hence it would be misleading to display it. What changed?

@tomasz1986
Copy link
Contributor Author

That's a good point. The same can be applied to the currently displayed "Sync Status" though, can't it?

@nekr0z
Copy link
Contributor

nekr0z commented Oct 31, 2022

The same can be applied to the currently displayed "Sync Status" though, can't it?

Not really, no. With the local status we can know for sure that we've at least seen some global state that we haven't yet caught up to. We can't be sure there are no global changes that we know not of yet, but we can at least positively know that we lack something.

As for a remote device, we can not know its state unless we are connected to it this exact moment.

@tomasz1986
Copy link
Contributor Author

tomasz1986 commented Oct 31, 2022

I'm not talking about the global state 😉. I'm talking about "Sync Status" (which is also visible in the screenshot above). It was added somewhat recently in #8401. I think of this PR as an extension to that one, really (as in why show the percentage and file size but not the files themselves?).

@nekr0z
Copy link
Contributor

nekr0z commented Oct 31, 2022

I'm talking about "Sync Status"

Oh, I must have missed that one. Indeed, the inclusion of that one invalidates my objections; please accept my apologies for not keeping up.

I think of this PR as an extension to that one, really

In this capacity, looks OK.

@calmh calmh merged commit 36221b7 into syncthing:main Nov 3, 2022
@acolomb
Copy link
Member

acolomb commented Nov 3, 2022

Oh, I must have missed that one. Indeed, the inclusion of that one invalidates my objections; please accept my apologies for not keeping up.

But does it really invalidate the objections? I think they're spot on, we cannot know how much a remote device is out of sync when we are not connected to them, but they might already have gotten our latest changes from some third party. So in fact, showing this state is possibly misleading until we do establish a connection again.

At least there should be a clear indication / explanation that this info is just a guess from when we last had a direct connection to the respective remote. That's actually a shortcoming of #8401 already, not necessarily a regression introduced here. But this additional level of detail makes it seem more trustworthy when in fact it isn't.

@tomasz1986
Copy link
Contributor Author

At least there should be a clear indication / explanation that this info is just a guess from when we last had a direct connection to the respective remote. That's actually a shortcoming of #8401 already, not necessarily a regression introduced here. But this additional level of detail makes it seem more trustworthy when in fact it isn't.

There is more to that, e.g. the whole Sync Status doesn't take into account files ignored by the remote device, so if you make local changes to files that are ignored there, the status will be "incomplete", even though in reality the two are in sync. This applies to both Sync Status with its percentage, and the list of files with their size. Despite that, I still find this very useful when dealing with devices that I've got 100% control and know which files are present where. Obviously, if we're a part of a larger network, where devices belong to different entities, then there's no way to know the real remote state before actually connecting with the device.

Would a tooltip note suffice here? I'm thinking about something similar to what's currently used for the recently added connection type information, where each of them on hover displays a short explanation of what it is.

@acolomb
Copy link
Member

acolomb commented Nov 3, 2022

Yeah I guess a tool tip is fine. And something more elaborate in the documentation. In the out of sync items dialog, a longer note could be displayed when the corresponding remote is disconnected.

Regarding ignored files, that's actually correct to display out of sync. They don't have the files, so not in sync. Period. Locally ignoring stuff is explicitly asking to stay out of sync, so other devices should not get lied to about it.

calmh added a commit to imsodin/syncthing that referenced this pull request Nov 8, 2022
* main: (36 commits)
  lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655)
  lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650)
  gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984)
  gui, man, authors: Update docs, translations, and contributors
  build: Add GitHub actions build for Windows (syncthing#8627)
  gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644)
  gui: Adjust connection type icon size scaling and alignment (syncthing#8645)
  docker: Use healthcheck endpoint (syncthing#8640)
  lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631)
  gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530)
  gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571)
  gui: Always show Out of Sync Items for remote devices (syncthing#8632)
  lib/fs: Let xattr test avoid non-test attributes (fixes syncthing#8601) (syncthing#8628)
  build: Add GitHub actions build for Windows
  gui, man, authors: Update docs, translations, and contributors
  gui: Display folder and device count number (syncthing#8615)
  gui, man, authors: Update docs, translations, and contributors
  lib/model, lib/protocol: Fix file comparisons (fixes syncthing#8594) (syncthing#8603)
  lib/scanner: More sensible debug output (syncthing#8596)
  gui: Allow automatic device ID selection on WebKit browsers (ref syncthing#8544) (syncthing#8597)
  ...
@calmh calmh added this to the v1.22.2 milestone Nov 9, 2022
calmh added a commit to calmh/syncthing that referenced this pull request Nov 22, 2022
* main: (23 commits)
  lib/fs: Optimize WindowsInvalidFilename (syncthing#8687)
  gui, man, authors: Update docs, translations, and contributors
  cmd/syncthing: Use main logger in generate subcommand (fixes syncthing#8682) (syncthing#8685)
  build: Update all dependencies (fixes syncthing#8679) (syncthing#8680)
  gui, man, authors: Update docs, translations, and contributors
  lib/model: Correctly set xattrs on temp files (fixes syncthing#8667) (syncthing#8670)
  gui: Automatically dismiss authentication reminder when in LDAP mode (fixes syncthing#8661) (syncthing#8663)
  lib/model: Correctly handle xattrs on directories (fixes syncthing#8657) (syncthing#8658)
  lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655)
  lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650)
  gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984)
  gui, man, authors: Update docs, translations, and contributors
  build: Add GitHub actions build for Windows (syncthing#8627)
  gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644)
  gui: Adjust connection type icon size scaling and alignment (syncthing#8645)
  docker: Use healthcheck endpoint (syncthing#8640)
  lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631)
  gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530)
  gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571)
  gui: Always show Out of Sync Items for remote devices (syncthing#8632)
  ...
@tomasz1986 tomasz1986 deleted the tomasz86/gui/always-show-device-out-of-sync-items branch September 12, 2023 18:33
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Mar 10, 2024
@syncthing syncthing locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants