Repository navigation
Show a new version without an Update button when self-update is off - #56
Merged
Merged
Conversation
WINDLASS_NO_SELF_UPDATE, and any non-Linux build, made Apply refuse, but Check said nothing about it. So a container install, where the image sets the flag, was shown an Update now button that could only fail (#32). GET /system/update now returns apply_supported, worked out by the same check Apply uses, so the two cannot disagree. When it is false the Settings card still shows the new version, explains that this install updates by pulling the image or replacing the binary, and offers no button. The sidebar notice stays, since knowing a release exists is still useful. POST /system/update keeps refusing with 400 as before. Fixes #32 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 this changes
WINDLASS_NO_SELF_UPDATEmadeApplyrefuse, butChecknever said so. A container install, where the image sets the flag, saw "Update available" and an Update now button that could only ever fail (#32). The same was true of any non-Linux build.internal/update/update.gohas onesupported()check.Applyuses it to refuse, as before, andCheckreports it asapply_supportedonGET /system/update, so the button and the server cannot disagree.apply_supportedis false it explains that this install updates by pulling the new image or replacing the binary, and shows no button.POST /system/updateis unchanged and still answers 400not_supported, so the server stays the real check.api/openapi.yamlanddocs/configuration.mddescribe the new field and what the flag now does in the UI.How it was verified
internal/update/update_test.gostubs the GitHub release call. The twoChecktests failed onmain(apply_supported = <nil>) and pass now. A third test confirmsApplystill refuses with the flag set and never restarts.apply_supported: trueand the card showed one Update now button. WithWINDLASS_NO_SELF_UPDATE=1it returnedfalse, the card showed the version and the explanation with no button, and a POST still got 400not_supported. Checked in headless Chromium by visible text and button count.go vet ./...,go test ./...,npm run build(typecheck included) andnpm test(23 of 23) pass.Fixes #32
🤖 Generated with Claude Code