Skip to content

feat(app): delete a todo 40 minutes in Done (0.10.1) - #35

Merged
brunoomariano merged 3 commits into
developfrom
feat/done-todos-expire
Nov 12, 2026
Merged

brunoomariano merged 3 commits into
developfrom
feat/done-todos-expire

Conversation

@brunoomariano

Copy link
Copy Markdown
Owner

Summary

A todo 40 minutes in Done is deleted, and nothing of it is kept. The 0.10.1 cut is on top.

  • When a todo went to Done is kept. The todo file gains a done_at column (schema 2, a new entry at the end of MIGRATIONS). Going to Done sets it, leaving Done clears it, and moving a todo to Done while it is there keeps it.
  • The window deletes the todos 40 minutes or more in Done on its alert tick, every 30 seconds and once at start, with the alert set on each (Session::expire_todos). The 40 minutes go on while TasksPending is closed. secure_delete is on, so a deleted todo leaves no text in the file.
  • Older files. A todo in Done in a 0.9.0 or 0.10.0 file gets its 40 minutes from the first tick, and that time is saved, so a restart does not start them over. A file the migration cannot write to (read-only, a full disk) opens read-only at its own schema, with its todos, and the Activity says why they are not saved. 0.9.0 and 0.10.0 open a schema-2 file read-only.
  • A time in Done ahead of the clock, as a clock set back leaves, counts from now.
  • The todo dialog's note reads "Kept until 40 minutes in Done; alerts last as long as TasksPending runs.", and its picture is retaken.

Verification

  • make ci-check passes on the branch head: 583 tests, against 573 on 0.10.0.
  • Built test first. Ten new tests, each failing before its code:
    • in session: the 40-minute boundary and the alert; the count from going to Done; the time kept across a restart; an undated todo from an older file; a time ahead of the clock; an old file that cannot be updated;
    • in todo_store: done_at kept; a first-schema file migrated; a first-schema file read-only; a deleted todo leaving no text.
  • Mutation checks: 14 of 14 mutants fail the tests, 9 on the expiry and the store and 5 on the review fixes.
  • A fresh-context review found nothing blocking. Fixed in faa659c:
    • its two should-fix items: an old read-only file opened empty, and the changelog's timing;
    • two nits: the clock ahead, and secure_delete.
  • The two calls on the tick in ui/mod.rs have no test, as with the rest of the GTK code. The deletion has not yet been watched live through a 40-minute wait.
  • Residual risks:
    • an Edit dialog open on a todo the tick deletes loses what was typed, without a notice;
    • an alert can be set on a todo in Done that goes before it rings.
  • Pictures were retaken headless on Broadway: the todo dialog, and the four that show the version. The light one needed a second take, since the demo staging sometimes lands after the capture.

Checklist

  • I updated documentation when behavior, configuration or installation changed. (docs/operations.md, docs/architecture.md, AGENTS.md, the window's DESIGN.md, the README's alt text, the changelog and the pictures.)
  • I added or updated focused tests for the change.
  • make ci-check passes locally.

A todo in Done now keeps when it went there, in a new done_at column of
the todo file (schema 2). The window deletes the todos 40 minutes or
more in Done on its alert tick, every 30 seconds and once at start, and
cancels the alert set on each; nothing of them is kept. Leaving Done
stops the 40 minutes, and going back starts them over. A todo already
in Done in a file from 0.10.0 gets its 40 minutes from the first tick,
and that time is saved, so a restart does not start them over.

The todo dialog's note says todos are kept until 40 minutes in Done,
and its picture is retaken.
Bringing a 0.9.0 or 0.10.0 todo file to the new schema writes to it. A
file that cannot be written (read-only, a full disk) now opens read-only
at its own schema, with its todos, and the Activity says they are not
being saved, and why, as before; until then it opened empty.

A time in Done ahead of the clock, as a clock set back leaves, counts
from now. secure_delete is on, so a deleted todo leaves no text of it
in the file. The changelog says the 40 minutes go on while TasksPending
is closed, and that 0.9.0 and 0.10.0 open the new file read-only.
@brunoomariano
brunoomariano marked this pull request as ready for review November 12, 2026 21:17
@brunoomariano
brunoomariano merged commit 4849464 into develop Nov 12, 2026
6 checks passed
@brunoomariano brunoomariano mentioned this pull request Nov 12, 2026
3 tasks done
@brunoomariano
brunoomariano deleted the feat/done-todos-expire branch November 12, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant