todos: reopen an acked keyed row when the caller says so

This commit is contained in:
damocles 2026-08-13 12:54:18 +02:00
commit 1b72ed56ff
12 changed files with 158 additions and 45 deletions

View file

@ -203,6 +203,7 @@ fn dispatch(
key,
summary,
source,
reopen_if_acked,
} => upsert_todo(
store,
wake,
@ -210,6 +211,7 @@ fn dispatch(
key.as_deref(),
&summary,
source.as_deref(),
reopen_if_acked,
),
Request::ClearTodo {
subsystem,
@ -378,8 +380,9 @@ fn upsert_todo(
key: Option<&str>,
summary: &str,
source: Option<&str>,
reopen_if_acked: bool,
) -> Response {
match store.upsert(subsystem, key, summary, source) {
match store.upsert(subsystem, key, summary, source, reopen_if_acked) {
Ok((id, changed)) => {
tracing::debug!(%subsystem, ?key, id, changed, "todo upsert");
if changed {