Skip to content

"Revert Local Changes" button should not be shown when still exchanging indexes #10191

Closed

Description

@tomasz1986

What happened?

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.

Image

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 😅.

Syncthing version

v2.0.0-rc.21

Platform & operating system

Windows (64-bit Intel/AMD)

Browser version

No response

Relevant log output

Activity

  1. added
    bug
    needs-triage
    on Jun 19, 2025
  2. added theissue type on Jun 19, 2025
  3. 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
  4. imsodin commented on Jun 26, 2025

    @imsodin
    Member

    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.

  5. tomasz1986 commented on Jun 26, 2025

    @tomasz1986
    MemberAuthor

    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?

  6. imsodin commented on Jun 26, 2025

    @imsodin
    Member

    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.

  7. tomasz1986 commented on Jun 26, 2025

    @tomasz1986
    MemberAuthor

    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.

  8. added 3 commits that reference this issue on Jul 6, 2025
    5bbb758
    ad930cb
    6876737
  9. added a commit that references this issue on Jul 12, 2025
    c8c38f7
  10. added a commit that references this issue on Jul 14, 2025
    ecbbe1f
  11. added this to the v2.0.0 milestone on Aug 12, 2025
  12. added
    frozen-due-to-age
    on Jul 12, 2026
  13. locked and limited conversation to collaborators on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-ageneeds-triage

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions