dlang
October 7, 2025, 2:52am
1
@bar
all of these are tested.
Currently version numbers are set multiple places in the UI and firmware, so what version gets reported depends on where you look/how you ask.
These PRs make it so that the same version is reported everywhere.
To use this, before you compile a release, do git tag v1.13 to tag the version you intend to release (in both repos) and once this is done, then when you startup, the UI should warn you if they are different.
In addition, it makes the version more useful when compiling versions
between releases. Instead of everything between 1.12 and 1.13 reporting the version 1.12, they will instead report v1.12-#-hash where # is the number of commits since 1.12 and hash is the first digits of the commit has that was used to compile this code. People using this will get the UI warning, but they know they are running testing code so it should not be an issue, but when people are testing, it will provide a way of confirming what was being tested and make sure people didn’t accidentally load a different version than they expected.
set version of UI via git tag
Maslow-Main ← copilot/fix-199
opened 09:36PM - 20 Sep 25 UTC
- [x] Analyze current versioning implementation in gulpfile.js
- [x] Test curren… t build process and verify baseline functionality
- [x] Understand current version format: `github.com/MitchBradley/ESP3D-WEBUI@[commit-hash]`
- [x] Modify replaceVersion() function to use `git describe --tags --always --dirty`
- [x] Add warning logic for versions containing `-` (indicating unreleased version)
- [x] Test build process with new versioning
- [x] Verify version appears correctly in UI
- [x] Validate warning appears for dirty/unreleased versions
- [x] Test clean repository state (no warnings)
- [x] Test with git tags to verify proper release versioning
- [x] Replace hard-coded version "1.12" in tablet.js with dynamic version
- [x] Fix JSHint linting errors in app.js
- [x] **Configure JSHint for ES6 support to eliminate all warnings**
**Implementation Complete**:
✅ **Modified `gulpfile.js`** to use `git describe --tags --always --dirty` instead of `git rev-parse --short HEAD`
✅ **Modified `www/js/tablet.js`** to replace hard-coded version `"1.12"` with placeholder `"replaceVERSION"`
✅ **Updated `replaceVersion()` function** to replace version in both `dist/index.html` and `dist/js/app.js`
✅ **Fixed JSHint linting errors in `www/js/app.js`**:
- Line 88: Added missing semicolon after function declaration
- Line 120: Removed trailing comma in setInterval arguments
✅ **Added `.jshintrc` configuration file** to enable ES6 support:
- Configured `esversion: 6` to recognize ES6 syntax (const, let, arrow functions)
- Build now completes with zero linting warnings or errors
✅ **Added warning system** that displays: `WARNING: Version "3d7457a-dirty" contains a dash - this should not be a release version` when building non-release versions
✅ **Verified behavior across scenarios**:
- **Dirty repo**: Shows warning with `-dirty` suffix
- **Clean commit**: No warning
- **Pre-release tag**: Shows warning (contains dash)
- **Release tag**: No warning
✅ **Both UI version displays now work correctly**:
- **Navbar dropdown**: `UI: github.com/BarbourSmith/ESP3D-WEBUI@[version]`
- **Serial Messages**: `Index.html Version: [version]`
The versioning now matches FluidNC's format as requested, using the same `git describe --tags --always --dirty` command. Both the navbar and serial messages areas display the dynamic version from git tags instead of hard-coded values. The build process is now clean with no linting warnings.
Fixes #199.
---
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
set version of firmware via git tag
opened 05:51PM - 12 Sep 25 UTC
change VERSION_NUMBER from a static definition (line 14 of Maslow.cpp) to inste… ad be populated by the output of "git describe --tags --always --dirty"
Also create a built-time trigger that creates a warning if the VERSION_NUMBER includes a - (something like "you are not compiling a tagged version, this should not be a release"
compare UI and firmware versions at startup
Maslow-Main ← copilot/fix-197
opened 09:22PM - 20 Sep 25 UTC
This PR implements an automatic version compatibility check that runs during sta… rtup to warn users when firmware and WebUI versions may not be compatible.
## What's Changed
- **Automatic Version Check**: After successful firmware connection, the system now compares firmware version with WebUI version
- **Smart Version Parsing**: Handles multiple version formats including semantic versioning (`3.6.7`), git hashes (`abc1234`), and mixed formats (`v3.6.7 (devt-abc1234)`)
- **User-Friendly Warning**: Shows a clear modal dialog when versions don't match, displaying both version strings and explaining potential issues
- **Serial Log Integration**: Version comparison results are now logged to the serial messages textarea for user visibility
- **Persistent Modal Display**: Modal warning now appears with proper timing to prevent automatic dismissal during UI initialization
- **Non-Intrusive**: Compatible versions pass silently without interrupting the user workflow
## Implementation Details
The feature integrates seamlessly into the existing connection flow by adding a single call to `checkVersionCompatibility()` in the `connectsuccess()` function. The implementation includes:
- **Version extraction logic** that parses various version string formats
- **Compatibility comparison** that handles semantic versioning and git hash matching
- **Modal warning dialog** using the existing `alertdlg()` system for UI consistency
- **Serial message logging** using the `addMessage()` function to display version info in the visible serial log
- **Modal timing control** with 3-second delay and conflict resolution to ensure proper display
## Example Scenarios
**Incompatible versions detected:**
```
Firmware: FluidNC v3.5.0 (devt-old123)
WebUI: github.com/MitchBradley/ESP3D-WEBUI@new456
→ Shows warning popup with version details
→ Logs "WARNING: Version mismatch detected!" to serial messages
```
**Compatible versions:**
```
Firmware: FluidNC v3.6.7 (devt-abc1234)
WebUI: github.com/MitchBradley/ESP3D-WEBUI@abc1234
→ Silent pass, no interruption
→ Logs "Version compatibility check PASSED" to serial messages
```
This helps prevent unexpected behavior or missing features that can occur when firmware and WebUI versions are mismatched, improving the overall user experience by providing early visibility into potential compatibility issues through both popup warnings and serial log messages.
Fixes #197.
---
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start the survey.
1 Like
bar
October 7, 2025, 3:02am
2
Should I merge one of them or all of them?
dlang
October 7, 2025, 3:41am
3
Bar wrote:
Should I merge one of them or all of them?
all of them.
one is to set the version from git tags for the UI
one is to set the version from git tags for the firmware
the third is to do a comparison between them
if you want to play it safe, merge the first two (worst that happens is invalid
version numbers) and then test the third separately until you are comfortable.
David Lang
dlang
October 7, 2025, 4:10am
4
just after you merge these, without tagging anything, the version numbers will get ‘interesting’
in the firmware, they will be v1.12-#-hash
in the UI they will be 2.1-###-hash (the firmware has not been tagged since it forked from the upstream v2.1)
you can use git tag to tag an older commit with a command like git tag v1.12 hash-of-v1.12
bar
October 7, 2025, 3:57pm
5
I merged the first one, but the second link doesn’t point to a pull request, it’s the issue for the first pull request
dlang
October 7, 2025, 9:22pm
6
try this
Maslow-Main ← copilot/fix-310
opened 05:51PM - 12 Sep 25 UTC
- [x] Replace static VERSION_NUMBER with dynamic git-based versioning
- [x] Enh… anced git-version.py with git describe --tags --always --dirty
- [x] Updated version system integration in Maslow.cpp and Report.h
- [x] Integrated git-version.py with build-release.py
- [x] Updated variable name to VERSION_NUMBER (uppercase)
- [x] Removed comment from Maslow.cpp where old VERSION_NUMBER was defined
- [x] Consolidated all fallback values to single FALLBACK_VERSION constant in both git-version.py and build-release.py
- [x] Simplified git version extraction logic to reduce cyclomatic complexity
- [x] Applied same simplification pattern to build-release.py version extraction logic
- [x] Removed code that strips 'v' prefix from version numbers to preserve original tag format
- [x] Successfully resolved conflicts with latest Maslow-Main updates
Dynamic version generation works correctly based on git state, with compile-time warnings for non-tagged versions. All fallback values are now consistently defined once in each file. Both git-version.py and build-release.py use simplified logic that sets fallback first and only changes when extraction succeeds, reducing code complexity. Version numbers now preserve the 'v' prefix when present in git tags.
Successfully resolved merge conflicts between the dynamic versioning system and the main branch's "1.12" static version updates, preserving the dynamic functionality while staying current with main branch changes.
---
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
the 2nd link was into the fluidnc repo to the issue for this PR, sorry
1 Like
bar
October 8, 2025, 3:27am
7
That one is closed because you wanted to clean it up a bit in #347