diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-31 03:02:45 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-31 03:04:20 +0300 |
| commit | 77819797385c5538f624a8881208921342911db0 (patch) | |
| tree | 931a03aa3825a10d6b6d73b63e4ce80e19ecbf56 /src/app | |
| parent | 3acd499ffb1119e8032bbcba3f1f46d4ff5f3da9 (diff) | |
fix: clarify update restart guidance
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/actions.rs | 14 | ||||
| -rw-r--r-- | src/app/api.rs | 6 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/app/actions.rs b/src/app/actions.rs index 981212b1..160947ff 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -1932,7 +1932,7 @@ impl AppState { self.toast = Some(ToastNotification { kind: ToastKind::UpdateInstalled, title: format!("v{version} available"), - context: format!("detach, then run `{install_command}`"), + context: crate::update::update_install_instruction(&install_command), target: None, }); } @@ -2795,7 +2795,10 @@ mod tests { assert!(state.latest_release_notes_available); let toast = state.toast.as_ref().expect("update toast"); assert_eq!(toast.title, "v0.5.0 available"); - assert_eq!(toast.context, "detach, then run `herdr update`"); + assert_eq!( + toast.context, + "detach, run `herdr update`, then follow its restart guidance" + ); } fn mark_agent(state: &mut AppState, ws_idx: usize, tab_idx: usize, pane_id: PaneId) { @@ -3756,7 +3759,10 @@ mod tests { let toast = state.toast.as_ref().expect("update toast"); assert_eq!(toast.kind, ToastKind::UpdateInstalled); assert_eq!(toast.title, "v0.5.0 available"); - assert_eq!(toast.context, "detach, then run `herdr update`"); + assert_eq!( + toast.context, + "detach, run `herdr update`, then follow its restart guidance" + ); } #[test] @@ -3776,7 +3782,7 @@ mod tests { let toast = state.toast.as_ref().expect("update toast"); assert_eq!( toast.context, - "detach, then run `brew update && brew upgrade herdr`" + "detach, run `brew update && brew upgrade herdr`, then restart this Herdr session when ready" ); } diff --git a/src/app/api.rs b/src/app/api.rs index d8224506..1442012b 100644 --- a/src/app/api.rs +++ b/src/app/api.rs @@ -152,10 +152,8 @@ impl App { }; if let Some((version, install_command)) = update_ready { - let _ = notify( - &format!("v{version} available"), - Some(&format!("detach, then run `{install_command}`")), - ); + let instruction = crate::update::update_install_instruction(&install_command); + let _ = notify(&format!("v{version} available"), Some(&instruction)); } else { for update in &pane_updates { let is_active_tab = self |
