Files
alexei.dolgolyov 382a42755d feat: add auto-update system with release checking, notification UI, and install-type-aware apply
- Abstract ReleaseProvider interface (Gitea impl, swappable for GitHub/GitLab)
- Background UpdateService with periodic checks, debounce, dismissed version persistence
- Install type detection (installer/portable/docker/dev) with platform-aware asset matching
- Download with progress events, silent NSIS reinstall, portable ZIP/tarball swap scripts
- Version badge pulse animation, dismissible banner with icon buttons, Settings > Updates tab
- Single source of truth: pyproject.toml version via importlib.metadata, CI stamps tag with sed
- API: GET/POST status, check, dismiss, apply, GET/PUT settings
- i18n: en, ru, zh (27+ keys each)
2026-03-25 13:16:18 +03:00

1.2 KiB

Auto-Update Phase 1: Check & Notify

Backend

  • Add packaging to pyproject.toml dependencies
  • Create core/update/__init__.py
  • Create core/update/release_provider.py — ABC + data models
  • Create core/update/gitea_provider.py — Gitea REST API implementation
  • Create core/update/version_check.py — semver normalization + comparison
  • Create core/update/update_service.py — background service + state machine
  • Create api/schemas/update.py — Pydantic request/response models
  • Create api/routes/update.py — REST endpoints
  • Wire into api/__init__.py, dependencies.py, main.py

Frontend

  • Add update banner HTML to index.html
  • Add Updates tab to settings.html
  • Add has-update CSS styles for version badge in layout.css
  • Add update banner CSS styles in components.css
  • Create features/update.ts — update check/settings/banner logic
  • Wire exports in app.ts
  • Add i18n keys to en.json, ru.json, zh.json

Verification

  • Lint check: ruff check src/ tests/ --fix
  • TypeScript check: npx tsc --noEmit && npm run build
  • Tests pass: py -3.13 -m pytest tests/ --no-cov -q