Skip to content

Add version display and manual update checker - #17

Merged
TheZeekA merged 1 commit into
mainfrom
testing
Aug 2, 2026
Merged

TheZeekA merged 1 commit into
mainfrom
testing

Conversation

@TheZeekA

@TheZeekA TheZeekA commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Adds a version label at the bottom-right of the window. Clicking it checks the latest GitHub release; if newer, shows release notes in a modal with an explicit "Update Now" button. Nothing downloads or applies automatically - matches the discussion on issue-adjacent design questions (manual check, confirmed apply).

Update mechanism: download to temp -> verify SHA-256 against the checksum published in the release notes (aborts if mismatched) -> rename the running exe aside -> move the verified exe into place -> spawn it -> exit. Works the same for portable-exe and MSI-installed setups since both just put ZeeCrypt.exe in a normal per-user-writable folder.

Caveats, please read before merging/testing:

  • This is the riskiest code from this session - it replaces its own running executable. I have no C compiler in this environment, so none of this has been built or run, only checked for Go syntax validity (gofmt) and manually traced against the giu library's actual source for API correctness.
  • The right-aligned label positioning is hand-rolled (mirrors giu's own AlignRight math, since Align() has a documented bug that skips Selectable widgets) - visually unverified, may need pixel tweaks once you actually see it rendered.
  • The release-notes text currently shown will just be checksums for existing releases, since build-windows.yml's release body doesn't currently include real changelog content - only checksums. Worth a follow-up to enrich that if you want nicer in-app release notes.
  • Please actually test the full update flow end-to-end (ideally against a real newer release) before trusting this in production - test both a successful update and a deliberately-corrupted-checksum failure path.

Shows the current version right-aligned at the bottom of the window,
matching giu's own Align(AlignRight) math applied by hand (Align has
a documented bug that skips Selectable, so it can't be used directly
for a clickable label).

Clicking it checks the latest GitHub release. If newer, a modal shows
the release notes and an "Update Now" button - nothing is downloaded
or applied without that explicit click. Update flow:
1. Download the new exe to a temp file
2. Verify its SHA-256 against the checksum published in the release
   notes; abort if it doesn't match
3. Rename the running exe aside (Windows allows renaming an exe out
   from under itself, unlike overwriting it), move the verified exe
   into place, spawn it as a new process, then exit
4. Any leftover .old file from a previous update is cleaned up on the
   next launch

No automatic/background checking - matches Picocrypt's original
"zero network requests" stance except when the user explicitly clicks
to check, which is now documented in the README's Security section.
@TheZeekA
TheZeekA merged commit 2ebf0b8 into main Aug 2, 2026
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.

1 participant