DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

[Feature Request]:Auto-update button

Open Autumn0716 opened this issue 4 months ago • 2 comments

Do you need to file a feature request?

  • [x] I have searched the existing feature request and this feature request is not already filed.
  • [x] I believe this is a legitimate feature request, not just a question or bug.

Feature Request Description

Add a "Version & updates" section to Settings:

  1. Display the currently running version alongside the latest release
  2. A Check for updates action that queries the GitHub Releases API (or the PyPI JSON API)
  3. Show a short changelog excerpt + link to the full release page
  4. An Update now button — where self-updating is actually feasible

Related Module

API/Backend

Use Case

Updating DeepTutor currently requires leaving the app and running commands in a terminal, and the correct command depends on how it was installed:

  • PyPI: pip install -U deeptutor
  • Docker: docker pull ghcr.io/hkuds/deeptutor:latest + recreate the container
  • Source: git pull + pip install -e . + npm ci --legacy-peer-deps

More importantly, there is no signal inside the app that a newer release exists. Given how quickly the project moves, it's easy to sit on an old version for weeks and hit bugs that were already fixed upstream, without ever knowing an update was available.

Additional Context

  • Always explicit — never update silently in the background
  • Cache the check (e.g. once per 24h) to avoid rate limits and unnecessary network calls
  • Allow disabling it entirely — relevant for offline, air-gapped, or enterprise deployments
  • Flag migration-bearing releases so users read the notes before upgrading
  • Handle a failed pip upgrade gracefully (permission errors on system Python, no active venv, etc.) and surface the actual error rather than failing silently
  • Record the previous version so a manual rollback is at least possible

Autumn0716 avatar Jul 30 '26 03:07 Autumn0716

I reproduced an update loop specific to source checkouts: repository deeptutor.egg-info can shadow installed package metadata, causing a virtualenv launch to be misclassified as pypi. The updater installs the newer wheel, but restart from the repository directory imports the checkout version again, so the About page keeps offering the same update.

I submitted #1186 to detect the actual imported package's Git checkout before enabling automatic PyPI updates. It includes a regression test and live API/UI verification.

dongyu-will avatar Sep 02 '26 09:09 dongyu-will

Implemented: Settings now has the version/update card, cached check, release excerpt, migration warning, admin toggle and an explicit update job backed by deeptutor/services/app_update.py and /api/system/update*. #1186 (2026-09-03) fixed the source-checkout misclassification that made the About page keep offering the same update. This can be closed.

Antonio-Faure avatar Oct 31 '26 13:10 Antonio-Faure