From 8261e1d187de4c27381f5e191f95978b6cfc6350 Mon Sep 17 00:00:00 2001 From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Date: Thu, 22 Jan 2026 03:32:52 +0100 Subject: [PATCH] feat: add preview version badge for nightly builds (#8222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Adds a "Preview Version" badge to the topbar on nightly builds to help users identify when they're using an unreleased version and encourage feedback. ## Changes - Add `nightly.badge` i18n translations (label and tooltip) - Create `nightlyBadges.ts` extension with info variant badge - Load nightly badges extension when `isNightly` is true - Badge tooltip encourages users to provide feedback via the feedback button ## Test plan - [ ] Build and run nightly version, verify "NIGHTLY | Preview Version" badge appears in topbar - [ ] Hover over badge, verify tooltip shows: "You are using a nightly version of ComfyUI. Please use the feedback button to share your thoughts about these features." - [ ] Verify stable OSS builds don't show the badge - [ ] Verify cloud builds don't show the nightly badge ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8222-feat-add-preview-version-badge-for-nightly-builds-2ef6d73d36508102aa0dfc22ef14c9c1) by [Unito](https://www.unito.io) --- src/extensions/core/index.ts | 7 ++++++- src/extensions/core/nightlyBadges.ts | 17 +++++++++++++++++ src/locales/en/main.json | 7 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/extensions/core/nightlyBadges.ts diff --git a/src/extensions/core/index.ts b/src/extensions/core/index.ts index f50493d82..e1675dfb2 100644 --- a/src/extensions/core/index.ts +++ b/src/extensions/core/index.ts @@ -1,4 +1,4 @@ -import { isCloud } from '@/platform/distribution/types' +import { isCloud, isNightly } from '@/platform/distribution/types' import './clipspace' import './contextMenuFilter' @@ -38,3 +38,8 @@ if (isCloud) { await import('./cloudSubscription') } } + +// Nightly-only extensions +if (isNightly && !isCloud) { + await import('./nightlyBadges') +} diff --git a/src/extensions/core/nightlyBadges.ts b/src/extensions/core/nightlyBadges.ts new file mode 100644 index 000000000..a453a6397 --- /dev/null +++ b/src/extensions/core/nightlyBadges.ts @@ -0,0 +1,17 @@ +import { t } from '@/i18n' +import { useExtensionService } from '@/services/extensionService' +import type { TopbarBadge } from '@/types/comfy' + +const badges: TopbarBadge[] = [ + { + text: t('nightly.badge.label'), + label: t('g.nightly'), + variant: 'warning', + tooltip: t('nightly.badge.tooltip') + } +] + +useExtensionService().registerExtension({ + name: 'Comfy.Nightly.Badges', + topbarBadges: badges +}) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 16116ac1c..9dacb3d64 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -275,6 +275,7 @@ "1x": "1x", "2x": "2x", "beta": "BETA", + "nightly": "NIGHTLY", "profile": "Profile", "noItems": "No items" }, @@ -2634,5 +2635,11 @@ "workspaceNotFound": "Workspace not found", "tokenExchangeFailed": "Failed to authenticate with workspace: {error}" } + }, + "nightly": { + "badge": { + "label": "Preview Version", + "tooltip": "You are using a nightly version of ComfyUI. Please use the feedback button to share your thoughts about these features." + } } } \ No newline at end of file