diff --git a/latentscope/__version__.py b/latentscope/__version__.py index 2b8877c..93b60a1 100644 --- a/latentscope/__version__.py +++ b/latentscope/__version__.py @@ -1 +1 @@ -__version__ = '0.5.0' +__version__ = '0.5.1' diff --git a/web/src/components/Explore/LeftPane.jsx b/web/src/components/Explore/LeftPane.jsx index 0adccbf..c2b6285 100644 --- a/web/src/components/Explore/LeftPane.jsx +++ b/web/src/components/Explore/LeftPane.jsx @@ -13,11 +13,13 @@ export default function LeftPane({ dataset, scope, scopes, tags, deletedIndices, apiService.fetchVersion().then(setLsVersion); }, []); - const isOutdatedScope = useMemo( - () => - scope && lsVersion && scope?.ls_version && compareVersions(scope?.ls_version, lsVersion) < 0, - [lsVersion, scope] - ); + const isOutdatedScope = useMemo(() => { + if (!scope?.ls_version || !lsVersion) return false; + // Convert versions to minor by replacing patch with 0 + const scopeMinor = scope.ls_version.replace(/(\d+\.\d+)\.\d+/, '$1.0'); + const lsMinor = lsVersion.replace(/(\d+\.\d+)\.\d+/, '$1.0'); + return compareVersions(scopeMinor, lsMinor) < 0; + }, [lsVersion, scope]); return (