8000 feat(updates): release check, backups and one-click upgrade through a machine agent by adeelahmad · Pull Request #260 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(updates): release check, backups and one-click upgrade through a machine agent - #260

Merged
adeelahmad merged 4 commits into
mainfrom
claude/project-thread-k36y5e
Oct 10, 2026
Merged

adeelahmad merged 4 commits into
mainfrom
claude/project-thread-k36y5e

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: Lens never said a new release was out, and upgrading meant running the install line again in a terminal. Backups existed only as lens backup.

After: Lens checks GitHub for the latest release once a day and the API reports it (GET /api/v1/admin/updates). POST /admin/updates/upgrade backs the database up, then has the machine install the release: install.sh now sets up a small upgrade agent (a systemd path unit on Linux, a launchd agent on a Mac) that watches <install>/.lens-control/inbox, reruns install.sh for that release and writes the status and log back, which the API shows while Lens restarts. Backups can be listed, taken, downloaded and deleted (/admin/backups). With no agent, the API gives the one line to run instead. The web app's banner and Settings page follow in their own PR.

How: app/domain/updates.py (check, agent hand-over, optional updates.auto_install, off by default), app/domain/backups.py, packaging/host/lens-upgrade.sh (accepts only a vX.Y.Z tag or the install's own branch), the control folder mounted as /control in Compose and microsandbox. __version__ was stuck at 0.3.0; it is now 0.6.0 and bumped by release.py. The Install workflow now drops an upgrade request and checks the agent installs it end to end.

Motivation and Context

Adeel asked for upgrade notifications plus backup and upgrade from the web app, so nobody has to see a terminal again. Docs: docs/updates.md.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XturGhybJzfgZvbFxfNB2o


Generated by Claude Code

… machine agent

Lens checks GitHub for a new release once a day, backs the database up and
installs a release from the API: install.sh sets up a small agent on the
machine (systemd path unit on Linux, launchd on a Mac) that watches
.lens-control/inbox, reruns install.sh for the requested release and writes
how it went back for the web app. Backups can be listed, taken, downloaded
and deleted. __version__ now follows releases.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XturGhybJzfgZvbFxfNB2o
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XturGhybJzfgZvbFxfNB2o
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XturGhybJzfgZvbFxfNB2o
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XturGhybJzfgZvbFxfNB2o
@adeelahmad
adeelahmad merged commit d4d12e6 into main Oct 10, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-k36y5e branch October 10, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0