Sitelet https://github.com/OtterMind/Chat2DB/issues/2697
Skip to content

Add in-app update support for Chat2DB Community desktop #2697

Description

@haizhi03

Chat2DB Edition

Chat2DB Community

Summary

Implement a safe in-app update experience for installed Chat2DB Community JCEF desktop releases.

Community desktop releases will use GitHub Releases as the default update source. The one-time bridge release is 5.4.0, which remains available through the legacy CDN only so already-installed CDN-only
clients can migrate to the GitHub updater. Releases after 5.4.0 must not publish new updater payloads or pointers to the CDN.

User Problem

Community desktop users currently need to find and install newer versions manually. This makes staying current inconvenient and leaves the existing desktop update capability unavailable to Community users.

Expected Behavior

  • Installed Community desktop releases can check for updates from Settings → About.
  • When an update is available, users can view the version/release notes, download verified payloads, and install from the application.
  • The UI represents checking, up-to-date, available, downloading, ready-to-install, installing, and failed states.
  • Checks are lightweight: they fetch only GitHub’s latest version.json; payload download, hashing, cleanup, and installation preparation occur only after the user requests download.
  • Downloaded payloads and manifests are validated by size, SHA-256, URL/path policy, and update-plan validation.
  • Duplicate check, download, and install actions are single-flight.
  • Failed installation rolls back application files; incomplete rollback preserves recovery backups.
  • local_version.json is committed through a same-directory temporary file and replacement, so failed writes do not truncate the previous metadata.
  • Source/development desktop builds may check but cannot download or install into the workspace.
  • Web Community does not show or initialize desktop self-update behavior.
  • Community code uses only the Community restart protocol; it does not add Local, Pro, or Electron update paths.

Release Distribution

  • GitHub Releases are the default source for new Community desktop clients.
  • Bridge release 5.4.0 publishes:
    • GitHub Release metadata and payloads for new clients;
    • a separate legacy CDN manifest and payload set for old CDN-only clients.
  • Releases after 5.4.0 publish through GitHub only.
  • The CDN bridge pointer and all bridge payloads are retained for old-client migration.

Scope

  • Community JCEF updater and renderer bridge.
  • Community desktop metadata generation and packaging.
  • GitHub Release workflow and one-time CDN bridge workflow.
  • Standalone Windows elevated updater helper, including its independent validation boundary.
  • Community-only automated tests and packaged gray-build verification.

Non-goals

  • No GitHub API token, REST API polling, or CDN fallback in new clients.
  • No change to Local/Pro update behavior.
  • No Electron runtime path.
  • No delta patches.
  • No mandatory-update policy change as part of the source migration.

Acceptance Criteria

  • A packaged Community release can update to a newer GitHub-hosted release in-app.
  • Legacy CDN-only clients can update to bridge release 5.4.0.
  • A post-bridge release performs no new CDN publication.
  • Development and Web Community builds cannot install desktop updates.
  • Windows elevated installation, macOS/Linux in-process installation, rollback, and metadata commit failures are covered by tests.
  • Release workflow validates the canonical payload, manifests, checksums, and required Release assets.

Contribution

I have a local implementation with automated tests and can submit the implementation PR.

Submission Checklist

  • I searched existing issues and Discussions for duplicates.
  • I selected the affected Chat2DB edition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    In Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions