-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Problem
Users on older versions (e.g., 0.5.2) never see the upgrade indicator or toast notification when a newer version (e.g., 0.5.7) is available. The footer just shows the current version number with no upgrade prompt.
Root Cause
The upgrade() function in packages/opencode/src/cli/upgrade.ts silently returns without publishing any event in several scenarios:
autoupdate: falseorOPENCODE_DISABLE_AUTOUPDATE=true— returns with no notification at all- Install method is
"unknown"— returns with no notification - Auto-upgrade fails —
.catch(() => {})swallows the error silently yarninstall method — detected bymethod()but not inInstallation.upgrade()switch, throws, caught silently
Additionally, there is no semver guard against downgrading canary/preview users to an older stable release.
Expected Behavior
The upgrade indicator (↑ 0.5.7 update available · altimate upgrade) should always appear in the TUI footer when a newer version exists, regardless of the autoupdate setting. The autoupdate config should only control whether the upgrade happens automatically, not whether the user is informed.
Screenshots
Before (bug): v0.5.2 with no upgrade indicator despite 0.5.7 being available
After (fix): Upgrade indicator shown in footer