fix: show version badge for all builds — bake pre-release sha into buildVersion#204
Open
xAlisher wants to merge 1 commit into
Open
fix: show version badge for all builds — bake pre-release sha into buildVersion#204xAlisher wants to merge 1 commit into
xAlisher wants to merge 1 commit into
Conversation
…ildVersion Fixes logos-co#203. `buildVersion` was always empty for master/pre-release builds because `flake.nix` only read the VERSION file (present only on release branches). The QML regex then never matched, so the badge added in logos-co#188 was invisible in every pre-release AppImage published since the merge. Two changes: - flake.nix: when no VERSION file is present, fall back to "pre-release-{sha7}" from self.rev (defined on clean CI checkouts, absent on dirty local builds which intentionally show nothing). - SidebarPanel.qml: replace the suffix regex with a plain non-empty check (same pattern already used in DashboardView.qml). Until 1.0 every build — stable, RC, or pre-release — benefits from being identifiable at a glance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Khushboo-dev-cpp
approved these changes
Jun 1, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes the version badge visibility for pre-release (master/CI) builds by ensuring a non-empty build version is baked into the build when VERSION is absent, and by updating the sidebar badge visibility logic to show whenever a version string is present.
Changes:
flake.nix: when./VERSIONis missing, derivebuildInfo.versionaspre-release-{sha7}fromself.rev(otherwise keep it empty).src/qml/panels/SidebarPanel.qml: show the version badge wheneverbackend.buildVersionis non-empty (instead of matching pre-release suffixes).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| flake.nix | Adds a self.rev-based fallback version string for non-release builds so LOGOS_BASECAMP_VERSION is populated on master/CI. |
| src/qml/panels/SidebarPanel.qml | Updates version badge visibility to a non-empty check so it renders for all builds with a baked version string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+64
to
+67
| // Version badge — shown for any build whose version string is | ||
| // non-empty (pre-release CI builds, RCs, and stable releases alike). | ||
| // Keeps screenshots and bug reports self-documenting. Hidden only for | ||
| // dirty local dev builds where no version is baked in. |
Comment on lines
+43
to
+47
| # VERSION is only present on release branches. On master (pre-release | ||
| # CI builds) there is no VERSION file, so fall back to a | ||
| # "pre-release-{sha7}" string derived from self.rev — available on | ||
| # every clean CI checkout. Dirty local builds lack self.rev and get | ||
| # an empty string, which hides the badge (intentional for dev). |
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.
Fixes #203.
What was broken
PR #188 added a version badge beneath the sidebar logo, but it has been hidden in every pre-release build since the merge.
SidebarPanel.qmltestedbackend.buildVersionagainst/-rc|-alpha|-beta|-dev/i, butbuildVersionis always""on master —flake.nixonly reads theVERSIONfile, which exists only onrelease/*branches. The regex was never reached.Changes
flake.nix— fall back topre-release-{sha7}fromself.revwhen noVERSIONfile is present.self.revis defined on every clean CI checkout; absent on dirty local builds, which intentionally show nothing:src/qml/panels/SidebarPanel.qml— replace the suffix regex with a plain non-empty check, consistent withDashboardView.qml. Until 1.0, every build (stable, RC, pre-release) benefits from being identifiable at a glance:Result
buildVersionpre-release-2576ef8-269(master CI)pre-release-2576ef80.1.2-RC3(release branch)0.1.2-RC30.1.2(stable release)0.1.2""