fix(watcher): forward notify backend errors instead of silently discarding

Previously Err(_) => return in the notify callback silently dropped all
backend errors (inotify exhaustion, fs unmount, permission loss), leaving
the application unaware that file monitoring had stopped working.

Add FileEvent::WatcherError { message: String } variant to propagate
backend errors through the existing bounded channel. The TUI consumer
receives the event without disrupting the UI for transient errors.

Closes #14
This commit is contained in:
dailz
2026-06-09 11:26:54 +08:00
parent d37ed6df68
commit 7852e92ecc
2 changed files with 22 additions and 1 deletions

View File

@@ -857,6 +857,7 @@ impl App {
FileEvent::Removed => {
self.loading_state = AppLoadingState::Error("File has been deleted".into());
}
FileEvent::WatcherError { message: _ } => {}
}
}
}