You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sort tasks by Taskfile definition order when using default sort #230
Currently, when taskfile.tree.sort is set to "default", tasks in the sidebar are displayed in the order returned by the task CLI, which does not necessarily match the order in which they are defined in the Taskfile.
This can be confusing for users who carefully organize their Taskfile, expecting the sidebar to reflect the same structure.
Proposed behavior:
When the sort mode is "default", tasks and namespaces should be sorted by their location.line property, preserving the original definition order from the Taskfile.
Example:
Given this Taskfile:
tasks:
build:
desc: Build the projecttest:
desc: Run testslint:
desc: Lint the code
The sidebar should display: build, test, lint — not alphabetically or in an arbitrary order.
For namespaces (included Taskfiles), the namespace position is determined by the smallest location.line of its contained tasks, scoped to the parent Taskfile to prevent included files from pulling a namespace out of order.
Activity
pd93 commentedon Feb 14, 2026
@kyrokode
taskfile.tree.sortalready does this when set tonone.