Skip to content

[Bug] Tree view nests tasks across headings, bullets, and intervening text #577

@scarbajali

Description

@scarbajali

Summary

Task Genius incorrectly nests markdown tasks in tree view when it encounters a later indented task after unrelated structural content.

Instead of respecting markdown boundaries, the plugin can keep using an earlier task as the parent even when a heading, plain bullet, or intervening text appears between the two tasks.

Problem

Given markdown like this:

# Tasks

- [ ] This is a task
- [ ] This other task

  - [ ] This a new task

  - [ ] This is new other task
### New section
- Bullet

  - [ ] This task should be not children of "This other task"

the last task is wrongly shown as a child in tree view.

Expected Behavior

The last task should be rendered as an independent root task.

Tree hierarchy should only be built when the parent-child relationship is still structurally valid in markdown:

  • same file
  • later line number than the parent
  • no crossing of heading boundaries
  • no inheritance across intervening non-task structural content

Actual Behavior

The plugin keeps a stale parent relationship and nests the last task under an earlier task even though the heading and bullet structure break that relationship.

Impact

  • Tree view becomes misleading
  • Task grouping does not match the source markdown
  • Users can no longer trust visual hierarchy when notes contain mixed tasks, bullets, and headings

Notes

This issue is especially visible in notes that mix:

  • top-level tasks
  • normal list bullets
  • section headings
  • multiple independent task blocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions