Skip to content

fix(setup): block finishing without the provider's sync engine (closes #210) - #213

Merged
gnacho merged 1 commit into
mainfrom
fix/210-wizard-engine-check
Sep 17, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/210-wizard-engine-check

Conversation

@gnacho

@gnacho gnacho commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Problem

The setup wizard let the user finish and add folders for a provider whose sync engine was not installed. The failure only surfaced later as a generic "Synchronization failed" (or, before #209, as a misleading "Synchronization completed" from the ETag gate).

Fix

Wizard (closes #210):

  • finish_setup is the single choke point every finish path goes through (first-sync confirmation, resume, decision). It now checks the engine for the currently selected provider - so switching providers re-evaluates the check - and blocks with an actionable dialog naming the package (nextcloud-client / opencloud-desktop) instead of completing.
  • The welcome banner already warned right after provider selection; now the finish is actually blocked. The policy lives in a pure helper (engine_install_hint(provider, engine_present)) covered by a unit test, no real $PATH needed.

Packaging (the "at least one engine" ask): pacman has no "A or B" dependency (ArchWiki PKGBUILD#optdepends: alternative dependencies belong in optdepends), so:

  • optdepends now lists BOTH engines: nextcloud-client (nextcloudcmd) and opencloud-desktop (opencloudcmd).
  • A new nextsync.install warns on install/upgrade when NEITHER nextcloudcmd nor opencloudcmd is available. Verified in the built package: .PKGINFO carries both optdepends and .INSTALL is included.

With #209 (runtime detection + no false success), #210 (wizard) and this packaging change, all three layers now point at the same fix.

Tests (red-green)

engine_install_hint_blocks_only_when_the_binary_is_missing: never blocks when the engine is present; blocking hints name the right binary and Arch package for both providers.

  • Gate: 714 passed + 1 ignored (known flaky), clippy --all-targets clean, fmt clean, i18n catalog parity clean (3 new strings, ES included).
  • Package builds (makepkg), includes .INSTALL, and both optdepends are in .PKGINFO.

…#210)

Both engines are alternative optdepends (pacman has no OR dependency), so
the package also warns at install/upgrade when neither binary is present.
@gnacho
gnacho merged commit e10cca2 into main Sep 17, 2026
2 checks passed
@gnacho
gnacho deleted the fix/210-wizard-engine-check branch September 17, 2026 19:15
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.

Setup wizard should verify the sync engine is installed for the selected provider

1 participant