Skip to content

feat(tree): sort tasks by Taskfile definition order - #231

Closed
kyrokode wants to merge 1 commit into
go-task:mainfrom
kyrokode:feat/task-definition-order
Closed

kyrokode wants to merge 1 commit into
go-task:mainfrom
kyrokode:feat/task-definition-order

Conversation

@kyrokode

@kyrokode kyrokode commented Feb 9, 2026

Copy link
Copy Markdown

Summary

  • When taskfile.tree.sort is set to "default", tasks and namespaces in the sidebar are now sorted by their location.line property, preserving the original definition order from the Taskfile
  • Namespaces are positioned by the smallest line number of their contained tasks, scoped to the parent Taskfile to prevent included files from altering the order
  • Minor cleanup: import order in taskfile.ts, added types to tsconfig.json, added pnpm-workspace.yaml to .gitignore

Closes #230

Test plan

  • Open a workspace with a Taskfile containing multiple tasks and verify the sidebar displays them in definition order
  • Test with namespaces (included Taskfiles) to verify they appear at the correct position
  • Test with taskfile.tree.sort set to "alphanumeric" and "none" to verify no regression
  • Test with multi-root workspaces
  • Verify the extension compiles and lints without errors (pnpm compile && pnpm lint)

🤖 Generated with Claude Code

When the sort mode is "default", tasks and namespaces in the sidebar
are now ordered by their location.line property, preserving the
original definition order from the Taskfile. Namespaces are positioned
by the smallest line number of their contained tasks, scoped to the
parent Taskfile to prevent included files from altering the order.

Co-Authored-By: Claude <noreply@anthropic.com>
@pd93

pd93 commented Feb 14, 2026 •

Copy link
Copy Markdown
Member

@kyrokode taskfile.tree.sort already does this when set to none.

@pd93 pd93 closed this Feb 14, 2026
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.

Sort tasks by Taskfile definition order when using default sort

2 participants