on main help sign in
fix(ui): restore 'update available' notification
commit64c47cbbb3f0825432876786fb72737089732f55 authorChristian Rocha <christian@rocha.is> dateSun 26 Apr 2026, 20:01 (6 months ago) parent066fb5a
1 file changed+12
internal/ui/model/ui.go+12
internal/ui/model/ui.go+12
@@ -864,6 +864,18 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
864864 ttl = DefaultStatusTTL
865865 }
866866 cmds = append(cmds, clearInfoMsgCmd(ttl))
867+ case app.UpdateAvailableMsg:
868+ text := fmt.Sprintf("Crush update available: v%s → v%s.", msg.CurrentVersion, msg.LatestVersion)
869+ if msg.IsDevelopment {
870+ text = fmt.Sprintf("This is a development version of Crush. The latest version is v%s.", msg.LatestVersion)
871+ }
872+ ttl := 10 * time.Second
873+ m.status.SetInfoMsg(util.InfoMsg{
874+ Type: util.InfoTypeUpdate,
875+ Msg: text,
876+ TTL: ttl,
877+ })
878+ cmds = append(cmds, clearInfoMsgCmd(ttl))
867879 case util.ClearStatusMsg:
868880 m.status.ClearInfoMsg()
869881 case completions.CompletionItemsLoadedMsg: