mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-18 03:49:50 -06:00
lazygit currently checks for updates only when the user presses `u` in the status panel. We want users to learn about a new release within a day. Check at startup if the last successful check is at least update.days ago, and change the default from 14 days to 1. Also check every hour whether a check is due, so that users who keep lazygit running for days get the check too. Do all of this on a worker, with a timeout. When a check finds a newer version, show "Update available" before the version in the bottom-right corner. Clicking it opens the update menu. After an update is installed, the note says "Restart to use <version>". The result of a check goes into state.yml, so a lazygit that starts later on the same day shows the note without asking GitHub again. For the same reason, other running instances see the result the next time they look at the file. Builds that can't check for updates, and users who set update.method to never, don't get any of this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>