Skip to content

feat: add version tracking, Nix packaging, and auto-update foundation#26

Merged
flexiondotorg merged 4 commits intomainfrom
build
Mar 23, 2026
Merged

feat: add version tracking, Nix packaging, and auto-update foundation#26
flexiondotorg merged 4 commits intomainfrom
build

Conversation

@flexiondotorg
Copy link
Copy Markdown
Member

Summary

Establish canonical version source in package.json with validation across build system and CI. Create Nix flake outputs for reproducible builds on Linux and macOS. Document and plan electron-updater implementation for AppImage/NSIS auto-updates. Add GitHub Sponsors tiers. Extend README with platform-specific installation instructions.

Changes

  • Establish package.json as canonical version source with validation in justfile, CI/workflow, and startup logging
  • Create Nix flake outputs for Linux (AppImage) and macOS (DMG/unsigned) with automated hash updates via CI
  • Implement automatic version check with tray integration and update notifications
  • Add comprehensive documentation and implementation plan for AppImage/NSIS auto-updates with electron-updater
  • Document GitHub Sponsors with three tiers (Supporter, Studio, Enterprise)
  • Add Install section to README with platform-specific instructions and security bypass notes for testing builds
  • Extend i18n translations for update notifications and tray messages

Testing

  • Verify version in package.json reflects startup logs and tray status
  • Test auto-update check triggers on schedule and tray click
  • Validate Nix builds for Linux and macOS produce expected artifacts
  • Confirm update documentation is comprehensive and accurate

- justfile: auto-bump package.json on release if tag mismatch, stamp
  with dev version on build
- ci: validate package.json matches git tag on tag pushes, skip jobs if
  version gate fails
- logging: add startup log with app name and version from package.json

Centralises version truth in package.json, with CI validation and local
dev stamping to keep all version sources in sync.

Signed-off-by: Martin Wimpress <code@wimpress.io>
… docs

Add Nix flake outputs for Linux (buildFHSEnv with vendored Electron) and
macOS (DMG installer fetcher) to enable system package management.
Introduce version-gate CI job to validate package.json version matches
git tags, and nix-hash job to compute and update package hashes after
release. Update builder workflow to remove redundant version stamping
from build job.

Add Install section to README with platform-specific instructions and
Nix examples. Include unsigned binary security bypass guidance for macOS
Gatekeeper and Windows SmartScreen. Add sponsor goal CTA.

Signed-off-by: Martin Wimpress <code@wimpress.io>
- Add src/update.ts with GitHub API version checking and semver
  comparison
- Gate notifications on existing notifications toggle setting
- Integrate update status into tray menu with conditional items
- Add update notification strings for 33 languages in i18n.ts
- Trigger version check 5 seconds after app startup in main.ts

Signed-off-by: Martin Wimpress <code@wimpress.io>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 issues found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="README.md">

<violation number="1" location="README.md:64">
P2: The RPM install command is incorrect for openSUSE: `dnf` is Fedora-specific. Split Fedora and openSUSE instructions (or use the correct openSUSE command) so users on openSUSE can install successfully.</violation>
</file>

<file name="justfile">

<violation number="1" location="justfile:169">
P2: `git commit` here can accidentally include unrelated staged changes. Restrict the commit to the version files so release automation doesn't sweep in pre-staged work.</violation>
</file>

<file name="nix/linux.nix">

<violation number="1" location="nix/linux.nix:68">
P1: Disable fixup/strip for the unpacked deb payload; otherwise post-install phases can still mutate the signed binary.</violation>
</file>

<file name="src/tray.ts">

<violation number="1" location="src/tray.ts:142">
P2: Validate `update.url` before calling `shell.openExternal` to avoid opening unexpected URI schemes from remote data.</violation>
</file>

<file name=".github/workflows/builder.yml">

<violation number="1" location=".github/workflows/builder.yml:232">
P1: Artifact filename includes the `v` prefix from the tag, but electron-builder produces filenames using the version from `package.json` (no `v` prefix). These URLs will 404, breaking the entire nix-hash job.

Split the tag and the bare version so the download path uses the tag (`v0.2.2`) and the filename uses the bare version (`0.2.2`).</violation>
</file>

<file name="src/update.ts">

<violation number="1" location="src/update.ts:61">
P1: Normalise GitHub `tag_name` before comparing versions; a `v`-prefixed tag makes `isNewer` fail and can prevent update detection.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Strip v-prefix from GitHub release tags before version comparison to
  prevent silent failure if API includes prefix
- Validate update URL protocol (https/http only) before opening in
  browser to prevent unintended handler execution
- Add dontFixup=true to Nix Linux build to prevent strip/patchelf
  breaking VMP-signed Electron binary
- Scope release commit in justfile to package.json and package-lock.json
  only, preventing accidental staging of unrelated files
- Document separate installation paths for Fedora (dnf) and openSUSE
  (zypper)
- Add autoUpdate.enabled to configuration schema documentation

Signed-off-by: Martin Wimpress <code@wimpress.io>
@flexiondotorg flexiondotorg merged commit 794e15c into main Mar 23, 2026
11 checks passed
@flexiondotorg flexiondotorg deleted the build branch March 23, 2026 14:17
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