Files
RuneStone/docs/archive/app-updating-draft.md
T
2026-11-16 04:21:21 -07:00

6.4 KiB

App updating draft

Status: Draft for review. The App updating card stays in Backlog until the user accepts this scope.

RuneStone needs an update flow that keeps workspace files, settings, plugins, and browser profiles. Users must not uninstall RuneStone before an update or a same-version repair. The proposed first milestone makes the installer reliable and clear. A later milestone adds update checks inside RuneStone.

Current state

The card reports an uninstall and reinstall workflow. The project rules already require direct reinstall and update. The Windows configuration uses a per-user NSIS installer and blocks downgrades. The 0.1.15 release notes tell users to run the installer directly, but also identify native installer behavior as untested. This difference needs reproduction on an installed copy before implementation.

Sources: project rules, Windows configuration, and the 0.1.15 release notes (no longer in the repository).

Proposed first milestone

The installer detects an existing installation and defaults to reinstall or update. It shows the installed version, package version, and destination before it changes files. The primary action reads Update for a newer version and Reinstall for the same version. An older package stops with a clear downgrade message.

If RuneStone is open, setup asks the user to close it after saving work. The app must not discard unsaved files or end active terminal work without a user decision. The installer keeps the existing installation path and application identity. It replaces program files and bundled browser files without deleting user data.

After success, setup offers Open RuneStone. After failure, setup identifies the failed step and offers a retry or a recovery instruction. A retry must not require manual removal of the application or its data.

Proposed update screen

Settings gains an Updates category with a recognizable icon and a visible label. It shows the installed version, last check, available version, release notes, and download state. Check for updates is a manual action in the first implementation. Background checks remain a later option. Downloads and installation require explicit user actions.

State User action Result
No check yet Check for updates Read the selected release channel
Current version Check again Show that no newer release exists
Update available Download update Show progress and allow cancellation
Download complete Restart and update Save work and close the app before setup
Open work prevents restart Return to RuneStone Keep the downloaded package for later
Offline or failed download Retry Keep the installed app usable
Invalid package Download again Do not run the invalid package

The update service must compare numeric version parts, including build numbers above 99. It must not mistake a same-version repair for a newer release. The default channel excludes trial releases. A future trial channel requires an explicit choice.

Release source and package checks

The in-app milestone needs a chosen release source, stable metadata format, and publisher verification method. The proposed source is the existing Gitea service, with a dedicated application release contract. Plugin download support does not establish an application update contract.

The contract must identify the version, Windows architecture, installer URL, file size, digest, release notes, and release channel. The app validates the downloaded bytes and publisher before execution. Transport security and a digest alone do not prove the publisher when the source itself changes. Signing keys and credentials stay outside the repository. The build process must document key recovery and rotation.

The app rejects a mismatched version, architecture, digest, or signature. It does not run an arbitrary URL as an installer. If private releases need authentication, the credential flow requires a separate design before implementation.

Data and plugin behavior

Data Required result
Workspace files and hidden workspace metadata Preserve all files and paths
Application settings and recent workspaces Preserve values and reopen behavior
Installed plugins and plugin settings Preserve packages, enable states, and stored data
Browser profiles, cookies, history, and bookmarks Preserve data and profile identity
Unsaved documents and active terminals Resolve before restart, without silent data loss

Application updates do not silently replace third-party plugins. Plugin update support stays outside this card. Existing plugin ZIP installation remains separate. An incompatible plugin should remain installed but inactive, with a clear explanation, if compatibility checks become necessary. That compatibility policy requires defined host requirements before enforcement.

Acceptance checks

Scenario Pass condition
Clean installation Setup installs and opens RuneStone
Same-version reinstall Reinstall is the default action and restores program files
Upgrade from the previous build Setup updates directly without an uninstall step
Older installer Setup blocks the downgrade
Custom installation path Setup uses the existing path
Populated workspace and user data Before and after file hashes and settings match
App open with unsaved work The user can return to work without losing edits
Failure or cancellation User data remains intact and retry is possible
Download or publisher check failure The app does not execute the package
Successful update The app reports the installed version and opens normally

Test the installer in a disposable Windows profile with representative workspace, plugin, and browser data. Automated source checks do not replace the native installer checks.

Decisions before To Do

  1. Approve installer repair as the first milestone, or include the update screen in the first card.
  2. Choose the application release source and its public or private access model.
  3. Choose the publisher verification and signing process before an in-app installer launch.

The recommended first card covers installer repair and native regression checks. The update screen can follow after the release source and signing decisions. This draft does not authorize updater implementation or move the card into To Do.