github 2GT-Media-Group-LLC/mikrotik-manager v0.24.11-beta

pre-release5 hours ago

fix(firmware): stop offering an older release as an update (v0.24.11-beta)

For #144, where a device running 7.24.3 was told 7.24.2 was available. The
reporter's question was simply "how?".

Availability was decided in three places with the same test:

const available = !!latest && latest !== installed;

which reads "different" as "newer". Two of the three also trusted RouterOS's
own status line, and RouterOS says "New version is available" whenever its
channel carries a version the device is not running — including an older one.

It is not an exotic case. long-term trails stable by design, so any device
upgraded on stable and later pointed at long-term reports exactly this, for
ever. Reproduced on hardware: a switch on 7.24.3 against long-term reports
latest 7.23.7 with status "New version is available".

Versions are now compared as versions. rosVersion.ts parses the shapes
RouterOS actually uses — 7.24.3, 6.49.10, 7.25beta3, 7.16rc1, and a trailing
channel in parentheses — and orders a pre-release before the release it leads
to, since 7.25beta3 precedes 7.25. The device's status word is kept only as a
fallback for when a version cannot be read; trusting it over the numbers is
what produced the original nonsense. All three sites now share one function.

Two smaller things in the same report:

The blank channel was hardcoded. The device page pre-populates from stored
state, where no channel is kept, and presented that identically to a fresh
check — a synthesised status beside an empty channel, with nothing to say it
was last week's answer. It now says so and labels the channel "not checked
yet" rather than an empty dash implying there is none.

The status shown in that pre-populated view is derived from the stored flag,
so correcting the flag corrects the display.

Verified against the reported scenario end to end: the same device that
previously produced "installed 7.24.3, latest 7.24.2, New version is
available" now stores the flag as false, even though RouterOS itself reports
an update. 14 tests cover the comparator, including that a pre-release is not
an upgrade from its release and that unreadable versions compare as equal
rather than being guessed at.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com


Container image: ghcr.io/2gt-media-group-llc/mikrotik-manager:0.24.11-beta

Documentation: https://2gt-media-group-llc.github.io/mikrotik-manager/

Don't miss a new mikrotik-manager release

NewReleases is sending notifications on new releases.