Skip to content

Dashboard renderer needs hints for registering subtasks #2

Description

@melek

Problem

When creating tasks with subtasks, the session JSON schema supports two formats:

  1. Nested subtasks array on the parent task object
  2. parent field (integer index into the tasks array) on child tasks

The dashboard renderer (render_dashboard.py) only supports format #2 (the parent field approach). Format #1 (nested subtasks) is silently ignored — the parent renders but children don't appear.

Expected behavior

Either:

  • Document the correct format clearly (the parent field approach) so the model uses it consistently, OR
  • Support both formats in the renderer, OR
  • Have wpl add support a --parent flag for creating subtasks, so the model doesn't need to write raw JSON

Context

The wpl CLI doesn't have a subtask creation command, so the model writes session JSON directly to create parent/child relationships. Without clear guidance on which schema to use, it defaults to the nested format (which is a natural data modeling choice) rather than the index-based parent field the renderer expects.

Suggestion

Add a note to the state schema docs about the parent field format, and consider adding wpl add "subtask title" --parent t2 to the CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions