feat(milestones): add POST /api/milestones endpoint and resolve collapsible_if warnings (TD-fc685b13-d9c2-4a57-ac4d-5228a71a2ec0)

This commit is contained in:
Riz Ashraf committed 2026-10-07 19:32:11 +01:00
1 parent 8f924b793a
commit d792b50343
6 files changed
+47 -31

No files matched your search

+7 -11
View File
@@ -56,10 +56,10 @@ pub fn spawn_watcher(state: Arc<MemoryState>) {
for path in event.paths {
if should_review(&path) {
// 250ms debouncing window per file path
if let Some(last) = last_processed.get(&path) {
if now.duration_since(*last) < std::time::Duration::from_millis(250) {
continue;
}
if let Some(last) = last_processed.get(&path)
&& now.duration_since(*last) < std::time::Duration::from_millis(250)
{
continue;
}
last_processed.insert(path.clone(), now);
@@ -83,13 +83,9 @@ fn should_review(path: &Path) -> bool {
return false;
}
if let Some(ext) = path.extension() {
let ext_str = ext.to_string_lossy();
if ext_str == "rs" || ext_str == "md" || ext_str == "toml" || ext_str == "lua" {
return true;
}
}
false
path.extension()
.and_then(|ext| ext.to_str())
.is_some_and(|ext| matches!(ext, "rs" | "md" | "toml" | "lua"))
}
async fn trigger_autonomous_review(path: &Path, state: Arc<MemoryState>) {