feat: add HIDE_UPDATE_BANNER environment variable#2051
feat: add HIDE_UPDATE_BANNER environment variable#2051im-adithya merged 3 commits intogetAlby:masterfrom
Conversation
Add a new HIDE_UPDATE_BANNER env var that allows platform operators (e.g. Start9) to suppress the built-in version update banner when they provide their own update notification mechanism. When set to true, the "What's New" widget is hidden and the header banner only shows for VSS migration notices. The version comparison against the Alby API is skipped entirely. Closes getAlby#2048
📝 WalkthroughWalkthroughAdds a HideUpdateBanner configuration flag propagated from backend config -> API -> frontend; frontend banner components now suppress rendering when this flag is true. (≤50 words) Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
im-adithya
left a comment
There was a problem hiding this comment.
I changed it so we still show the What's New Widget, also removed the outdated vssMigration check in banner cc @rolznz
|
@im-adithya unfortunately not all our subscriptions have moved to VSS yet, so we still should keep this banner. I think the What's New Widget check might need to be re-added, because there's a CTA which cannot be used to update (this is for Start9 which has their own update and release notes). |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/hooks/useBanner.tsx (1)
14-33:⚠️ Potential issue | 🔴 CriticalBug:
hideUpdateBannersuppresses the VSS migration banner too.The early return on line 15 bails out before the VSS migration check runs, so
showBannerstaysfalseeven when VSS migration is required. This directly contradicts the PR objective that the VSS migration banner must remain visible regardless of the flag.Move the flag into the version-comparison logic instead of the top-level guard.
🐛 Proposed fix
React.useEffect(() => { - if (!info || !albyInfo || info.hideUpdateBanner || isDismissedRef.current) { + if (!info || !albyInfo || isDismissedRef.current) { return; } // vss migration (alby cloud only) // TODO: remove after 2026-08-01 const vssMigrationRequired = info.oauthRedirect && !!albyMe?.subscription.plan_code.includes("buzz") && info.vssSupported && !info.ldkVssEnabled; - const upToDate = + const upToDate = info.hideUpdateBanner || Boolean(info.version) && info.version.startsWith("v") && compare(info.version.substring(1), albyInfo.hub.latestVersion, ">="); setShowBanner(!upToDate || vssMigrationRequired); }, [info, albyInfo, albyMe?.subscription.plan_code]);Note: with this approach, when
hideUpdateBanneristrue,upToDateevaluates totrue, so the banner only shows ifvssMigrationRequiredis alsotrue— matching the stated requirement.
|
Fixed! (Updated the date in TODO to 01-08-2026) |
Summary
HIDE_UPDATE_BANNERenv var (default:false) that suppresses the version update banner and "What's New" widgetChanges
config/models.go: AddHideUpdateBannerfield toAppConfigapi/models.go: AddHideUpdateBannertoInfoResponseapi/api.go: Pass env value through to responsefrontend/src/types.ts: AddhideUpdateBannertoInfoResponsefrontend/src/hooks/useBanner.tsx: Skip version check when flag is setfrontend/src/components/home/widgets/WhatsNewWidget.tsx: Hide widget when flag is setUsage
Closes #2048
Summary by CodeRabbit
New Features
Improvements