Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: remove new release reminder modal and logic (#20346)

Danny Xuc61f313c8184
diff --git a/frontend/src/components/ReleaseRemindModal.vue b/frontend/src/components/ReleaseRemindModal.vue
deleted file mode 100644
index 1035417352..0000000000
--- a/frontend/src/components/ReleaseRemindModal.vue
+++ /dev/null
@@ -1,58 +0,0 @@
-<template>
- <BBModal :title="$t('remind.release.new-version-available')" @close="onClose">
- <div class="w-xl max-w-[calc(100vw-4rem)]">
- <div>
- <p class="whitespace-pre-wrap">
- <i18n-t keypath="remind.release.new-version-content">
- <template #tag>
- <a
- class="font-bold underline"
- target="_blank"
- :href="actuatorStore.releaseInfo.latest?.html_url"
- >
- {{ actuatorStore.releaseInfo.latest?.tag_name }}
- </a>
- </template>
- </i18n-t>
- </p>
- </div>
- <div class="mt-7 flex justify-end gap-x-2">
- <NButton @click="onClose">
- {{ $t("common.dismiss") }}
- </NButton>
- <NButton type="primary" @click="onClick">
- {{ $t("common.learn-more") }}
- </NButton>
- </div>
- </div>
- </BBModal>
-</template>
-
-<script lang="ts" setup>
-import { NButton } from "naive-ui";
-import { computed } from "vue";
-import { BBModal } from "@/bbkit";
-import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";
-
-const emit = defineEmits(["cancel"]);
-
-const actuatorStore = useActuatorV1Store();
-const subscriptionStore = useSubscriptionV1Store();
-
-const link = computed(() => {
- if (subscriptionStore.isSelfHostLicense) {
- return "https://docs.bytebase.com/get-started/self-host-vs-cloud";
- }
- return subscriptionStore.purchaseLicenseUrl;
-});
-
-const onClick = () => {
- window.open(link.value, "_blank");
- onClose();
-};
-
-const onClose = () => {
- actuatorStore.releaseInfo.ignoreRemindModalTillNextRelease = true;
- emit("cancel");
-};
-</script>
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index b60c46c1a6..2eaeb29155 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -41,11 +41,6 @@
</teleport>
<AgentWindowMount />
-
- <ReleaseRemindModal
- v-if="showReleaseModal && route.name !== WORKSPACE_ROOT_MODULE"
- @cancel="showReleaseModal = false"
- />
</template>
<script lang="ts" setup>
@@ -53,24 +48,15 @@ import { useWindowSize } from "@vueuse/core";
import { computed, onMounted, onUnmounted, ref, shallowRef, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import AgentWindowMount from "@/components/AgentWindowMount.vue";
-import ReleaseRemindModal from "@/components/ReleaseRemindModal.vue";
import { t } from "@/plugins/i18n";
import type { DashboardShellTargets } from "@/react/dashboard-shell";
import ReactPageMount from "@/react/ReactPageMount.vue";
import { WORKSPACE_ROOT_MODULE } from "@/router/dashboard/workspaceRoutes";
-import {
- pushNotification,
- useActuatorV1Store,
- usePermissionStore,
- useSubscriptionV1Store,
-} from "@/store";
-import { PresetRoleType } from "@/types";
-import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
+import { pushNotification, useActuatorV1Store } from "@/store";
+
import { provideBodyLayoutContext } from "./common";
const actuatorStore = useActuatorV1Store();
-const permissionStore = usePermissionStore();
-const subscriptionStore = useSubscriptionV1Store();
const route = useRoute();
const router = useRouter();
const { width: windowWidth } = useWindowSize();
@@ -83,7 +69,6 @@ const shellTargets = shallowRef<DashboardShellTargets>({
mainContainer: null,
});
const mainContainerRef = ref<HTMLDivElement>();
-const showReleaseModal = ref(false);
const routePermissionTarget = shallowRef<HTMLDivElement | null>(null);
const isRootPath = computed(() => {
@@ -119,16 +104,6 @@ watch(
{ flush: "sync" }
);
-actuatorStore.tryToRemindRelease().then((openRemindModal) => {
- if (
- subscriptionStore.currentPlan === PlanType.ENTERPRISE &&
- !permissionStore.currentRolesInWorkspace.has(PresetRoleType.WORKSPACE_ADMIN)
- ) {
- return;
- }
- showReleaseModal.value = openRemindModal;
-});
-
const refreshRemindTimer = ref<ReturnType<typeof setTimeout>>();
onMounted(async () => {
const remind = await actuatorStore.tryToRemindRefresh();
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index c433b77cb9..3a4f8dbc34 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1240,14 +1240,7 @@
}
},
"landing": {
- "changelog-for-version": "Changelog for {version}",
- "last-visit": "Last visit",
- "quick-link": {
- "manage": "Manage quick link",
- "self": "Quick Link",
- "visit-issues": "Visit Issues",
- "visit-prjects": "Visit Projects"
- }
+ "quick-link": {}
},
"masking": {
"reason": {
@@ -1640,11 +1633,6 @@
"view-all-files": "View all files"
},
"remind": {
- "release": {
- "new-version-available": "New version is available",
- "new-version-available-with-tag": "New version {tag} is available",
- "new-version-content": "The new version {tag} is available now! Please check our docs for installation."
- },
"role-expire": {
"checkbox": "Do not remind until any updates",
"content": "Your following roles are going to expire",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 91d16e095a..e73e46cc1e 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1240,14 +1240,7 @@
}
},
"landing": {
- "changelog-for-version": "Registro de cambios para {version}",
- "last-visit": "Última visita",
- "quick-link": {
- "manage": "Administrar enlace rápido",
- "self": "Enlace rápido",
- "visit-issues": "Problemas de visita",
- "visit-prjects": "Visitar Proyectos"
- }
+ "quick-link": {}
},
"masking": {
"reason": {
@@ -1640,11 +1633,6 @@
"view-all-files": "Ver todos los archivos"
},
"remind": {
- "release": {
- "new-version-available": "Nueva versión disponible",
- "new-version-available-with-tag": "La nueva versión {tag} está disponible",
- "new-version-content": "¡La nueva versión {tag} está disponible ahora! Consulte nuestra documentación para la instalación."
- },
"role-expire": {
"checkbox": "No recordar hasta que haya actualizaciones",
"content": "Tus siguientes roles expirarán",
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index f92a3f5743..5d4e619ca8 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1240,14 +1240,7 @@
}
},
"landing": {
- "changelog-for-version": "{version} の変更履歴",
- "last-visit": "最終訪問",
- "quick-link": {
- "manage": "クイックリンクを管理する",
- "self": "クイックリンク",
- "visit-issues": "イシューを開く",
- "visit-prjects": "プロジェクトを開く"
- }
+ "quick-link": {}
},
"masking": {
"reason": {
@@ -1640,11 +1633,6 @@
"view-all-files": "すべてのファイルを表示"
},
"remind": {
- "release": {
- "new-version-available": "新しいバージョンが利用可能です",
- "new-version-available-with-tag": "新しいバージョン {tag} が利用可能です",
- "new-version-content": "新しいバージョン {tag} が正式にリリースされました。新しいバージョンを入手するには、ドキュメントに従ってください。"
- },
"role-expire": {
"checkbox": "更新があるまで通知しない",
"content": "次のロールは期限切れになります",
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 9f1ee8387c..28e6b4b5ea 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1240,14 +1240,7 @@
}
},
"landing": {
- "changelog-for-version": "Nhật ký thay đổi cho phiên bản {version}",
- "last-visit": "Lần truy cập cuối",
- "quick-link": {
- "manage": "Quản lý liên kết nhanh",
- "self": "Liên kết nhanh",
- "visit-issues": "Truy cập Vấn đề",
- "visit-prjects": "Truy cập Dự án"
- }
+ "quick-link": {}
},
"masking": {
"reason": {
@@ -1640,11 +1633,6 @@
"view-all-files": "Xem tất cả các tập tin"
},
"remind": {
- "release": {
- "new-version-available": "Phiên bản mới có sẵn",
- "new-version-available-with-tag": "Phiên bản mới {tag} có sẵn",
- "new-version-content": "Phiên bản mới {tag} hiện đã có! Vui lòng xem tài liệu của chúng tôi để cài đặt."
- },
"role-expire": {
"checkbox": "Không nhắc nhở cho đến khi có bất kỳ cập nhật nào",
"content": "Các vai trò sau của bạn sắp hết hạn",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 70223e4c3c..cb1ca07db8 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1240,14 +1240,7 @@
}
},
"landing": {
- "changelog-for-version": "{version} 的更新日志",
- "last-visit": "上次访问",
- "quick-link": {
- "manage": "管理快捷访问",
- "self": "快捷访问",
- "visit-issues": "访问工单",
- "visit-prjects": "访问项目"
- }
+ "quick-link": {}
},
"masking": {
"reason": {
@@ -1640,11 +1633,6 @@
"view-all-files": "查看全部文件"
},
"remind": {
- "release": {
- "new-version-available": "有新版本可更新",
- "new-version-available-with-tag": "新版本 {tag} 已推出",
- "new-version-content": "新版本 {tag} 正式发布!请根据我们的文档来获取新版本。"
- },
"role-expire": {
"checkbox": "直到有更新再提醒",
"content": "您的角色即将到期",
diff --git a/frontend/src/react/components/header/VersionMenuItem.test.tsx b/frontend/src/react/components/header/VersionMenuItem.test.tsx
index 96b49a6fc4..59e18daa15 100644
--- a/frontend/src/react/components/header/VersionMenuItem.test.tsx
+++ b/frontend/src/react/components/header/VersionMenuItem.test.tsx
@@ -4,7 +4,6 @@ import { createRoot } from "react-dom/client";
import { beforeEach, describe, expect, test, vi } from "vitest";
import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/react/router";
import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
-import { STORAGE_KEY_RELEASE } from "@/utils/storage-keys";
(
globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }
@@ -152,47 +151,6 @@ describe("VersionMenuItem", () => {
unmount();
});
- test("opens the release dialog and learn-more link for new releases", () => {
- localStorage.setItem(
- STORAGE_KEY_RELEASE,
- JSON.stringify({
- latest: {
- tag_name: "2.0.0",
- html_url: "https://example.com/release",
- },
- ignoreRemindModalTillNextRelease: false,
- nextCheckTs: 0,
- })
- );
- const { container, render, unmount } = renderIntoContainer(
- <VersionMenuItem onCloseMenu={mocks.closeMenu} />
- );
- render();
-
- const versionButton = Array.from(container.querySelectorAll("button")).find(
- (button) => button.textContent?.includes("v1.0.0")
- );
- act(() => {
- versionButton?.click();
- });
-
- expect(container.textContent).toContain("New version 2.0.0");
- expect(mocks.closeMenu).toHaveBeenCalled();
-
- const learnMoreButton = Array.from(
- container.querySelectorAll("button")
- ).find((button) => button.textContent?.includes("Learn more"));
- act(() => {
- learnMoreButton?.click();
- });
-
- expect(window.open).toHaveBeenCalledWith(
- "https://example.com/release",
- "_blank"
- );
- unmount();
- });
-
test("hides version info in SaaS/cloud mode", () => {
mocks.serverInfo = {
version: "1.0.0",
diff --git a/frontend/src/react/components/header/VersionMenuItem.tsx b/frontend/src/react/components/header/VersionMenuItem.tsx
index ae7be3e8d5..38c6655ddf 100644
--- a/frontend/src/react/components/header/VersionMenuItem.tsx
+++ b/frontend/src/react/components/header/VersionMenuItem.tsx
@@ -1,15 +1,6 @@
-import { Volume2 } from "lucide-react";
-import { useMemo, useState } from "react";
+import { useMemo } from "react";
import { useTranslation } from "react-i18next";
-import semver from "semver";
import { Badge } from "@/react/components/ui/badge";
-import { Button } from "@/react/components/ui/button";
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogTitle,
-} from "@/react/components/ui/dialog";
import {
useServerInfo,
useSubscription,
@@ -19,35 +10,7 @@ import {
SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,
useNavigate,
} from "@/react/router";
-import type { ReleaseInfo } from "@/types/actuator";
import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";
-import { STORAGE_KEY_RELEASE } from "@/utils/storage-keys";
-
-function readReleaseInfo(): ReleaseInfo {
- try {
- const raw = localStorage.getItem(STORAGE_KEY_RELEASE);
- return raw
- ? (JSON.parse(raw) as ReleaseInfo)
- : {
- ignoreRemindModalTillNextRelease: false,
- nextCheckTs: 0,
- };
- } catch {
- return {
- ignoreRemindModalTillNextRelease: false,
- nextCheckTs: 0,
- };
- }
-}
-
-function hasNewerRelease(latest: string | undefined, current: string) {
- if (!latest) return false;
- if (current === "development") return true;
- const latestVersion = semver.coerce(latest);
- const currentVersion = semver.coerce(current);
- if (!latestVersion || !currentVersion) return false;
- return semver.gt(latestVersion, currentVersion);
-}
export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {
const { t } = useTranslation();
@@ -55,14 +18,11 @@ export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {
const { subscription } = useSubscription();
const canManageSettings = useWorkspacePermission("bb.settings.set");
const navigate = useNavigate();
- const [dialogOpen, setDialogOpen] = useState(false);
- const releaseInfo = useMemo(readReleaseInfo, []);
const version = serverInfo?.version ?? "";
const gitCommitBE = serverInfo?.gitCommit || "unknown";
const gitCommitFE = import.meta.env.GIT_COMMIT || "unknown";
const currentPlan = subscription?.plan ?? PlanType.FREE;
- const hasNewRelease = hasNewerRelease(releaseInfo.latest?.tag_name, version);
const planLabel = useMemo(() => {
switch (currentPlan) {
@@ -82,13 +42,6 @@ export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {
return version || "unknown";
}, [version]);
- const isSelfHostLicense =
- import.meta.env.MODE.toLowerCase() !== "release-aws";
- const purchaseLicenseUrl = import.meta.env.BB_PURCHASE_LICENSE_URL as string;
- const releaseLink = isSelfHostLicense
- ? "https://docs.bytebase.com/get-started/self-host-vs-cloud"
- : purchaseLicenseUrl;
-
return (
<>
<div className="px-3 py-2">
@@ -115,23 +68,11 @@ export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {
{!serverInfo?.saas ? (
<>
- <button
- type="button"
- className="flex w-full items-center justify-between gap-x-2 rounded-sm px-0 py-1 text-left text-sm text-control hover:text-accent"
- onClick={() => {
- if (hasNewRelease) {
- onCloseMenu();
- setDialogOpen(true);
- }
- }}
- >
+ <div className="flex w-full items-center justify-between gap-x-2 rounded-sm px-0 py-1 text-left text-sm text-control">
<span className="flex items-center gap-x-2">
- {hasNewRelease ? (
- <Volume2 className="h-4 w-4 text-success" />
- ) : null}
{formattedVersion}
</span>
- </button>
+ </div>
<div className="mt-1 text-xs text-control-light">
<div>BE Git hash: {gitCommitBE.slice(0, 7)}</div>
@@ -140,35 +81,6 @@ export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {
</>
) : null}
</div>
-
- <Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
- <DialogContent className="max-w-lg p-6">
- <DialogTitle>
- {t("remind.release.new-version-available-with-tag", {
- tag: releaseInfo.latest?.tag_name ?? "",
- })}
- </DialogTitle>
- <DialogDescription className="mt-2">
- {releaseInfo.latest?.html_url ?? releaseLink}
- </DialogDescription>
- <div className="mt-6 flex justify-end gap-x-2">
- <Button variant="ghost" onClick={() => setDialogOpen(false)}>
- {t("common.dismiss")}
- </Button>
- <Button
- onClick={() => {
- window.open(
- releaseInfo.latest?.html_url ?? releaseLink,
- "_blank"
- );
- setDialogOpen(false);
- }}
- >
- {t("common.learn-more")}
- </Button>
- </div>
- </DialogContent>
- </Dialog>
</>
);
}
diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.json
index 73fccead1b..bd26be98e4 100644
--- a/frontend/src/react/locales/en-US.json
+++ b/frontend/src/react/locales/en-US.json
@@ -1926,9 +1926,6 @@
"view-all-files": "View all files"
},
"remind": {
- "release": {
- "new-version-available-with-tag": "New version {{tag}} is available"
- },
"role-expire": {
"checkbox": "Do not remind until any updates",
"content": "Your following roles are going to expire",
diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.json
index 671cdb9f85..057b0f15e7 100644
--- a/frontend/src/react/locales/es-ES.json
+++ b/frontend/src/react/locales/es-ES.json
@@ -1915,9 +1915,6 @@
"view-all-files": "View all files"
},
"remind": {
- "release": {
- "new-version-available-with-tag": "La nueva versión {{tag}} está disponible"
- },
"role-expire": {
"checkbox": "No recordar hasta que haya actualizaciones",
"content": "Tus siguientes roles expirarán",
diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.json
index 7a6b99fc9a..bab73f5ecf 100644
--- a/frontend/src/react/locales/ja-JP.json
+++ b/frontend/src/react/locales/ja-JP.json
@@ -1915,9 +1915,6 @@
"view-all-files": "View all files"
},
"remind": {
- "release": {
- "new-version-available-with-tag": "新しいバージョン {{tag}} が利用可能です"
- },
"role-expire": {
"checkbox": "更新があるまで通知しない",
"content": "次のロールは期限切れになります",
diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.json
index 7fe1777d5e..90cc0fc16f 100644
--- a/frontend/src/react/locales/vi-VN.json
+++ b/frontend/src/react/locales/vi-VN.json
@@ -1915,9 +1915,6 @@
"view-all-files": "View all files"
},
"remind": {
- "release": {
- "new-version-available-with-tag": "Phiên bản mới {{tag}} có sẵn"
- },
"role-expire": {
"checkbox": "Không nhắc nhở cho đến khi có bất kỳ cập nhật nào",
"content": "Các vai trò sau của bạn sắp hết hạn",
diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.json
index 6700702894..53123c82fc 100644
--- a/frontend/src/react/locales/zh-CN.json
+++ b/frontend/src/react/locales/zh-CN.json
@@ -1915,9 +1915,6 @@
"view-all-files": "查看全部文件"
},
"remind": {
- "release": {
- "new-version-available-with-tag": "新版本 {{tag}} 已推出"
- },
"role-expire": {
"checkbox": "直到有更新再提醒",
"content": "您的角色即将到期",
diff --git a/frontend/src/react/pages/settings/LandingPage.tsx b/frontend/src/react/pages/settings/LandingPage.tsx
index df3f9c9ee5..d760d4a356 100644
--- a/frontend/src/react/pages/settings/LandingPage.tsx
+++ b/frontend/src/react/pages/settings/LandingPage.tsx
@@ -9,7 +9,6 @@ import {
ShieldCheck,
SquareStack,
Users,
- Volume2,
Workflow,
} from "lucide-react";
import {
@@ -61,7 +60,7 @@ import {
SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,
} from "@/router/dashboard/workspaceSetting";
import { useRecentVisit } from "@/router/useRecentVisit";
-import { useActuatorV1Store, useProjectV1Store } from "@/store";
+import { useProjectV1Store } from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { UNKNOWN_PROJECT_NAME } from "@/types";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
@@ -435,10 +434,6 @@ export function LandingPage(_: Record<string, never> = {}) {
const email = useCurrentUser()?.email ?? "";
const { version, changelogURL } = useServerState();
- const hasNewRelease = useVueState(() => useActuatorV1Store().hasNewRelease);
- const releaseLatest = useVueState(
- () => useActuatorV1Store().releaseInfo.latest
- );
const fullList = useFullQuickLinkList();
const { config, setConfig } = useQuickAccessConfig(email);
@@ -535,19 +530,6 @@ export function LandingPage(_: Record<string, never> = {}) {
{t("landing.changelog-for-version", { version })}
</a>
)}
- {hasNewRelease && releaseLatest?.html_url && (
- <a
- className="underline normal-link flex items-center gap-x-1"
- target="_blank"
- rel="noopener noreferrer"
- href={releaseLatest.html_url}
- >
- <Volume2 className="h-4 w-4" />
- {t("remind.release.new-version-available-with-tag", {
- tag: releaseLatest.tag_name,
- })}
- </a>
- )}
</div>
</div>
</div>
diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.ts
index 04497c14fc..19fdc13eaa 100644
--- a/frontend/src/store/modules/v1/actuator.ts
+++ b/frontend/src/store/modules/v1/actuator.ts
@@ -3,34 +3,18 @@ import { defineStore } from "pinia";
import semver from "semver";
import { computed, ref } from "vue";
import { actuatorServiceClientConnect } from "@/connect";
-import {
- type AppFeatures,
- type AppProfile,
- defaultAppProfile,
- type Release,
- type ReleaseInfo,
-} from "@/types";
+import { type AppFeatures, type AppProfile, defaultAppProfile } from "@/types";
import type { ActuatorInfo } from "@/types/proto-es/v1/actuator_service_pb";
-import {
- STORAGE_KEY_ONBOARDING,
- STORAGE_KEY_RELEASE,
- semverCompare,
-} from "@/utils";
+import { STORAGE_KEY_ONBOARDING } from "@/utils";
const EXTERNAL_URL_PLACEHOLDER =
"https://docs.bytebase.com/get-started/self-host/external-url";
-const GITHUB_API_LIST_BYTEBASE_RELEASE =
- "https://api.github.com/repos/bytebase/bytebase/releases";
export const useActuatorV1Store = defineStore("actuator_v1", () => {
// State
const initialized = ref(false);
const serverInfo = ref<ActuatorInfo | undefined>(undefined);
const serverInfoTs = ref(0);
- const releaseInfo = useLocalStorage<ReleaseInfo>(STORAGE_KEY_RELEASE, {
- ignoreRemindModalTillNextRelease: false,
- nextCheckTs: 0,
- });
const appProfile = ref<AppProfile>(defaultAppProfile());
const onboardingState = useLocalStorage<{
consumed: string[];
@@ -77,17 +61,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
return url === "" || url === EXTERNAL_URL_PLACEHOLDER;
});
- const hasNewRelease = computed(() => {
- return (
- (serverInfo.value?.version === "development" &&
- !!releaseInfo.value.latest?.tag_name) ||
- semverCompare(
- releaseInfo.value.latest?.tag_name ?? "",
- serverInfo.value?.version ?? ""
- )
- );
- });
-
const activatedInstanceCount = computed(
() => serverInfo.value?.activatedInstanceCount ?? 0
);
@@ -148,55 +121,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
return info;
};
- const fetchLatestRelease = async (): Promise<Release | undefined> => {
- try {
- const response = await fetch(
- `${GITHUB_API_LIST_BYTEBASE_RELEASE}?per_page=1`
- );
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const releaseList = (await response.json()) as Release[];
- return releaseList[0];
- } catch {
- return;
- }
- };
-
- const tryToRemindRelease = async (): Promise<boolean> => {
- if (serverInfo.value?.saas ?? false) {
- return false;
- }
- if (!releaseInfo.value.latest) {
- const release = await fetchLatestRelease();
- releaseInfo.value.latest = release;
- }
- if (!releaseInfo.value.latest) {
- return false;
- }
-
- if (Date.now() >= releaseInfo.value.nextCheckTs) {
- const release = await fetchLatestRelease();
- if (!release) {
- return false;
- }
-
- releaseInfo.value.nextCheckTs = Date.now() + 24 * 60 * 60 * 1000;
-
- if (semverCompare(release.tag_name, releaseInfo.value.latest.tag_name)) {
- releaseInfo.value.ignoreRemindModalTillNextRelease = false;
- }
-
- releaseInfo.value.latest = release;
- }
-
- if (releaseInfo.value.ignoreRemindModalTillNextRelease) {
- return false;
- }
-
- return hasNewRelease.value;
- };
-
const tryToRemindRefresh = async (): Promise<boolean> => {
if (Date.now() - serverInfoTs.value >= 1000 * 60 * 30) {
await fetchServerInfo(workspaceResourceName.value);
@@ -220,7 +144,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
initialized,
serverInfo,
serverInfoTs,
- releaseInfo,
appProfile,
onboardingState,
// Getters
@@ -234,7 +157,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
isSaaSMode,
workspaceResourceName,
needConfigureExternalUrl,
- hasNewRelease,
activatedInstanceCount,
totalInstanceCount,
replicaCount,
@@ -246,8 +168,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
updateUserStat,
setServerInfo,
fetchServerInfo,
- fetchLatestRelease,
- tryToRemindRelease,
tryToRemindRefresh,
setupSample,
overrideAppFeatures,
diff --git a/frontend/src/utils/storage-keys.ts b/frontend/src/utils/storage-keys.ts
index 2e8c02b7c5..0c1f2711de 100644
--- a/frontend/src/utils/storage-keys.ts
+++ b/frontend/src/utils/storage-keys.ts
@@ -4,7 +4,6 @@
// --- Global (no user scope) ---
export const STORAGE_KEY_BACK_PATH = "bb.back-path";
export const STORAGE_KEY_LANGUAGE = "bb.language";
-export const STORAGE_KEY_RELEASE = "bb.release";
export const STORAGE_KEY_ONBOARDING = "bb.onboarding";
export const STORAGE_KEY_SCHEMA_EDITOR_PREVIEW =
"bb.schema-editor.preview-expanded";