Skip to content

Complete pending children with their parent; plan recurring task trees - #76

Merged
tobixen merged 4 commits into
masterfrom
feat/complete-children
Oct 19, 2026
Merged

tobixen merged 4 commits into
masterfrom
feat/complete-children

Conversation

@tobixen

@tobixen tobixen commented Oct 16, 2026

Copy link
Copy Markdown
Member

Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompt(s) (comments made inline in documents while reviewing them):

Completing a parent means auto-completing all the children. This should be implemented and warned properly about in plann. Please fix or file.


A child has to be done before its parent can be completed, so completing a parent now also completes its pending children, recursively, with a warning for each. That covers edit --complete, complete in the interactive edit and completed! in set-task-attribs. When the selection also holds a child, the child is completed once, on the selected object itself, so a recurring child doesn't advance twice and a later save doesn't undo the completion. completed! now honours RRULE like the other two paths.

The second commit documents the planned model for recurring task trees in TASK_MANAGEMENT.md and adds it to the roadmap: RRULE on the root only, with the subtree regenerated when the root is completed. It is not implemented yet.

Related: python-caldav/caldav#782 (an early-completed fixed-time recurring task doesn't advance).

🤖 Generated with Claude Code

A child has to be done before its parent can be completed, so
completing a parent now completes its pending children recursively,
with a warning for each.  This applies to edit --complete, the
interactive complete command and completed! in set-task-attribs.
When the selection also holds a child, it resolves to the selected
object and is completed once, so a recurring child does not advance
twice, a later save does not undo the completion, and it is not
prompted for again.

Prompts (comments made inline in the document while reviewing it):
> (on "nothing stops you completing a parent with pending children") Completing a parent means auto-completing all the children.  This should be implemented and warned properly about in plann.  Please fix or file.

Assisted-By: Claude Opus 5.5 (1M context)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
An RRULE on every node of a task tree breaks the rule that a parent
is due after its children once a child is completed.  Describe the
planned model, RRULE on the root only with the subtree regenerated
on completion, and add it to the roadmap.

Prompts (comments made inline in the document while reviewing it):
> (on recurring child tasks breaking the rule that a parent is due after its children) Any suggestions?  Are there any prior-art on this?  (Some research was done on prior-art already - see the [calendaring-client] directory.  Few systems supports (sic) both dependencies and recurring tasks).
> (on the proposal: RRULE on the root only, regenerating the subtree) Then this should be included in the documentation for plann and calendaring-client, together with a /calendar-todo

Assisted-By: Claude Opus 5.5 (1M context)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
The recurring-task-tree plan linked every regenerated copy to the
root, which flattens deeper trees, and assumed the completed children
stay linked to the completed copy of the root, which gets a new UID
in safe completion.  Link each copy to the copy of its own parent,
remap every RELATED-TO on both ends, drop the completed copy's link
to a parent of the root, and note that caldav has to expose the
completed copy first.  Todoist re-adds sub-tasks one level deep only.

Prompt: [fix issues found during the review process]

Assisted-By: Claude Opus 5.5 (1M context)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
edit --multi-edit completed each line's task without the shared cache
and seen set, so a recurring child marked complete along with its
parent advanced twice.  Lines now share one cache, still fetching each
task after the editor closes.  A task that cannot be completed, being
not pending or having a STATUS outside the RFC, is reported before its
children are touched, and such a child is skipped with a warning.
Document that completed! now honours RRULE and that a recurring
parent's children are not regenerated for its next occurrence.

Prompt: [fix issues found during the review process]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 6ce7a52 into master Oct 19, 2026
9 checks passed
@tobixen
tobixen deleted the feat/complete-children branch October 19, 2026 21:04
tobixen added a commit that referenced this pull request Oct 19, 2026
v3.4.0 rejected merge commits whose subject starts with "Merge", such
as "Merge PR 76: ...", so the merge of
#76 had to be titled
"chore: merge PR 76: ...".  v4 lets merge commits through.

Prompt: (...) Perhaps "merge:" should be added as one of the valid prefixes in  the conventional-commit hook? (sic) [the hook had rejected "Merge PR 76: ..."]
Followup-Prompt: How are merge-commits handled in other projects?
Followup-Prompt: bump it.  Commit directly to master unless there are open PRs that can be piggybacked

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
tobixen added a commit that referenced this pull request Oct 20, 2026
Completing a task whose children include an event (or journal)
crashed with "'Event' object has no attribute 'is_pending'", as the
auto-completion of children from
#76 assumed every child is a
task.  Non-task children have nothing to complete and are skipped.

Prompt: The task has UID:50511558-eaec-11ef-9d3f-1c1bb5134174 and it is a VTODO, but still: (traceback pasted: AttributeError: 'Event' object has no attribute 'is_pending' in _complete, after answering "complete" in the one-by-one prompt) (when doing `plann interactive  manage-tasks`)

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
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