mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-11 16:36:32 +02:00
isNewer() compared versions component-wise after Number(), so a version
string it could not parse produced NaN, every NaN comparison returned
false, and the scan fell through to the next component. A daemon built
from source reporting the ldflags default "dev" therefore matched
isNewer("v0.4.20", "dev") === true, and the runtimes page offered an
upgrade for a version it had never read. A `git describe` version
("v0.4.17-12-gabc1234") took the opposite branch and hid the button.
Same class of build, opposite behaviour, both by accident.
Parse strictly instead: exactly three all-digit components, mirroring
IsReleaseVersion in server/internal/cli/update.go, which is how the
daemon's own auto-update loop decides the same question. An unparseable
version on either side now compares as "no update available".
"Latest" would be equally unfounded for those builds, so surface a
neutral "Local build" label instead of picking one of two claims we
cannot make. A server-triggered update is legitimate because a human
made an informed decision; that decision has to rest on something we
actually parsed.
Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>