aboutsummaryrefslogtreecommitdiff
path: root/src/app/api.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 00:07:24 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-07 16:29:44 +0300
commit3c2b46d24aa6c8011a1e198143752f2aa414d585 (patch)
treea52280bccc824ca656f8bc986a756f30901974e4 /src/app/api.rs
parent5d7e56737ef30d9de5802b0684a9428c40131dda (diff)
feat: add native windows beta support
Diffstat (limited to 'src/app/api.rs')
-rw-r--r--src/app/api.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/api.rs b/src/app/api.rs
index 4bb89a77..166ea789 100644
--- a/src/app/api.rs
+++ b/src/app/api.rs
@@ -117,8 +117,12 @@ impl App {
} else {
None
};
+ let terminal_cwd_reported = matches!(ev, AppEvent::TerminalCwdReported { .. });
let previous_toast = self.state.toast.clone();
let pane_updates = self.state.handle_app_event(ev);
+ if terminal_cwd_reported {
+ self.mark_git_status_refresh_due(Instant::now());
+ }
for update in &pane_updates {
self.refresh_new_herdr_toast_context_for_update(update, &previous_toast);
self.emit_pane_state_update(update);
@@ -811,6 +815,7 @@ mod tests {
use super::*;
use crate::detect::{Agent, AgentState};
+ #[cfg(unix)]
fn init_repo(path: &std::path::Path) {
let status = std::process::Command::new("git")
.args(["init", "-q"])
@@ -820,6 +825,7 @@ mod tests {
assert!(status.success(), "git init failed for {}", path.display());
}
+ #[cfg(unix)]
#[tokio::test]
async fn herdr_toast_context_uses_live_root_runtime_cwd_label() {
let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel();
@@ -912,6 +918,7 @@ mod tests {
let _ = std::fs::remove_dir_all(temp_root);
}
+ #[cfg(unix)]
#[tokio::test]
async fn delayed_herdr_toast_context_uses_live_root_runtime_cwd_label() {
let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel();