Skip to content

Add Update Settings panel for auto-update mode and minimum app version#463

Open
shannah wants to merge 7 commits into
masterfrom
claude/wizardly-thompson-68sos
Open

Add Update Settings panel for auto-update mode and minimum app version#463
shannah wants to merge 7 commits into
masterfrom
claude/wizardly-thompson-68sos

Conversation

@shannah
Copy link
Copy Markdown
Owner

@shannah shannah commented Jun 6, 2026

Summary

Adds a GUI Updates panel to the jDeploy project editor exposing the launcher's update settings, framed in user-friendly vocabulary:

  • App-Only Updates (jdeploy.appUpdateMode) — choose whether app-only (jar-file) updates are applied automatically on launch (default) or whether the user is prompted first. The installer writes this to the launcher's preferences.properties (app-update-mode) at install time.
  • Full Updates (jdeploy.minLauncherInitialAppVersion / minLauncherInitialAppVersionMode / requireLauncherUpdate) — choose when users are required to run the installer again to update the native launcher: never (default), on every release, or for installations older than a given app version.

Each section has a help link that pops up a fuller explanation of app-only vs full updates and when a full update is warranted. The version threshold field has a placeholder hint and tooltip clarifying it takes a version of the user's app (not a date or jDeploy version).

Settings follow the remove-when-default convention — keys are only written to package.json when they differ from the defaults.

Also includes:

  • DEVELOPMENT.md local development guide, linked from the README
  • test_jdeploy_gui.sh / test_installer_debug.sh scripts replicating the IntelliJ run configs for manual GUI and installer testing
  • .tool-versions pinning JDK 8 + Maven for mise/asdf
  • Updated Client4JLauncher binaries from release 0.33.0

Testing

  • 16 unit tests in UpdateSettingsPanelTest covering load/save round-trips and remove-when-default behavior
  • Manually verified panel layout by rendering offscreen at editor proportions
  • End-to-end test: published jdeploy-test-app 1.0.20 and 1.0.21 to GitHub releases with appUpdateMode=prompt using the branch build, verified the setting lands in the published package-info.json, and installed 1.0.20 via the branch installer to exercise the prompt-before-update flow

shannah and others added 7 commits May 25, 2026 18:56
…app version

Expose two launcher-update features (already supported by the client4jgo
launcher) as first-class, GUI-editable settings in jDeploy:

- Auto-update mode (jdeploy.appUpdateMode): "auto" (silent update on launch,
  the default) vs "prompt" (ask the user on launch when an update is
  available). The installer writes this to the launcher's
  preferences.properties (app-update-mode key) at install time.
- Minimum initial app version (jdeploy.minLauncherInitialAppVersion): forces
  users on an older launcher to download a fresh installer and perform a full
  update. Supports an explicit version, or a "latest" sentinel
  (minLauncherInitialAppVersionMode) that is resolved to the published version
  at publish time without rewriting the developer's package.json.
- Require full launcher update (jdeploy.requireLauncherUpdate) checkbox.

Changes:
- New UpdateSettingsPanel registered as the "Updates" tab in
  JDeployProjectEditor.
- JDeployProject getters for the new jdeploy keys.
- BasePublishDriver resolves the minLauncherInitialAppVersion "latest" sentinel
  in the published package.json.
- AppInfo carries appUpdateMode; the installer reads it from the published
  package metadata (NPMPackageVersion) and InstallerPreferencesService persists
  app-update-mode to preferences.properties (read-merge-write so a null/empty
  published value never clobbers an existing user preference).
- Unit tests across cli, shared, and installer modules.

No client4jgo changes are required; it already consumes every key/attribute
involved.
…scripts

- Add test_jdeploy_gui.sh to launch the jDeploy GUI from the command line,
  replicating the 'JDeploy' IntelliJ run configuration
- Add test_installer_debug.sh to test the install wizard against a registry,
  replicating the 'JDeploy Installer' IntelliJ run configuration
- Add .tool-versions pinning JDK 8 and Maven for mise/asdf
- Add DEVELOPMENT.md documenting the build and the test scripts, linked
  from the README
Anchor the panel content at the top with BorderLayout.NORTH so the
sections keep their preferred heights instead of being stretched to
fill the editor's content area, and add consistent padding inside the
titled borders and between sections.
Users may not know what "minimum initial app version" means, so the
panel now frames both sections in terms of auto-updates:

- "Auto-Update Behaviour" is now "App-Only Updates" — updates that
  replace only the app's jar files and are applied seamlessly on launch
- "Minimum Initial App Version" is now "Full Updates" — updates that
  run the installer again, updating the native launcher along with the
  app, with options reworded accordingly (never / every release / older
  than a given version)

Each section gets a help link that pops up a fuller description of the
two update types and when a full update is warranted. The version
threshold field shows a placeholder hint and tooltip clarifying that it
takes a version of the user's app, not a date or a jDeploy version.

No persistence changes: the same appUpdateMode,
minLauncherInitialAppVersion(Mode), and requireLauncherUpdate keys are
read and written as before.
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