feat(update): add self-update feature with Docker-based one-click updates#322
Merged
feat(update): add self-update feature with Docker-based one-click updates#322
Conversation
…ze range - Remove auto-save on drag-and-drop reorder; reordering now marks unsaved changes and requires the user to click Save Changes, consistent with other provider field edits - Fix index lookup in handleDrop to use formData instead of config.providers - Remove isReordering overlay and associated disabled-drag guards - Extend streaming cache max_size_gb slider range from 200 → 1000 GB Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ates - Add internal/version package with Version, GitCommit, Timestamp vars targeted by ldflags, replacing the unused main.* vars - Expose version/git_commit in /api/system/stats via getSystemInfo() - Add GET /api/system/update/status: queries GitHub releases/commits API to compare current vs latest version per channel (latest|dev) - Add POST /api/system/update/apply: pulls new Docker image via docker CLI and signals PID 1 (SIGTERM) to trigger container restart - Update Makefile ldflags to target internal/version package - Update Dockerfile to pass VERSION/COMMIT build args and install docker.io - Add optional /var/run/docker.sock mount to docker-compose.yml - Frontend: UpdateSection component with channel toggle, check/apply buttons, status display, and graceful warning when Docker socket is unavailable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n check Remove the self-update feature that required Docker socket access, which was unsafe in containerized environments. Replace with a simpler approach that queries the GitHub API to show the latest available version. - Remove handleApplyUpdate, performUpdate, isDockerAvailable, and all Docker socket/exec/syscall dependencies from update_handlers.go - Restore fetchLatestGitHubRelease and fetchLatestGitHubCommit helpers that compare against the running version/commit - Drop DockerAvailable, UpdateApplyRequest, UpdateApplyResponse from types - Remove POST /api/system/update/apply route from server - Remove applyUpdate() from API client and useApplyUpdate() hook - Update UpdateSection UI: remove "Update Now" button and Docker warning; show a "View on GitHub" link when an update is available Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No longer needed since the auto-update feature has been removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/versionpackage withVersion,GitCommit,Timestampvars set by ldflags, making version info available app-wide without threading through function argsversion/git_commitin the/api/system/statsresponse so the UI can display the running versionGET /api/system/update/status?channel=latest|dev— queries the GitHub releases/commits API and returns whether an update is availablePOST /api/system/update/apply— pulls the new Docker image viadockerCLI and sendsSIGTERMto PID 1 to trigger a container restart (requiresrestart: unless-stopped)internal/versioninstead of the unusedmain.*varsVERSION/COMMIT/BUILD_TIMESTAMPbuild args and installsdocker.ioin the final stage (provides thedockerCLI for auto-update)/var/run/docker.sockmount todocker-compose.yml(required for one-click updates)UpdateSectioncomponent added to Config → System with:Test plan
make build-cliand verify the binary reports a version via/api/system/statsGET /api/system/update/status?channel=latestreturns a valid response withcurrent_versionpopulatedGET /api/system/update/status?channel=devreturns latest commit SHA from GitHub🤖 Generated with Claude Code