#631·Trellis

task.py list --mine / --status hides matching children of non-matching parents

Author: wl336Created Sep 24, 2026Updated Sep 24, 2026

Summary

task.py list --mine (and --status) hides matching child tasks whose parent does not match the filter. _print_task returns before recursing into children, so a developer's task that lives under someone else's parent is never shown, and the text output reports that they have no tasks. --json output is correct because it is flat.

Reproduction (main @ e77ae89)

bash
python3 .trellis/scripts/init_developer.py alice
python3 .trellis/scripts/task.py create "Parent owned by bob" --slug parent --assignee bob --description parent
python3 .trellis/scripts/task.py create "Child owned by alice" --slug child --assignee alice --description child
python3 .trellis/scripts/task.py add-subtask .trellis/tasks/09-23-parent .trellis/tasks/09-23-child
python3 .trellis/scripts/task.py list --mine
python3 .trellis/scripts/task.py list --mine --json

Actual:

My tasks (assignee: alice):
  (no tasks assigned to you)
Total: 0 task(s)

while --json returns 09-23-child (assignee alice, parent 09-23-parent).

Expected: the text listing shows 09-23-child too.

Proposed fix

In task.py cmd_list, when a node fails the filter, keep traversing its children at the same indent instead of returning:

python
def _print_task(dir_name: str, indent: int = 0) -> None:
    nonlocal count
    t = all_tasks[dir_name]
    matches = not (filter_mine and (t.assignee or "-") != developer) and not (
        filter_status and t.status != filter_status
    )
    if not matches:
        for child_name in t.children:
            if child_name in all_tasks:
                _print_task(child_name, indent)
        return
    ...