Skip to content

fix: make sort direction defaults context-sensitive - #41

Merged
josephschmitt merged 1 commit into
mainfrom
fix/alpha-sort
Feb 13, 2026
Merged

fix: make sort direction defaults context-sensitive#41
josephschmitt merged 1 commit into
mainfrom
fix/alpha-sort

Conversation

@josephschmitt

Copy link
Copy Markdown
Owner

Summary

The --sort-direction flag now defaults intelligently based on the sort mode:

  • desc for priority (higher priority first)
  • asc for alpha and label (A→Z order)

Previously all sort modes defaulted to desc, which felt backwards for alphabetical and label sorting.

Changes

  • Updated --sort-direction default from "desc" to "" (empty) and added empty string to enum
  • Added logic in sortProjects to resolve empty direction to appropriate default based on sort mode
  • Updated TestCLI_SortAlpha to rely on new default (removed explicit --sort-direction asc)
  • Updated TestCLI_SortLabel expectations to match new asc default

Test plan

  • All existing tests pass
  • TestCLI_SortAlpha verifies alpha defaults to asc
  • TestCLI_SortLabel verifies label defaults to asc
  • TestCLI_SortPriorityAsc verifies priority can still be explicitly set to asc

🤖 Generated with Claude Code

The --sort-direction flag now defaults to:
- desc for priority (higher priority first)
- asc for alpha and label (A→Z order)

Previously all sort modes defaulted to desc, which felt backwards
for alphabetical and label sorting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@josephschmitt
josephschmitt merged commit 085a36d into main Feb 13, 2026
5 checks passed
@josephschmitt
josephschmitt deleted the fix/alpha-sort branch February 13, 2026 20:55
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.

1 participant