feat(updates): add a manual update check next to the version - #869
Merged
Conversation
The release check only ran once per launch, and the manual re-check was reachable only from an unbound shortcut. A button beside the version number now runs it on demand: a refresh glyph while nothing is new, the green download arrow once an update is found.
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.
What
The release check ran once per app launch. If nothing was new, there was no visible way to ask again —
check_for_updates()existed but only behind an unbound keyboard shortcut.A small button now sits beside the version number in the sidebar header:
The button disables itself while a check runs, because every click starts its own
UpdateCheckWorkerthread.The green ⬇ Update Available: vX.Y.Z banner stays as it was — it names the version, the button is the control.
Changes
header.py—update_buttonnext tover_label,check_requestedsignal,set_update_state()/set_checking().session_panel.py— wires the signal to the existingcheck_for_updates(); both the startup and the manual path already route through_on_update_checked, so the button follows both.tooltip_with_shortcut("Check for updates", "check_for_updates"), so a key the user assigns shows up there. The registry entry already existed.docs/USER_GUIDE.md— §2 header and §15 Updating NegPy.Tests
3 new tests in
tests/test_session_panel.py: the button starts a check and locks out a second one, it returns to the check state when nothing is new, and it offers the update once one is found.make allgreen — 4214 passed, lint and ty clean.