Skip to content

Fix sync-preparing status classification - #101

Merged
ilyaZar merged 2 commits into
omarchy-QOL:mainfrom
dawez:fix-sync-preparing-status
Sep 13, 2026
Merged

Fix sync-preparing status classification#101
ilyaZar merged 2 commits into
omarchy-QOL:mainfrom
dawez:fix-sync-preparing-status

Conversation

@dawez

@dawez dawez commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Problem

Syncshell classified every Syncthing folder state beginning with sync as actively syncing. Syncthing can report sync-preparing while it is preparing or processing transient remote updates, even when needTotalItems and needBytes are zero. The panel therefore flickered between preparing/syncing/scanning and up-to-date despite the folder being synchronized.

Change

Only report a folder as syncing when it has pending items or Syncthing reports the concrete syncing state. Scanning and activity handling remain unchanged.

Testing

  • Added regression coverage for sync-preparing with no pending work.
  • Added coverage confirming pending items still report syncing.
  • Targeted QML model tests pass.
  • Architecture contract test passes.
  • Omarchy service contract test passes.

Root cause

The folder projection used state.indexOf("sync") === 0, which matched both syncing and the transient sync-preparing state. That prefix check was broader than the intended active-sync state.

Treat Syncthing's transient sync-preparing state as idle when there is no pending work, while preserving active syncing for pending items.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ilyaZar

ilyaZar commented Sep 12, 2026

Copy link
Copy Markdown
Member

lgtm

thx @dawez was thinking about that too

iam doing some ui checks atm but will merge your idea once I find a good entry point in the current changes

- keep zero item syncing snapshots visible
@ilyaZar
ilyaZar merged commit 24afef6 into omarchy-QOL:main Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants