Skip to content

feat(desktop): choose run mode in the installer (dual / local-only / cloud-only) - #33

Merged
Luhaozhu merged 3 commits into
mainfrom
feat/installer-mode-selection
Jul 27, 2026
Merged

feat(desktop): choose run mode in the installer (dual / local-only / cloud-only)#33
Luhaozhu merged 3 commits into
mainfrom
feat/installer-mode-selection

Conversation

@Luhaozhu

@Luhaozhu Luhaozhu commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Ensures the run-mode choice happens in the app's first-launch init page — and that nothing can silently skip it.

  • The NSIS installer shows no dialogs at all. The old interactive yes/no dialog (local vs remote) is removed; a plain interactive install writes no mode marker, so the first launch always opens the init page with the three-way choice (dual / local-only / cloud-only). Enterprise silent-install flags (/HUGAGENT_LOCAL, /HUGAGENT_REMOTE) keep working for software-distribution scenarios.
  • is_provisioned now requires an explicit provision_mode in server.json (plus a saved cloud address for cloud/dual). Machines carrying a server.json from older versions no longer skip the chooser — they get one prefilled confirmation pass, then are never asked again.
  • Installer-flag consumption: /HUGAGENT_LOCAL provisions LocalOnly immediately; /HUGAGENT_REMOTE preselects cloud mode and the init page only asks for the server address.
  • activate-local writes a full LocalOnly provision so the switch survives the stricter check.

Why

On Windows the installer's old yes/no dialog pre-wrote the config, so the in-app three-mode chooser added for hybrid dual mode was unreachable — fresh installs went straight into a from-zero local setup with no dual option.

Testing

  • cargo test --lib in desktop/src-tauri — 33/33 pass (provisioning/preselect/legacy cases covered by new tests)

Luhaozhu added 3 commits July 27, 2026 04:50
…cloud-only)

- NSIS interactive install now offers a three-way run-mode choice via chained
  dialogs; local-only provisions immediately, dual/cloud-only preselect the
  mode and the first-launch init page only asks for the server address
- is_provisioned now requires an explicit provision_mode (and a saved cloud
  address for cloud/dual), so leftover configs from older versions get one
  prefilled confirmation pass instead of silently skipping the chooser
- activate-local writes a full LocalOnly provision; the enterprise silent
  install flags (/HUGAGENT_LOCAL, /HUGAGENT_REMOTE) keep working
@Luhaozhu
Luhaozhu merged commit 41c0302 into main Jul 27, 2026
3 checks passed
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.

1 participant