feat: show actionable subtasks inline under parent task

When a parent is waitingfortesting/willdemo/etc but has actionable
subtasks, the API now categorises the parent as actionable. This
commit renders those subtasks as indented, clickable items under
the parent so they can be opened with a click in the TUI.

Fixes: subtasks like #3097 not surfacing when parent (#2590) is
waitingfortesting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 08:33:48 +02:00
parent 730f572806
commit d74595b89a

View File

@@ -146,6 +146,24 @@ def print_task(task, indent=" "):
if child_parts:
print(f"{indent} {GREY}Subtasks: {', '.join(child_parts)}{RESET}")
# List individual actionable subtasks so they're clickable
children = task.get('children') or []
waiting_statuses = {'done', 'completed', 'cancelled', 'waitingfortesting', 'willdemo', 'onhold', 'pending'}
for ch in children:
ch_status = (ch.get('status') or '').lower()
if ch_status in waiting_statuses:
continue
ch_nid = ch.get('nodesid')
ch_name = ch.get('node_name', 'Untitled')
ch_priority = ch.get('priority')
ch_assigned = ch.get('on_behalf_of')
print(f"{indent} {GREY}↳{RESET} {YELLOW}#{ch_nid}{RESET} {WHITE}{ch_name}{RESET}")
child_meta = [format_status(ch_status), format_priority(ch_priority)]
if ch_assigned:
short = ch_assigned.split(' (')[0] if ' (' in ch_assigned else ch_assigned
child_meta.append(f"{DIM}For: {short}{RESET}")
print(f"{indent} {' | '.join(child_meta)}")
# Latest note preview
note = task.get('latest_note')
if note: