Skip to content

Electron = mc²

Compare
Choose a tag to compare
@taratatach taratatach released this 24 Oct 14:48
c863f1c

Improvements for all users:

  • We upgraded a lot of dependencies and especially Electron which was upgraded
    to v5.0.0. This brings in Node v12.0.0. They should bring performance and
    stability improvements.
  • We improved the stability of the ordering and identification of changes
    fetched from the remote Cozy. This should reduce the number of unmergeable
    changes and conflicts arising from those situations. This is especially true
    when complex moves were synchronised with the remote Cozy (e.g. moving a
    folder from inside a moved folder).
  • We fixed a few minor UI issues like long filenames which were not correctly
    ellipsized in the synced files list.
  • When upgrading Electron to v5.0.0, we broke the onboarding process because of
    a new security restriction in Chromium (which is packaged with Electron)
    preventing us from redirecting to the folder selection window at the end of
    the OAuth authentication process with your Cozy.
    We're now manually loading the folder selection window after the
    authentication instead of following the redirect URI sent back by the Cozy.
  • Our remote changes watcher tries to recreate the changes that were executed
    on the remote Cozy from the resulting documents and the old versions we have
    locally. We found out that we were not correctly detecting and thus handling
    complex hierarchy changes like:
    • child only moves (i.e. we detect a move on a folder descendant which is due
      to its ancestor move and should not result in any local action)
    • moves inside move (i.e. renaming/moving the child of a moved parent within
      that same parent)
    • moves from inside a move (i.e. moving the child of a moved parent outside
      that parent)
      Handling those changes correctly should result in a lot less unmerged changes
      and their consequences.
  • After fixing the remote changes identification logic, we found out that our
    sorting algorithm (necessary to avoid potential collisions when applying them
    locally) was not stable and the resulting order depended greatly on the
    original changes and their order.
    We separated the criterias on which we sort the changes to come up with 2
    sorting algorithms called on after the other so the result of each one is
    predictable and thus the end result too. This should prevent some conflicts
    and mis-applied changes.

Improvements for MacOS users:

  • In an attempt to prevent losing a working config, we decided to use a write
    technique called copy-on-write. This proved itself unnecessary and even lead
    to issues for some users when they had both a working config and a temporary
    config file. We stopped using this technique without losing the safety of an
    atomic write via a temporary config file.
  • When launching the application, we do what we call an initial scan of your
    synced directory to list all its documents and try to detect changes that were
    made since the last time the application was running. It is a complex task
    which does not behave in the same way the live watching does and we were not
    always ordering the resulting changes in the correct order, resulting in
    incorrect changes or unmerged changes. We designed a specific sorting
    algorithm for this phase to stabilize this situation which should result in
    less errors during the application startup.
  • Apple now requires a notarization step for apps to be installed on newer
    versions of macOS. With this process, Apple certifies that Cozy Desktop
    does not contain any known malware and macOS will let you install our app
    without having to tinkle with your security parameters.
  • The way we store documents metadata (e.g. their paths) means we have to modify
    the saved metadata of the moved folder itself but also all its descendants
    (i.e. so their paths in our database reflects their path on the filesystem).
    We found an issue in our moves handling logic that prevented us from detecting
    moves from inside a move (i.e. we move a folder to another location from a
    parent that was just moved as well).
    We're now detecting them correctly which means those changes will now be
    propagated to the remote Cozy as expected.
  • We found out that the libraries we use to watch the changes done to your files
    on your filesystem could sometimes fire events with the wrong type. Indeed,
    we've seen events for the addition of files with a directory type and
    vice-versa.
    We rely on this type to decide which actions to run so we're now verifying
    that the type we received is correct before we proceed.

Improvements for GNU/Linux users:

  • Upgrading Electron, the desktop applications framework upon which Cozy Desktop
    is built, means upgrading the Node and Chromium versions shipped with it.
    Starting with Electron v4, when libappindicator is available and installed on
    your distribution, the systray icon will be displayed via this library. This
    means that the icon won't respond to left clicks anymore. To mitigate this
    situation, we decided to add the "Show Application" menu entry in the context
    menu for all distributions. This context menu can be displayed via a right
    click on the systray icon.

See also known issues.

Happy syncing!