You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Revert Local Changes" button should not be shown when still exchanging indexes #10191
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Not sure if this is a bug or a feature request, but when exchanging indexes, e.g. for the very first time with the folder already present on the device, the "Revert Local Changes" button is shown from the very beginning. This is despite the fact that the global state isn't actually known yet, as the indexes are still being downloaded and processed.
The issue can be seen in the screenshot below. In reality, in this case, both global and local states are actually equal, and there will be no need to revert any changes once the index exchange is complete.
On a side note, is there any danger in actually pressing the "Revert Local Changes" button in this situation? I have always been afraid to click it not to cause any issues 😅.
changed the title [-]"Revert Local Changes" button should not be shown when exchanging indexes[/-][+]"Revert Local Changes" button should not be shown when still exchanging indexes[/+]on Jun 19, 2025
It's both dangerous and not, as the folder wont propagate the changes the data isn't lost in the cluster, but it will delete everything locally and have to redownload once the indexes are back in.
The problem here is that what you describe is correct: As no other device is announcing these files, they are local changes - that's the definition of them. And I don't see how syncthing should know that it's just a temporary thing and remotes will announce those files. We could do something like if the folder is shared with at least one device, and we have no indexes from them, wait for indexes to come in and don't consider things changed until the, but the question is "when are we done"? At any point, missing indexes could be files that no remote has or files remotes haven't announced yet. You can come up with heuristics, like delay marking things as locally changed until X time passed after the last received index update, but that will break down in many scenarios (too frequent changes, weird connection issues, ...).
So to me this is working as designed as in not a bug, and in the absence of a concrete improvement suggestion I'd also close it as a feature request as it's not actionable.
Lots of things are possible, that one certainly - not sure if already (simply) possible with the info handled in the web UI. I am just skeptical it's worth it, as it only hides the button when it would delete a lot of things due to missing indexes in some scenarios, but not in many others. And there's no particular logic to it from the users PoV, it just sometimes is there, sometimes not.
Alternatively, maybe only allow the button to be pressed when the folder is idle?
That I would have assumed to already be the case, as if the folder is currently syncing or scanning, it can't revert. Maybe it's still allowed intentionally to queue the operation afterwards? I have my doubt that's very valuable either, also mostly confuses users if they click a button and then nothing happens for a long time. Plus as you point out, both scanning and pulling can change the effect that a revert has. So yeah, that change seems fine/desirable to me.
Yeah, currently you can press the button while other operations are still running, yet there is no visible effect after doing so. In fact, you can press it like that over and over again 😅. I will try to look into this, possibly in the near future.
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Activity
[-]"Revert Local Changes" button should not be shown when exchanging indexes[/-][+]"Revert Local Changes" button should not be shown when still exchanging indexes[/+]imsodin commentedon Jun 26, 2025
It's both dangerous and not, as the folder wont propagate the changes the data isn't lost in the cluster, but it will delete everything locally and have to redownload once the indexes are back in.
The problem here is that what you describe is correct: As no other device is announcing these files, they are local changes - that's the definition of them. And I don't see how syncthing should know that it's just a temporary thing and remotes will announce those files. We could do something like if the folder is shared with at least one device, and we have no indexes from them, wait for indexes to come in and don't consider things changed until the, but the question is "when are we done"? At any point, missing indexes could be files that no remote has or files remotes haven't announced yet. You can come up with heuristics, like delay marking things as locally changed until X time passed after the last received index update, but that will break down in many scenarios (too frequent changes, weird connection issues, ...).
So to me this is working as designed as in not a bug, and in the absence of a concrete improvement suggestion I'd also close it as a feature request as it's not actionable.
tomasz1986 commentedon Jun 26, 2025
I was thinking of maybe disabling the button while indexes are being downloaded. Is this impossible from a technical point of view?
Alternatively, maybe only allow the button to be pressed when the folder is idle?
imsodin commentedon Jun 26, 2025
Lots of things are possible, that one certainly - not sure if already (simply) possible with the info handled in the web UI. I am just skeptical it's worth it, as it only hides the button when it would delete a lot of things due to missing indexes in some scenarios, but not in many others. And there's no particular logic to it from the users PoV, it just sometimes is there, sometimes not.
That I would have assumed to already be the case, as if the folder is currently syncing or scanning, it can't revert. Maybe it's still allowed intentionally to queue the operation afterwards? I have my doubt that's very valuable either, also mostly confuses users if they click a button and then nothing happens for a long time. Plus as you point out, both scanning and pulling can change the effect that a revert has. So yeah, that change seems fine/desirable to me.
tomasz1986 commentedon Jun 26, 2025
Yeah, currently you can press the button while other operations are still running, yet there is no visible effect after doing so. In fact, you can press it like that over and over again 😅. I will try to look into this, possibly in the near future.
fix(gui): Show revert buttons only when folder is idle (fixes syncthi…
fix(gui): show revert buttons only when folder is idle (fixes syncthi…
fix(gui): show revert buttons only when folder is idle (fixes syncthi…
fix(gui): show revert buttons only when folder is idle (fixes #10191) (…
Merge branch 'main' into jb/slog
chore(deps): update syncthing/syncthing docker tag to v2 (#2048)