fix: remove redundant system reminder wrappers

This commit is contained in:
2026-08-20 15:01:43 +09:00
parent 2315c69f0a
commit e66876249e
9 changed files with 35 additions and 84 deletions
@@ -312,8 +312,7 @@ mod tests {
let SystemItem::TaskReminder { body, .. } = &queued[0] else {
panic!("unexpected system item: {:?}", queued[0]);
};
assert_eq!(body.matches("<system-reminder>").count(), 1);
assert_eq!(body.matches("</system-reminder>").count(), 1);
assert!(body.starts_with("Current session steps are listed below."));
assert!(body.contains("taskid 1"));
assert!(body.contains("pending"));
assert!(body.contains("keep going"));
@@ -338,19 +337,17 @@ mod tests {
panic!("unexpected system item: {:?}", queued[0]);
};
assert_eq!(*source, SystemReminderSource::TaskInactivity);
assert_eq!(body.matches("<system-reminder>").count(), 1);
assert_eq!(body.matches("</system-reminder>").count(), 1);
assert!(body.starts_with("Current session steps are listed below."));
assert!(body.contains("typed"));
}
#[test]
fn render_task_reminder_body_is_unwrapped_for_system_reminder_helper() {
fn render_task_reminder_body_is_plain_system_text() {
let feature = TaskFeature::new();
let task = feature.task_store().create("body".into(), String::new());
let body = render_task_reminder_body(&[task]);
assert!(!body.contains("<system-reminder>"));
assert!(!body.contains("</system-reminder>"));
assert!(body.starts_with("Current session steps are listed below."));
assert!(body.contains("TaskUpdate"));
assert!(body.contains("taskid 1"));
}