feat(reminders): schedule/cancel from confirm_action_items (T8.6, FR-CAL-5)

This commit is contained in:
iamdoubz committed 2026-07-02 11:59:15 -05:00
1 parent 7f97328a2d
commit 8a28854250
1 file changed
+15 -3
+15 -3
View File
@@ -1497,18 +1497,30 @@ pub async fn generate_summary(
Ok(())
}
/// Persist reviewed/edited action items as confirmed tasks (T5.6, FR-LLM-3).
/// Persist reviewed/edited action items as confirmed tasks (T5.6, FR-LLM-3),
/// then schedule or cancel each one's local reminder to match (Phase 8,
/// T8.6, FR-CAL-5).
#[tauri::command]
pub async fn confirm_action_items(
state: State<'_, AppState>,
meeting_id: MeetingId,
items: Vec<ActionItem>,
) -> WaResult<()> {
state
let saved = state
.store
.save_action_items(&meeting_id, &items)
.await
.map_err(|e| WaError::new("storage", e.to_string()))
.map_err(|e| WaError::new("storage", e.to_string()))?;
for item in &saved {
let Some(id) = &item.id else { continue };
match (item.reminder_set, item.due_at) {
(true, Some(due_at)) => {
crate::reminders::schedule(id, &item.text, item.owner.as_deref(), due_at)
}
_ => crate::reminders::cancel(id),
}
}
Ok(())
}
// ---- Calendar / .pst (Phase 6) ----