Skip to content

feat(dsh): check for PowerContext updates from the status panel #2613

Closed

Description

@knqiufan

Feature description

Add a small Check for updates button beside the version footer in the PowerContext status panel in DSH Web and Desktop. Use one entry point with separate DSH plugin and connected PowerContext Server version rows. Checking should be read-only and should work even if the Server is offline. Show Up to date when the selected release channel has no newer version, Update plugin to when an eligible update is available, or an actionable reason if the check fails or the update is unavailable.

Problem and proposed solution

The panel added in #2569 reports the running Server's version, but users still have to discover releases, identify how each component was installed, and update from outside the panel. The npm plugin and Python Server are built from the same release commit, but they are installed separately. Updating the local Python environment also does not replace an already running Server.

  1. Check the release and both installed identities. Read the plugin version and install source from the active DSH profile, and reuse the running Server's package version from the status bridge. Match official releases by their PowerContext tag and normalize Python/npm prerelease versions (for example, 1.6.0rc1 and 1.6.0-rc.1). Default to stable and honor any explicit preview channel or user-configured version hold. Check that the exact artifact is available from the intended source and compatible with the host and the Server it will connect to. A GitHub Release, a registry mirror, and PyPI can become available at different times. Show unknown or blocked states explicitly, including when a matched Server upgrade is required.
  2. Update the plugin in the background when DSH supports it. After the user sees the target version and any reload/restart requirement, clicking Update plugin authorizes that exact version. For eligible npm installs, use DSH's native plugin manager to update only the active profile. Keep progress outside the plugin panel so it can survive closing or reloading the panel, prevent duplicate installs, and preserve the profile's enablement and user configuration. Distinguish downloading/installing, restart required, failed/restored, and verified active. Never force-quit DSH during a turn. If native self-update cannot safely complete on a supported host, offer the documented native or CLI path. Git/local links, custom sources and unknown installations should keep their source and receive guidance rather than silently switching to npm.
  3. Guide Server updates in the first release. Show the available matching Server version, release notes, and the appropriate upgrade guide. An address on loopback is not proof that DSH owns the Server process or its Python environment. Leave remote, foreground, container and externally managed Server installations to their operators. Consider one-click Server updates later for a positively identified PowerContext-managed personal service, once the exact source-to-target database upgrade path, maintenance window, restart and readiness checks can be verified. Keep database migration in the existing explicit maintenance workflow.

Alternatives considered

  • Two independent update buttons: makes ownership visible, but leaves users to infer which plugin and Server versions work together. One entry point can present a compatible target while keeping the component versions and actions distinct.
  • Always update both components together: convenient for a managed install, but can interrupt other clients of the same Server and bypass its deployment or database upgrade procedure.

Additional context

AI assistance: OpenAI Codex assisted with source inspection and drafting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions