Files
ComfyUI_frontend/src/extensions/core/nightlyBadges.ts
Johnpaul Chiwetelu 8261e1d187 feat: add preview version badge for nightly builds (#8222)
## 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)
2026-01-22 03:32:52 +01:00

18 lines
413 B
TypeScript

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
})